From 45987f80a6c5c316560f9c493cb01debc1be7574 Mon Sep 17 00:00:00 2001 From: antonis-snowplow Date: Thu, 31 Oct 2024 13:04:49 +0200 Subject: [PATCH 1/5] Adds condition to deploy hook job only when we use private subnet --- CHANGELOG | 4 ++++ charts/snowplow-iglu-server/Chart.yaml | 2 +- charts/snowplow-iglu-server/README.md | 3 ++- charts/snowplow-iglu-server/templates/iglu-hooks.yaml | 2 ++ charts/snowplow-iglu-server/values-aws.yaml.tmpl | 1 + charts/snowplow-iglu-server/values.yaml | 2 ++ 6 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 61e294b..bdc1d94 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +Version 0.1.80 (2024-10-31) +--------------------------- +charts/snowplow-iglu-server: Adds condition to deploy hook job only when we use private subnet (closes #205) + Version 0.1.79 (2024-10-29) --------------------------- charts/snowplow-iglu-server: Adds missiing variable to fix bug from previous version (closes #205) diff --git a/charts/snowplow-iglu-server/Chart.yaml b/charts/snowplow-iglu-server/Chart.yaml index 9db70b8..03e221b 100644 --- a/charts/snowplow-iglu-server/Chart.yaml +++ b/charts/snowplow-iglu-server/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: snowplow-iglu-server description: A Helm Chart to deploy the Snowplow Iglu Server project -version: 0.10.1 +version: 0.10.2 appVersion: "0.12.0" icon: https://raw.githubusercontent.com/snowplow-devops/helm-charts/master/docs/logo/snowplow.png home: https://github.com/snowplow-devops/helm-charts diff --git a/charts/snowplow-iglu-server/README.md b/charts/snowplow-iglu-server/README.md index ca05b55..25ec248 100644 --- a/charts/snowplow-iglu-server/README.md +++ b/charts/snowplow-iglu-server/README.md @@ -122,7 +122,7 @@ When `dev_db` is `true` the hook job `-dev-db-user-setup` will be initiated ### AWS (EKS) settings -When `dev_db` is `true` the hook job `-create-dev-db` will be initiated +When `dev_db` and `deploy_rds_into_private_subnet` are both `true` the hook job `-create-dev-db` will be initiated #### TargetGroup binding @@ -154,6 +154,7 @@ You will need to fill these targeted fields: | service.annotations | object | `{}` | Map of annotations to add to the service | | service.aws.targetGroupARN | string | `""` | EC2 TargetGroup ARN to bind the service onto | | service.aws.dev_db | bool | `false` | Whether we deploy for dev db in AWS | +| service.aws.deploy_rds_into_private_subnet | bool | `false` | Whether we deploy into private subnets | | service.aws.secrets.admin_username | string | `""` | The admin username that will be used for the psql command | | service.aws.secrets.admin_password | string | `""` | The admin password that will be used for the psql command | | service.config.database.dbname | string | `""` | Postgres database name | diff --git a/charts/snowplow-iglu-server/templates/iglu-hooks.yaml b/charts/snowplow-iglu-server/templates/iglu-hooks.yaml index 19b7f74..6f382b7 100644 --- a/charts/snowplow-iglu-server/templates/iglu-hooks.yaml +++ b/charts/snowplow-iglu-server/templates/iglu-hooks.yaml @@ -108,6 +108,7 @@ spec: {{- end }} {{- if .Values.service.aws.dev_db }} +{{- if .Values.service.aws.deploy_rds_into_private_subnet }} --- @@ -159,3 +160,4 @@ spec: {{- end }} {{- end }} {{- end }} +{{- end }} diff --git a/charts/snowplow-iglu-server/values-aws.yaml.tmpl b/charts/snowplow-iglu-server/values-aws.yaml.tmpl index c4ad69c..fc0dda7 100644 --- a/charts/snowplow-iglu-server/values-aws.yaml.tmpl +++ b/charts/snowplow-iglu-server/values-aws.yaml.tmpl @@ -32,6 +32,7 @@ service: aws: targetGroupARN: "" + deploy_rds_into_private_subnet: "" dev_db: "" prod_dbname: "" secrets: diff --git a/charts/snowplow-iglu-server/values.yaml b/charts/snowplow-iglu-server/values.yaml index 8859ba7..259ae23 100644 --- a/charts/snowplow-iglu-server/values.yaml +++ b/charts/snowplow-iglu-server/values.yaml @@ -97,6 +97,8 @@ service: targetGroupARN: "" # -- Whether we deploy for dev db dev_db: false + # -- Whether we deploy into private subnets + deploy_rds_into_private_subnet: false prod_dbname: "" secrets: admin_username: "" From fc35a7daf7aa9b73c504a6e874d94ade99847ad4 Mon Sep 17 00:00:00 2001 From: antonis-snowplow Date: Mon, 4 Nov 2024 13:30:43 +0200 Subject: [PATCH 2/5] remov post-upgrade annotiation for helm hook job --- charts/snowplow-iglu-server/README.md | 3 +-- charts/snowplow-iglu-server/templates/iglu-hooks.yaml | 2 -- charts/snowplow-iglu-server/values-aws.yaml.tmpl | 1 - charts/snowplow-iglu-server/values.yaml | 2 -- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/charts/snowplow-iglu-server/README.md b/charts/snowplow-iglu-server/README.md index 25ec248..ca05b55 100644 --- a/charts/snowplow-iglu-server/README.md +++ b/charts/snowplow-iglu-server/README.md @@ -122,7 +122,7 @@ When `dev_db` is `true` the hook job `-dev-db-user-setup` will be initiated ### AWS (EKS) settings -When `dev_db` and `deploy_rds_into_private_subnet` are both `true` the hook job `-create-dev-db` will be initiated +When `dev_db` is `true` the hook job `-create-dev-db` will be initiated #### TargetGroup binding @@ -154,7 +154,6 @@ You will need to fill these targeted fields: | service.annotations | object | `{}` | Map of annotations to add to the service | | service.aws.targetGroupARN | string | `""` | EC2 TargetGroup ARN to bind the service onto | | service.aws.dev_db | bool | `false` | Whether we deploy for dev db in AWS | -| service.aws.deploy_rds_into_private_subnet | bool | `false` | Whether we deploy into private subnets | | service.aws.secrets.admin_username | string | `""` | The admin username that will be used for the psql command | | service.aws.secrets.admin_password | string | `""` | The admin password that will be used for the psql command | | service.config.database.dbname | string | `""` | Postgres database name | diff --git a/charts/snowplow-iglu-server/templates/iglu-hooks.yaml b/charts/snowplow-iglu-server/templates/iglu-hooks.yaml index 6f382b7..19b7f74 100644 --- a/charts/snowplow-iglu-server/templates/iglu-hooks.yaml +++ b/charts/snowplow-iglu-server/templates/iglu-hooks.yaml @@ -108,7 +108,6 @@ spec: {{- end }} {{- if .Values.service.aws.dev_db }} -{{- if .Values.service.aws.deploy_rds_into_private_subnet }} --- @@ -160,4 +159,3 @@ spec: {{- end }} {{- end }} {{- end }} -{{- end }} diff --git a/charts/snowplow-iglu-server/values-aws.yaml.tmpl b/charts/snowplow-iglu-server/values-aws.yaml.tmpl index fc0dda7..c4ad69c 100644 --- a/charts/snowplow-iglu-server/values-aws.yaml.tmpl +++ b/charts/snowplow-iglu-server/values-aws.yaml.tmpl @@ -32,7 +32,6 @@ service: aws: targetGroupARN: "" - deploy_rds_into_private_subnet: "" dev_db: "" prod_dbname: "" secrets: diff --git a/charts/snowplow-iglu-server/values.yaml b/charts/snowplow-iglu-server/values.yaml index 259ae23..8859ba7 100644 --- a/charts/snowplow-iglu-server/values.yaml +++ b/charts/snowplow-iglu-server/values.yaml @@ -97,8 +97,6 @@ service: targetGroupARN: "" # -- Whether we deploy for dev db dev_db: false - # -- Whether we deploy into private subnets - deploy_rds_into_private_subnet: false prod_dbname: "" secrets: admin_username: "" From dbb97cf87c741a9831588ce89617f0b9b334444e Mon Sep 17 00:00:00 2001 From: antonis-snowplow Date: Mon, 4 Nov 2024 13:32:41 +0200 Subject: [PATCH 3/5] Change annotations to deploy hook job only on post-install and not on post-upgrade --- charts/snowplow-iglu-server/templates/iglu-hooks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/snowplow-iglu-server/templates/iglu-hooks.yaml b/charts/snowplow-iglu-server/templates/iglu-hooks.yaml index 19b7f74..d816538 100644 --- a/charts/snowplow-iglu-server/templates/iglu-hooks.yaml +++ b/charts/snowplow-iglu-server/templates/iglu-hooks.yaml @@ -118,7 +118,7 @@ metadata: labels: {{- include "snowplow.labels" $ | nindent 4 }} annotations: - "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook": post-install "helm.sh/hook-delete-policy": hook-succeeded,hook-failed "helm.sh/hook-weight": "1" spec: From 4cedf1574d86bb12dc7830b58a4c40a6afad8c09 Mon Sep 17 00:00:00 2001 From: antonis-snowplow Date: Mon, 4 Nov 2024 13:32:46 +0200 Subject: [PATCH 4/5] Change annotations to deploy hook job only on post-install and not on post-upgrade --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index bdc1d94..64d0b55 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,6 @@ Version 0.1.80 (2024-10-31) --------------------------- -charts/snowplow-iglu-server: Adds condition to deploy hook job only when we use private subnet (closes #205) +charts/snowplow-iglu-server: Change annotations to deploy hook job only on post-install and not on post-upgrade (closes #205) Version 0.1.79 (2024-10-29) --------------------------- From 218692abd02cbfc14a5862d6c3449a4400891d12 Mon Sep 17 00:00:00 2001 From: antonis-snowplow Date: Mon, 4 Nov 2024 18:09:17 +0200 Subject: [PATCH 5/5] remove post-install from Azure hook job --- charts/snowplow-iglu-server/templates/iglu-hooks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/snowplow-iglu-server/templates/iglu-hooks.yaml b/charts/snowplow-iglu-server/templates/iglu-hooks.yaml index d816538..9df850b 100644 --- a/charts/snowplow-iglu-server/templates/iglu-hooks.yaml +++ b/charts/snowplow-iglu-server/templates/iglu-hooks.yaml @@ -58,7 +58,7 @@ metadata: labels: {{- include "snowplow.labels" $ | nindent 4 }} annotations: - "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook": post-install "helm.sh/hook-delete-policy": hook-succeeded,hook-failed "helm.sh/hook-weight": "1" spec: