From 989b41bca849fcfec9911ee62ab92d01554bf67b Mon Sep 17 00:00:00 2001 From: David Hoese <david.hoese@ssec.wisc.edu> Date: Wed, 15 Jul 2020 14:42:12 -0500 Subject: [PATCH] Add initial bucket lifecycle configs --- .gitlab-ci.yml | 40 ------------------- admin/abi-netcdf-bucket-lifecycle.json | 12 ++++++ .../values-geosphere-minio.yaml | 0 3 files changed, 12 insertions(+), 40 deletions(-) create mode 100644 admin/abi-netcdf-bucket-lifecycle.json rename {production => admin}/values-geosphere-minio.yaml (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb4f57d..c99641a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,6 @@ stages: - get chart - build prereqs - deploy rabbit - - deploy storage - deploy GRB - deploy G2G - deploy WMS @@ -129,45 +128,6 @@ deploy_prod_rabbit: - when: on_success -deploy_prod_minio: - environment: - name: production - url: http://geosphere.ssec.wisc.edu - extends: .helm_based_job - stage: deploy storage - script: - - if [ -n "$CI_COMMIT_TAG" ]; then - ns="geosphere"; - else - ns="geosphere-test"; - fi - # copy secret kubeconfig to the mounted (pwd) directory - - cp $kubekorner_k3s_config . - - kubeconfig=$(basename $kubekorner_k3s_config) - # get password from any previous installation - - auth_sec="geosphere-minio" - - sec_info=$(kubectl --kubeconfig $kubeconfig get secret --namespace $ns $auth_sec || echo "") - - echo "$sec_info" - # if we've installed this once then reuse the existing secret - # otherwise force the chart to generate random values for accessKey and secretKey - # by setting them to false - - if [ "$sec_info" != "" ]; then - ak=$(kubectl --kubeconfig $kubeconfig get secret --namespace "$ns" "$auth_sec" -o jsonpath="{.data.accesskey}" | base64 -d); - sk=$(kubectl --kubeconfig $kubeconfig get secret --namespace "$ns" "$auth_sec" -o jsonpath="{.data.secretkey}" | base64 -d); - EXTRA_ARGS="--set accessKey=$ak --set secretKey=$sk"; - else - EXTRA_ARGS="--set accessKey=false --set secretKey=false"; - fi - - echo $EXTRA_ARGS - - helm upgrade -v 2 --install --kubeconfig $kubeconfig -f production/values-geosphere-minio.yaml $EXTRA_ARGS --namespace $ns geosphere-minio stable/minio - # this job doesn't actually need any artifacts from previous jobs - dependencies: [] - rules: - - if: '$kubekorner_k3s_config == ""' - when: never - - when: on_success - - deploy_g16_grb: environment: name: production diff --git a/admin/abi-netcdf-bucket-lifecycle.json b/admin/abi-netcdf-bucket-lifecycle.json new file mode 100644 index 0000000..58f5eb1 --- /dev/null +++ b/admin/abi-netcdf-bucket-lifecycle.json @@ -0,0 +1,12 @@ +{ + "Rules": [ + { + "ID": "Expire old NetCDF files", + "Expiration": { + "Days": 1 + }, + "Prefix": "", + "Status": "Enabled" + } + ] +} \ No newline at end of file diff --git a/production/values-geosphere-minio.yaml b/admin/values-geosphere-minio.yaml similarity index 100% rename from production/values-geosphere-minio.yaml rename to admin/values-geosphere-minio.yaml -- GitLab