From c557a3b2e2da60a59a082c838b8041488aa9f8dd Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Mon, 3 Oct 2022 10:54:26 +0300 Subject: [PATCH 01/14] feat: add AWS_SECRET_NAME ref for helm --- mender/templates/deployments-deploy.yaml | 5 +++++ mender/templates/secret-s3-artifacts.yaml | 8 +++++--- mender/values.yaml | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mender/templates/deployments-deploy.yaml b/mender/templates/deployments-deploy.yaml index 969d1ec8..287e270d 100644 --- a/mender/templates/deployments-deploy.yaml +++ b/mender/templates/deployments-deploy.yaml @@ -105,6 +105,11 @@ spec: - prefix: DEPLOYMENTS_ secretRef: name: s3-artifacts + {{ - if not .Values.global.s3.AWS_SECRET_NAME }} + - prefix: DEPLOYMENTS_ + secretRef: + name: { { .Values.global.s3.AWS_SECRET_NAME } } + {{- end }} {{- if .Values.global.image.username }} imagePullSecrets: diff --git a/mender/templates/secret-s3-artifacts.yaml b/mender/templates/secret-s3-artifacts.yaml index 9b8e6c9d..910cfc28 100644 --- a/mender/templates/secret-s3-artifacts.yaml +++ b/mender/templates/secret-s3-artifacts.yaml @@ -17,8 +17,10 @@ data: {{- end }} AWS_BUCKET: {{ .Values.global.s3.AWS_BUCKET | b64enc }} AWS_REGION: {{ .Values.global.s3.AWS_REGION | b64enc }} -{{- if and (not .Values.global.s3.AWS_SERVICE_ACCOUNT_NAME) .Values.global.s3.AWS_ACCESS_KEY_ID }} - AWS_AUTH_KEY: {{ .Values.global.s3.AWS_ACCESS_KEY_ID | b64enc }} - AWS_AUTH_SECRET: {{ .Values.global.s3.AWS_SECRET_ACCESS_KEY | b64enc }} +{{ - if not .Values.global.s3.AWS_SECRET_NAME }} + {{- if and (not .Values.global.s3.AWS_SERVICE_ACCOUNT_NAME) .Values.global.s3.AWS_ACCESS_KEY_ID }} + AWS_AUTH_KEY: {{ .Values.global.s3.AWS_ACCESS_KEY_ID | b64enc }} + AWS_AUTH_SECRET: {{ .Values.global.s3.AWS_SECRET_ACCESS_KEY | b64enc }} + {{- end }} {{- end }} AWS_FORCE_PATH_STYLE: {{ .Values.global.s3.AWS_FORCE_PATH_STYLE | b64enc }} diff --git a/mender/values.yaml b/mender/values.yaml index 9297ca7c..3dcd274f 100644 --- a/mender/values.yaml +++ b/mender/values.yaml @@ -20,6 +20,7 @@ global: AWS_FORCE_PATH_STYLE: "true" AWS_TAG_ARTIFACT: "true" AWS_SERVICE_ACCOUNT_NAME: "" + AWS_SECRET_NAME: "" smtp: EMAIL_SENDER: root@localhost SMTP_ADDRESS: "localhost:25" From 5124e6eafdeb0bc32046cde04ec63ca71190150b Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Mon, 3 Oct 2022 11:54:45 +0300 Subject: [PATCH 02/14] refactor: change chart --- mender/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mender/Chart.yaml b/mender/Chart.yaml index ed0f6952..9834ab9f 100644 --- a/mender/Chart.yaml +++ b/mender/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "3.4.0" description: Mender is a robust and secure way to update all your software and deploy your IoT devices at scale with support for customization name: mender -version: "3.4.0" +version: "3.5.0" keywords: - mender - iot @@ -10,7 +10,7 @@ keywords: home: https://mender.io icon: https://github.com/mendersoftware/mender/raw/master/mender_logo.png sources: -- https://github.com/mendersoftware/mender-helm +- https://github.com/techno-link/mender-helm maintainers: - name: Northern.tech AS email: contact@northern.tech From b215bc50688ae302fa71ec1d8d7db220b500be13 Mon Sep 17 00:00:00 2001 From: Veselin Uzunov <42930404+VeselinUzunov@users.noreply.github.com> Date: Mon, 3 Oct 2022 13:33:04 +0300 Subject: [PATCH 03/14] Create index.yaml --- .github/workflows/index.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/index.yaml diff --git a/.github/workflows/index.yaml b/.github/workflows/index.yaml new file mode 100644 index 00000000..785cb726 --- /dev/null +++ b/.github/workflows/index.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +entries: + mender: + - apiVersion: v1 + appVersion: 3.4.0 + created: "2022-10-03T13:30:10.415681+03:00" + description: Mender is a robust and secure way to update all your software and + deploy your IoT devices at scale with support for customization + digest: 809e44b71d98abd04a8273f525303f81e32e12a5b50e193d6be0e76bcdb48992 + home: https://mender.io + icon: https://github.com/mendersoftware/mender/raw/master/mender_logo.png + keywords: + - mender + - iot + - ota + maintainers: + - email: contact@northern.tech + name: Northern.tech AS + url: https://northern.tech + name: mender + sources: + - https://github.com/techno-link/mender-helm + urls: + - https://github.com/techno-link/mender-helm/mender-3.5.0.tgz + version: 3.5.0 +generated: "2022-10-03T13:30:10.414146+03:00" From d546fe035dfd4011e739f87ca3a9c08c6ab9463f Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Mon, 3 Oct 2022 13:35:21 +0300 Subject: [PATCH 04/14] refactor: fix linting errors --- mender/templates/deployments-deploy.yaml | 2 +- mender/templates/secret-s3-artifacts.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mender/templates/deployments-deploy.yaml b/mender/templates/deployments-deploy.yaml index 287e270d..589d408e 100644 --- a/mender/templates/deployments-deploy.yaml +++ b/mender/templates/deployments-deploy.yaml @@ -105,7 +105,7 @@ spec: - prefix: DEPLOYMENTS_ secretRef: name: s3-artifacts - {{ - if not .Values.global.s3.AWS_SECRET_NAME }} + {{- if .Values.global.s3.AWS_SECRET_NAME }} - prefix: DEPLOYMENTS_ secretRef: name: { { .Values.global.s3.AWS_SECRET_NAME } } diff --git a/mender/templates/secret-s3-artifacts.yaml b/mender/templates/secret-s3-artifacts.yaml index 910cfc28..e85971f8 100644 --- a/mender/templates/secret-s3-artifacts.yaml +++ b/mender/templates/secret-s3-artifacts.yaml @@ -17,7 +17,7 @@ data: {{- end }} AWS_BUCKET: {{ .Values.global.s3.AWS_BUCKET | b64enc }} AWS_REGION: {{ .Values.global.s3.AWS_REGION | b64enc }} -{{ - if not .Values.global.s3.AWS_SECRET_NAME }} +{{- if not .Values.global.s3.AWS_SECRET_NAME }} {{- if and (not .Values.global.s3.AWS_SERVICE_ACCOUNT_NAME) .Values.global.s3.AWS_ACCESS_KEY_ID }} AWS_AUTH_KEY: {{ .Values.global.s3.AWS_ACCESS_KEY_ID | b64enc }} AWS_AUTH_SECRET: {{ .Values.global.s3.AWS_SECRET_ACCESS_KEY | b64enc }} From a3b0b046f23495f13de5f1a74f564fac436037a1 Mon Sep 17 00:00:00 2001 From: Veselin Uzunov <42930404+VeselinUzunov@users.noreply.github.com> Date: Mon, 3 Oct 2022 15:55:30 +0300 Subject: [PATCH 05/14] Delete .github/workflows directory --- .github/workflows/index.yaml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/workflows/index.yaml diff --git a/.github/workflows/index.yaml b/.github/workflows/index.yaml deleted file mode 100644 index 785cb726..00000000 --- a/.github/workflows/index.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: v1 -entries: - mender: - - apiVersion: v1 - appVersion: 3.4.0 - created: "2022-10-03T13:30:10.415681+03:00" - description: Mender is a robust and secure way to update all your software and - deploy your IoT devices at scale with support for customization - digest: 809e44b71d98abd04a8273f525303f81e32e12a5b50e193d6be0e76bcdb48992 - home: https://mender.io - icon: https://github.com/mendersoftware/mender/raw/master/mender_logo.png - keywords: - - mender - - iot - - ota - maintainers: - - email: contact@northern.tech - name: Northern.tech AS - url: https://northern.tech - name: mender - sources: - - https://github.com/techno-link/mender-helm - urls: - - https://github.com/techno-link/mender-helm/mender-3.5.0.tgz - version: 3.5.0 -generated: "2022-10-03T13:30:10.414146+03:00" From 2a0e0e8cc1abf59cdfc27b9fbcef7f13c0b34340 Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Tue, 4 Oct 2022 09:23:20 +0300 Subject: [PATCH 06/14] refactor: format --- Makefile | 4 ++-- mender/templates/deployments-deploy.yaml | 6 +++--- mender/templates/secret-s3-artifacts.yaml | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 58e997ce..17bc0926 100644 --- a/Makefile +++ b/Makefile @@ -25,11 +25,11 @@ lint: ## Lint the mender helm package .PHONY: package package: ## Create the mender helm package helm package $(NAME) - helm repo index --url https://charts.mender.io . + helm repo index --url https://veselinuzunov.github.io/charts/ . .PHONY: upload upload: package ## Upload the mender helm package to the charts repository - curl --data-binary "@$(NAME)-$(VERSION).tgz" http://charts.mender.io/api/charts + curl --data-binary "@$(NAME)-$(VERSION).tgz" https://veselinuzunov.github.io/charts/ .PHONY: template template: ## Render the mender helm chart template diff --git a/mender/templates/deployments-deploy.yaml b/mender/templates/deployments-deploy.yaml index 589d408e..9e4ea173 100644 --- a/mender/templates/deployments-deploy.yaml +++ b/mender/templates/deployments-deploy.yaml @@ -105,11 +105,11 @@ spec: - prefix: DEPLOYMENTS_ secretRef: name: s3-artifacts - {{- if .Values.global.s3.AWS_SECRET_NAME }} +{{- if .Values.global.s3.AWS_SECRET_NAME }} - prefix: DEPLOYMENTS_ secretRef: - name: { { .Values.global.s3.AWS_SECRET_NAME } } - {{- end }} + name: {{ .Values.global.s3.AWS_SECRET_NAME }} +{{- end}} {{- if .Values.global.image.username }} imagePullSecrets: diff --git a/mender/templates/secret-s3-artifacts.yaml b/mender/templates/secret-s3-artifacts.yaml index e85971f8..a92bba32 100644 --- a/mender/templates/secret-s3-artifacts.yaml +++ b/mender/templates/secret-s3-artifacts.yaml @@ -18,9 +18,9 @@ data: AWS_BUCKET: {{ .Values.global.s3.AWS_BUCKET | b64enc }} AWS_REGION: {{ .Values.global.s3.AWS_REGION | b64enc }} {{- if not .Values.global.s3.AWS_SECRET_NAME }} - {{- if and (not .Values.global.s3.AWS_SERVICE_ACCOUNT_NAME) .Values.global.s3.AWS_ACCESS_KEY_ID }} - AWS_AUTH_KEY: {{ .Values.global.s3.AWS_ACCESS_KEY_ID | b64enc }} - AWS_AUTH_SECRET: {{ .Values.global.s3.AWS_SECRET_ACCESS_KEY | b64enc }} - {{- end }} +{{- if and (not .Values.global.s3.AWS_SERVICE_ACCOUNT_NAME) .Values.global.s3.AWS_ACCESS_KEY_ID }} + AWS_AUTH_KEY: {{ .Values.global.s3.AWS_ACCESS_KEY_ID | b64enc }} + AWS_AUTH_SECRET: {{ .Values.global.s3.AWS_SECRET_ACCESS_KEY | b64enc }} +{{- end }} {{- end }} AWS_FORCE_PATH_STYLE: {{ .Values.global.s3.AWS_FORCE_PATH_STYLE | b64enc }} From ca6dda0511fd6aa942c9664e7a81279307e27f3e Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Tue, 4 Oct 2022 10:44:45 +0300 Subject: [PATCH 07/14] refactor: format resources --- mender/templates/deployments-deploy.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mender/templates/deployments-deploy.yaml b/mender/templates/deployments-deploy.yaml index 9e4ea173..1e1a8575 100644 --- a/mender/templates/deployments-deploy.yaml +++ b/mender/templates/deployments-deploy.yaml @@ -53,9 +53,7 @@ spec: image: {{ .Values.deployments.image.registry | default "docker.io" }}/{{ .Values.deployments.image.repository | default "mendersoftware/deployments" }}:{{ .Values.deployments.image.tag }} {{- end }} imagePullPolicy: {{ .Values.deployments.image.imagePullPolicy }} - resources: -{{ toYaml .Values.deployments.resources | indent 10 }} - + resources: {{ toYaml .Values.deployments.resources | indent 10 }} {{- if .Values.deployments.automigrate }} args: ["server", "--automigrate"] {{- else -}} From 001b8fdbdea3b435ac7bf3a8044d04f7cada6473 Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Tue, 4 Oct 2022 11:18:37 +0300 Subject: [PATCH 08/14] refactor: format resources --- mender/templates/deployments-deploy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mender/templates/deployments-deploy.yaml b/mender/templates/deployments-deploy.yaml index 1e1a8575..8498a8e5 100644 --- a/mender/templates/deployments-deploy.yaml +++ b/mender/templates/deployments-deploy.yaml @@ -53,7 +53,10 @@ spec: image: {{ .Values.deployments.image.registry | default "docker.io" }}/{{ .Values.deployments.image.repository | default "mendersoftware/deployments" }}:{{ .Values.deployments.image.tag }} {{- end }} imagePullPolicy: {{ .Values.deployments.image.imagePullPolicy }} - resources: {{ toYaml .Values.deployments.resources | indent 10 }} + {{- with .Values.deployments.resources }} + resources: + {{ tpl (toYaml .) $ | nindent 10 }} + {{- end }} {{- if .Values.deployments.automigrate }} args: ["server", "--automigrate"] {{- else -}} From ffe562485799283ec73d206473c127220b174649 Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Wed, 5 Oct 2022 11:21:39 +0300 Subject: [PATCH 09/14] refactor: format resources --- Makefile | 2 +- mender/templates/deployments-deploy.yaml | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 17bc0926..24f8d79a 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ upload: package ## Upload the mender helm package to the charts repository .PHONY: template template: ## Render the mender helm chart template - helm template $(NAME)/ -f values-enterprise.yaml > $(NAME)-$(VERSION).yaml + helm template -f $(NAME) values.yaml > ent.yaml .PHONY: test test: ## Run tests diff --git a/mender/templates/deployments-deploy.yaml b/mender/templates/deployments-deploy.yaml index 8498a8e5..e68434f1 100644 --- a/mender/templates/deployments-deploy.yaml +++ b/mender/templates/deployments-deploy.yaml @@ -53,10 +53,8 @@ spec: image: {{ .Values.deployments.image.registry | default "docker.io" }}/{{ .Values.deployments.image.repository | default "mendersoftware/deployments" }}:{{ .Values.deployments.image.tag }} {{- end }} imagePullPolicy: {{ .Values.deployments.image.imagePullPolicy }} - {{- with .Values.deployments.resources }} resources: - {{ tpl (toYaml .) $ | nindent 10 }} - {{- end }} + {{ toYaml .Values.deployments.resources | indent 10 }} {{- if .Values.deployments.automigrate }} args: ["server", "--automigrate"] {{- else -}} From 8f522043d78269847c8708d825db086637fb3188 Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Wed, 5 Oct 2022 11:36:21 +0300 Subject: [PATCH 10/14] refactor: format resources --- mender/templates/deployments-deploy.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mender/templates/deployments-deploy.yaml b/mender/templates/deployments-deploy.yaml index e68434f1..8498a8e5 100644 --- a/mender/templates/deployments-deploy.yaml +++ b/mender/templates/deployments-deploy.yaml @@ -53,8 +53,10 @@ spec: image: {{ .Values.deployments.image.registry | default "docker.io" }}/{{ .Values.deployments.image.repository | default "mendersoftware/deployments" }}:{{ .Values.deployments.image.tag }} {{- end }} imagePullPolicy: {{ .Values.deployments.image.imagePullPolicy }} + {{- with .Values.deployments.resources }} resources: - {{ toYaml .Values.deployments.resources | indent 10 }} + {{ tpl (toYaml .) $ | nindent 10 }} + {{- end }} {{- if .Values.deployments.automigrate }} args: ["server", "--automigrate"] {{- else -}} From ee59848b00905cb55c9fd93cba2b2b36b29b311d Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Wed, 5 Oct 2022 11:38:19 +0300 Subject: [PATCH 11/14] refactor: revert template --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 24f8d79a..17bc0926 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ upload: package ## Upload the mender helm package to the charts repository .PHONY: template template: ## Render the mender helm chart template - helm template -f $(NAME) values.yaml > ent.yaml + helm template $(NAME)/ -f values-enterprise.yaml > $(NAME)-$(VERSION).yaml .PHONY: test test: ## Run tests From e80b37277ec6873b475ea6026fd1a2232e8f2dcf Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Wed, 5 Oct 2022 13:09:56 +0300 Subject: [PATCH 12/14] refactor: revert deployment --- mender/templates/deployments-deploy.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mender/templates/deployments-deploy.yaml b/mender/templates/deployments-deploy.yaml index 8498a8e5..092fb6cb 100644 --- a/mender/templates/deployments-deploy.yaml +++ b/mender/templates/deployments-deploy.yaml @@ -53,10 +53,9 @@ spec: image: {{ .Values.deployments.image.registry | default "docker.io" }}/{{ .Values.deployments.image.repository | default "mendersoftware/deployments" }}:{{ .Values.deployments.image.tag }} {{- end }} imagePullPolicy: {{ .Values.deployments.image.imagePullPolicy }} - {{- with .Values.deployments.resources }} resources: - {{ tpl (toYaml .) $ | nindent 10 }} - {{- end }} +{{ toYaml .Values.deployments.resources | indent 10 }} + {{- if .Values.deployments.automigrate }} args: ["server", "--automigrate"] {{- else -}} @@ -112,6 +111,7 @@ spec: name: {{ .Values.global.s3.AWS_SECRET_NAME }} {{- end}} + {{- if .Values.global.image.username }} imagePullSecrets: - name: docker-registry From 75a93a80e6f1163ba6c1dbfdafa50c5e5512432b Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Wed, 5 Oct 2022 14:11:53 +0300 Subject: [PATCH 13/14] refactor: revert chart --- mender/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mender/Chart.yaml b/mender/Chart.yaml index 9834ab9f..ed0f6952 100644 --- a/mender/Chart.yaml +++ b/mender/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "3.4.0" description: Mender is a robust and secure way to update all your software and deploy your IoT devices at scale with support for customization name: mender -version: "3.5.0" +version: "3.4.0" keywords: - mender - iot @@ -10,7 +10,7 @@ keywords: home: https://mender.io icon: https://github.com/mendersoftware/mender/raw/master/mender_logo.png sources: -- https://github.com/techno-link/mender-helm +- https://github.com/mendersoftware/mender-helm maintainers: - name: Northern.tech AS email: contact@northern.tech From 90f825342afcad2841782303ac2e9c5f6711291b Mon Sep 17 00:00:00 2001 From: veselinuzunov Date: Thu, 6 Oct 2022 10:06:33 +0300 Subject: [PATCH 14/14] refactor: revert make --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 17bc0926..58e997ce 100644 --- a/Makefile +++ b/Makefile @@ -25,11 +25,11 @@ lint: ## Lint the mender helm package .PHONY: package package: ## Create the mender helm package helm package $(NAME) - helm repo index --url https://veselinuzunov.github.io/charts/ . + helm repo index --url https://charts.mender.io . .PHONY: upload upload: package ## Upload the mender helm package to the charts repository - curl --data-binary "@$(NAME)-$(VERSION).tgz" https://veselinuzunov.github.io/charts/ + curl --data-binary "@$(NAME)-$(VERSION).tgz" http://charts.mender.io/api/charts .PHONY: template template: ## Render the mender helm chart template