Skip to content

Commit

Permalink
Fix Storage Account cleaner (kyma-project#1989)
Browse files Browse the repository at this point in the history
  • Loading branch information
hudymi committed Feb 3, 2020
1 parent f978398 commit 2241303
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 2 deletions.
4 changes: 2 additions & 2 deletions development/tools/jobs/kyma/kyma_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func TestKymaIntegrationJobPeriodics(t *testing.T) {
require.NoError(t, err)

periodics := jobConfig.Periodics
assert.Len(t, periodics, 14)
assert.Len(t, periodics, 15)

expName := "orphaned-disks-cleaner"
disksCleanerPeriodic := tester.FindPeriodicJobByName(periodics, expName)
Expand All @@ -327,7 +327,7 @@ func TestKymaIntegrationJobPeriodics(t *testing.T) {
assert.Equal(t, expName, orphanedAZStorageAccountsCleaner.Name)
assert.True(t, orphanedAZStorageAccountsCleaner.Decorate)
assert.Equal(t, "00 00 * * *", orphanedAZStorageAccountsCleaner.Cron)
tester.AssertThatHasPresets(t, orphanedAZStorageAccountsCleaner.JobBase, "preset-minio-az-gateway", "preset-creds-aks-kyma-integration")
tester.AssertThatHasPresets(t, orphanedAZStorageAccountsCleaner.JobBase, "preset-creds-aks-kyma-integration")
tester.AssertThatHasExtraRefs(t, orphanedAZStorageAccountsCleaner.JobBase.UtilityConfig, []string{"test-infra"})
assert.Equal(t, tester.ImageKymaClusterInfraLatest, orphanedAZStorageAccountsCleaner.Spec.Containers[0].Image)
assert.Equal(t, []string{"bash"}, orphanedAZStorageAccountsCleaner.Spec.Containers[0].Command)
Expand Down
32 changes: 32 additions & 0 deletions prow/jobs/kyma/kyma-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,38 @@ periodics:
memory: 100Mi
cpu: 50m
- name: orphaned-az-storage-accounts-cleaner
cron: "00 00 * * *" # "At 00:00 each day"
annotations:
testgrid-dashboards: kyma-cleaners
# testgrid-alert-email: email-here@sap.com
testgrid-num-failures-to-alert: '1'
labels:
preset-creds-aks-kyma-integration: "true"
decorate: true
extra_refs:
- <<: *test_infra_ref
base_ref: master
spec:
containers:
- <<: *k8s_1-14
command:
- "bash"
args:
- "-c"
- "prow/scripts/cluster-integration/minio/azure-cleaner.sh"
env:
- name: MINIO_GATEWAY_MODE
value: azure
- name: AZURE_RS_GROUP
value: rafter-minio-gateway
- name: AZURE_REGION
value: westeurope
resources:
requests:
memory: 100Mi
cpu: 50m
# TODO (@michal-hudy): Remove when release 1.8 not supported
- name: orphaned-az-storage-accounts-cleaner-old
cron: "00 00 * * *" # "At 00:00 each day"
annotations:
testgrid-dashboards: kyma-cleaners
Expand Down
32 changes: 32 additions & 0 deletions templates/templates/kyma-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,38 @@ periodics:
memory: 100Mi
cpu: 50m
- name: orphaned-az-storage-accounts-cleaner
cron: "00 00 * * *" # "At 00:00 each day"
annotations:
testgrid-dashboards: kyma-cleaners
# testgrid-alert-email: email-here@sap.com
testgrid-num-failures-to-alert: '1'
labels:
preset-creds-aks-kyma-integration: "true"
decorate: true
extra_refs:
- <<: *test_infra_ref
base_ref: master
spec:
containers:
- <<: *k8s_1-14
command:
- "bash"
args:
- "-c"
- "prow/scripts/cluster-integration/minio/azure-cleaner.sh"
env:
- name: MINIO_GATEWAY_MODE
value: azure
- name: AZURE_RS_GROUP
value: rafter-minio-gateway
- name: AZURE_REGION
value: westeurope
resources:
requests:
memory: 100Mi
cpu: 50m
# TODO (@michal-hudy): Remove when release 1.8 not supported
- name: orphaned-az-storage-accounts-cleaner-old
cron: "00 00 * * *" # "At 00:00 each day"
annotations:
testgrid-dashboards: kyma-cleaners
Expand Down

0 comments on commit 2241303

Please sign in to comment.