From 5e138b93f51867a993b73e19eb0e9f8359cff46b Mon Sep 17 00:00:00 2001 From: bhearn7 Date: Tue, 27 Apr 2021 14:06:36 -0400 Subject: [PATCH 1/7] add delete policy --- CHANGELOG.md | 4 ++++ chart/templates/bigbang/db/anchore-db-secret.yaml | 2 +- chart/templates/bigbang/db/feeds-db-secret.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6098495..023c30f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), --- +## [1.12.7-bb.3] +### Fixed +- Updated db secrets' delete policy to include before-hook-creation + ## [1.12.7-bb.2] ### Changed - Added secrets and jobs for automated external Postgres database creation and user/password synchronization diff --git a/chart/templates/bigbang/db/anchore-db-secret.yaml b/chart/templates/bigbang/db/anchore-db-secret.yaml index c82686e..b3a71da 100644 --- a/chart/templates/bigbang/db/anchore-db-secret.yaml +++ b/chart/templates/bigbang/db/anchore-db-secret.yaml @@ -14,7 +14,7 @@ metadata: annotations: "helm.sh/hook-weight": "-5" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": hook-succeeded + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded type: Opaque data: PGUSER: {{ b64enc .Values.postgresql.postgresUser }} diff --git a/chart/templates/bigbang/db/feeds-db-secret.yaml b/chart/templates/bigbang/db/feeds-db-secret.yaml index 37b979c..9817ff3 100644 --- a/chart/templates/bigbang/db/feeds-db-secret.yaml +++ b/chart/templates/bigbang/db/feeds-db-secret.yaml @@ -14,7 +14,7 @@ metadata: annotations: "helm.sh/hook-weight": "-5" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": hook-succeeded + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded type: Opaque data: PGUSER: {{ b64enc (index .Values "anchore-feeds-db" "postgresUser") }} -- GitLab From 94557dbcec710e88280b7ff316f219779cc41a5b Mon Sep 17 00:00:00 2001 From: bhearn7 Date: Tue, 27 Apr 2021 14:10:19 -0400 Subject: [PATCH 2/7] add delete policy --- CHANGELOG.md | 2 +- chart/templates/bigbang/db/ensure-anchore-db.yaml | 2 +- chart/templates/bigbang/db/ensure-feeds-db.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 023c30f..66fd81c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [1.12.7-bb.3] ### Fixed -- Updated db secrets' delete policy to include before-hook-creation +- Fixed db secrets and db jobs delete policy to include before-hook-creation and hook-succeeded ## [1.12.7-bb.2] ### Changed diff --git a/chart/templates/bigbang/db/ensure-anchore-db.yaml b/chart/templates/bigbang/db/ensure-anchore-db.yaml index 99492a2..817f829 100644 --- a/chart/templates/bigbang/db/ensure-anchore-db.yaml +++ b/chart/templates/bigbang/db/ensure-anchore-db.yaml @@ -8,7 +8,7 @@ metadata: annotations: "helm.sh/hook-weight": "-4" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded spec: template: metadata: diff --git a/chart/templates/bigbang/db/ensure-feeds-db.yaml b/chart/templates/bigbang/db/ensure-feeds-db.yaml index 2bedd7c..db21065 100644 --- a/chart/templates/bigbang/db/ensure-feeds-db.yaml +++ b/chart/templates/bigbang/db/ensure-feeds-db.yaml @@ -8,7 +8,7 @@ metadata: annotations: "helm.sh/hook-weight": "-4" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded spec: template: metadata: -- GitLab From e406a046dd1e7eb21520f08d570d035e2358a6a7 Mon Sep 17 00:00:00 2001 From: bhearn7 Date: Tue, 27 Apr 2021 14:46:02 -0400 Subject: [PATCH 3/7] update restart policy --- chart/templates/bigbang/db/ensure-anchore-db.yaml | 2 +- chart/templates/bigbang/db/ensure-feeds-db.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/templates/bigbang/db/ensure-anchore-db.yaml b/chart/templates/bigbang/db/ensure-anchore-db.yaml index 817f829..70f3c62 100644 --- a/chart/templates/bigbang/db/ensure-anchore-db.yaml +++ b/chart/templates/bigbang/db/ensure-anchore-db.yaml @@ -32,6 +32,6 @@ spec: envFrom: - secretRef: name: anchore-db-credentials - restartPolicy: OnFailure + restartPolicy: Never {{- end }} {{- end }} \ No newline at end of file diff --git a/chart/templates/bigbang/db/ensure-feeds-db.yaml b/chart/templates/bigbang/db/ensure-feeds-db.yaml index db21065..77e2d09 100644 --- a/chart/templates/bigbang/db/ensure-feeds-db.yaml +++ b/chart/templates/bigbang/db/ensure-feeds-db.yaml @@ -32,6 +32,6 @@ spec: envFrom: - secretRef: name: feeds-db-credentials - restartPolicy: OnFailure + restartPolicy: Never {{- end }} {{- end }} \ No newline at end of file -- GitLab From 5dffeabe1dfbbc705ad223a481fb587f6fb1a2a5 Mon Sep 17 00:00:00 2001 From: bhearn7 Date: Tue, 27 Apr 2021 15:02:50 -0400 Subject: [PATCH 4/7] update delete policy --- chart/templates/bigbang/db/anchore-db-secret.yaml | 2 +- chart/templates/bigbang/db/ensure-anchore-db.yaml | 2 +- chart/templates/bigbang/db/ensure-feeds-db.yaml | 2 +- chart/templates/bigbang/db/feeds-db-secret.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chart/templates/bigbang/db/anchore-db-secret.yaml b/chart/templates/bigbang/db/anchore-db-secret.yaml index b3a71da..8642456 100644 --- a/chart/templates/bigbang/db/anchore-db-secret.yaml +++ b/chart/templates/bigbang/db/anchore-db-secret.yaml @@ -14,7 +14,7 @@ metadata: annotations: "helm.sh/hook-weight": "-5" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed type: Opaque data: PGUSER: {{ b64enc .Values.postgresql.postgresUser }} diff --git a/chart/templates/bigbang/db/ensure-anchore-db.yaml b/chart/templates/bigbang/db/ensure-anchore-db.yaml index 70f3c62..817f829 100644 --- a/chart/templates/bigbang/db/ensure-anchore-db.yaml +++ b/chart/templates/bigbang/db/ensure-anchore-db.yaml @@ -32,6 +32,6 @@ spec: envFrom: - secretRef: name: anchore-db-credentials - restartPolicy: Never + restartPolicy: OnFailure {{- end }} {{- end }} \ No newline at end of file diff --git a/chart/templates/bigbang/db/ensure-feeds-db.yaml b/chart/templates/bigbang/db/ensure-feeds-db.yaml index 77e2d09..db21065 100644 --- a/chart/templates/bigbang/db/ensure-feeds-db.yaml +++ b/chart/templates/bigbang/db/ensure-feeds-db.yaml @@ -32,6 +32,6 @@ spec: envFrom: - secretRef: name: feeds-db-credentials - restartPolicy: Never + restartPolicy: OnFailure {{- end }} {{- end }} \ No newline at end of file diff --git a/chart/templates/bigbang/db/feeds-db-secret.yaml b/chart/templates/bigbang/db/feeds-db-secret.yaml index 9817ff3..639f618 100644 --- a/chart/templates/bigbang/db/feeds-db-secret.yaml +++ b/chart/templates/bigbang/db/feeds-db-secret.yaml @@ -14,7 +14,7 @@ metadata: annotations: "helm.sh/hook-weight": "-5" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed type: Opaque data: PGUSER: {{ b64enc (index .Values "anchore-feeds-db" "postgresUser") }} -- GitLab From 0ce6cb2757947ecb9abc4591177cfe1604f4f73b Mon Sep 17 00:00:00 2001 From: bhearn7 Date: Tue, 27 Apr 2021 15:30:13 -0400 Subject: [PATCH 5/7] update delete policies --- CHANGELOG.md | 2 +- chart/templates/bigbang/db/anchore-db-secret.yaml | 2 +- chart/templates/bigbang/db/ensure-anchore-db.yaml | 2 +- chart/templates/bigbang/db/ensure-feeds-db.yaml | 2 +- chart/templates/bigbang/db/feeds-db-secret.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66fd81c..4678792 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [1.12.7-bb.3] ### Fixed -- Fixed db secrets and db jobs delete policy to include before-hook-creation and hook-succeeded +- Added delete policies to db secrets to handle helm errors ## [1.12.7-bb.2] ### Changed diff --git a/chart/templates/bigbang/db/anchore-db-secret.yaml b/chart/templates/bigbang/db/anchore-db-secret.yaml index 8642456..d420839 100644 --- a/chart/templates/bigbang/db/anchore-db-secret.yaml +++ b/chart/templates/bigbang/db/anchore-db-secret.yaml @@ -14,7 +14,7 @@ metadata: annotations: "helm.sh/hook-weight": "-5" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed + "helm.sh/hook-delete-policy": hook-succeeded,hook-failed type: Opaque data: PGUSER: {{ b64enc .Values.postgresql.postgresUser }} diff --git a/chart/templates/bigbang/db/ensure-anchore-db.yaml b/chart/templates/bigbang/db/ensure-anchore-db.yaml index 817f829..99492a2 100644 --- a/chart/templates/bigbang/db/ensure-anchore-db.yaml +++ b/chart/templates/bigbang/db/ensure-anchore-db.yaml @@ -8,7 +8,7 @@ metadata: annotations: "helm.sh/hook-weight": "-4" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded + "helm.sh/hook-delete-policy": before-hook-creation spec: template: metadata: diff --git a/chart/templates/bigbang/db/ensure-feeds-db.yaml b/chart/templates/bigbang/db/ensure-feeds-db.yaml index db21065..2bedd7c 100644 --- a/chart/templates/bigbang/db/ensure-feeds-db.yaml +++ b/chart/templates/bigbang/db/ensure-feeds-db.yaml @@ -8,7 +8,7 @@ metadata: annotations: "helm.sh/hook-weight": "-4" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded + "helm.sh/hook-delete-policy": before-hook-creation spec: template: metadata: diff --git a/chart/templates/bigbang/db/feeds-db-secret.yaml b/chart/templates/bigbang/db/feeds-db-secret.yaml index 639f618..eb90315 100644 --- a/chart/templates/bigbang/db/feeds-db-secret.yaml +++ b/chart/templates/bigbang/db/feeds-db-secret.yaml @@ -14,7 +14,7 @@ metadata: annotations: "helm.sh/hook-weight": "-5" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed + "helm.sh/hook-delete-policy": hook-succeeded,hook-failed type: Opaque data: PGUSER: {{ b64enc (index .Values "anchore-feeds-db" "postgresUser") }} -- GitLab From e214902f1deb01ba2923c3665e3be5361be5313b Mon Sep 17 00:00:00 2001 From: bhearn7 Date: Tue, 27 Apr 2021 16:02:01 -0400 Subject: [PATCH 6/7] bump anchore tag --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index d0bea8b..b111f2f 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: anchore-engine -version: 1.12.7-bb.2 +version: 1.12.7-bb.3 appVersion: 0.9.3 description: Anchore container analysis and policy evaluation engine service keywords: -- GitLab From 620fe0fc0deaad0f3f9b62bebc6386cedd7c414b Mon Sep 17 00:00:00 2001 From: bhearn7 Date: Tue, 27 Apr 2021 16:33:16 -0400 Subject: [PATCH 7/7] update delete policies --- CHANGELOG.md | 2 +- chart/templates/bigbang/db/anchore-db-secret.yaml | 2 +- chart/templates/bigbang/db/feeds-db-secret.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4678792..a830733 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [1.12.7-bb.3] ### Fixed -- Added delete policies to db secrets to handle helm errors +- Updated delete policies to db secrets to handle helm errors ## [1.12.7-bb.2] ### Changed diff --git a/chart/templates/bigbang/db/anchore-db-secret.yaml b/chart/templates/bigbang/db/anchore-db-secret.yaml index d420839..946b565 100644 --- a/chart/templates/bigbang/db/anchore-db-secret.yaml +++ b/chart/templates/bigbang/db/anchore-db-secret.yaml @@ -14,7 +14,7 @@ metadata: annotations: "helm.sh/hook-weight": "-5" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": hook-succeeded,hook-failed + "helm.sh/hook-delete-policy": before-hook-creation type: Opaque data: PGUSER: {{ b64enc .Values.postgresql.postgresUser }} diff --git a/chart/templates/bigbang/db/feeds-db-secret.yaml b/chart/templates/bigbang/db/feeds-db-secret.yaml index eb90315..68fe0eb 100644 --- a/chart/templates/bigbang/db/feeds-db-secret.yaml +++ b/chart/templates/bigbang/db/feeds-db-secret.yaml @@ -14,7 +14,7 @@ metadata: annotations: "helm.sh/hook-weight": "-5" "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": hook-succeeded,hook-failed + "helm.sh/hook-delete-policy": before-hook-creation type: Opaque data: PGUSER: {{ b64enc (index .Values "anchore-feeds-db" "postgresUser") }} -- GitLab