From 76622d36194b6219abd02518be2b21ccaa03db6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20B=C3=A4hler?= Date: Wed, 20 Jan 2021 15:39:48 +0100 Subject: [PATCH] Fix BundleExtras & Contribution (#23) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Oliver Bähler --- CONTRIBUTING.md | 14 ++++++------- charts/manifests/Chart.yaml | 6 +++--- charts/manifests/README.md | 2 +- .../manifests/templates/_bundleExtras.tpl | 20 +++++++++---------- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e7362272..87012fe8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -172,13 +172,13 @@ Changes on a chart must be documented in a chart specific changelog. For every n ``` artifacthub.io/changes: | - * **[Added]**: Something New was added - * **[Changed]**: Changed Something within this chart - * **[Changed]**: Changed Something else within this chart - * **[Deprecated]**: Something deprecated - * **[Removed]**: Something was removed - * **[Fixed]**: Something was fixed - * **[Security]**: Some Security Patch was included + - **[Added]**: Something New was added + - **[Changed]**: Changed Something within this chart + - **[Changed]**: Changed Something else within this chart + - **[Deprecated]**: Something deprecated + - **[Removed]**: Something was removed + - **[Fixed]**: Something was fixed + - **[Security]**: Some Security Patch was included ``` # Workflows diff --git a/charts/manifests/Chart.yaml b/charts/manifests/Chart.yaml index 7f82d58d..995e4586 100644 --- a/charts/manifests/Chart.yaml +++ b/charts/manifests/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: manifests description: "Bedag's Manifest chart. Library full of basic kubernetes manifests." type: library -version: 0.4.4 +version: 0.4.5 icon: "https://www.bedag.ch/wGlobal/wGlobal/layout/images/logo.svg" keywords: - Bedag @@ -20,6 +20,6 @@ dependencies: annotations: artifacthub.io/containsSecurityUpdates: "false" artifacthub.io/prerelease: "true" + artifacthub.io/license: Apache-2.0 artifacthub.io/changes: | - * **[Fixed]**: Cronjob render correct manifest structure - * **[Fixed]**: Cronjob use Default API `batch/v1beta1` + - **[Fixes]**: Bundle Extras allowed for all resources within bundle diff --git a/charts/manifests/README.md b/charts/manifests/README.md index 19b72d29..3f488032 100644 --- a/charts/manifests/README.md +++ b/charts/manifests/README.md @@ -1,6 +1,6 @@ # Manifests Library -![Version: 0.4.4](https://img.shields.io/badge/Version-0.4.4-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) +![Version: 0.4.5](https://img.shields.io/badge/Version-0.4.5-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) This library's purpose is to have more flexibility as chart author but at the same time have kubernetes manifests managed in a central library. This way you can avoid big surprises when Kubernetes has breaking changes in any of their APIs. Currently we support a base set of resources. Resources may be added as soon as we see or get a request that there's a need for it. This chart is still under development and testing, since it's rather complex. Feel free to use it. Our goal is to get it as reliable as possible. diff --git a/charts/manifests/templates/manifests/templates/_bundleExtras.tpl b/charts/manifests/templates/manifests/templates/_bundleExtras.tpl index eefaed88..4b981142 100644 --- a/charts/manifests/templates/manifests/templates/_bundleExtras.tpl +++ b/charts/manifests/templates/manifests/templates/_bundleExtras.tpl @@ -17,15 +17,14 @@ limitations under the License. */}} {{- define "bedag-lib.template.bundleExtras" -}} {{- if and .values .context }} - {{- if (has .type (list "deployment" "pod" "statefulset" "daemonset")) }} - {{- if .values.serviceAccount }} - {{- if and .values.serviceAccount.enabled .values.serviceAccount.create }} + {{- if .values.serviceAccount }} + {{- if and .values.serviceAccount.enabled .values.serviceAccount.create }} ---{{- include "bedag-lib.manifest.serviceaccount" (dict "values" .values.serviceAccount "context" .context) | nindent 0 }} - {{- end }} {{- end }} - {{- if .values.environment }} - {{- $environment := .values.environment }} - {{- if (include "bedag-lib.utils.environment.hasSecrets" $environment) }} + {{- end }} + {{- if .values.environment }} + {{- $environment := .values.environment }} + {{- if (include "bedag-lib.utils.environment.hasSecrets" $environment) }} --- apiVersion: v1 kind: Secret @@ -34,10 +33,9 @@ metadata: labels: {{- include "lib.utils.common.labels" (dict "labels" .values.labels "context" .context)| nindent 4 }} type: Opaque data: - {{- range $environment }} - {{- if .secret }} - {{- .name | nindent 2 }}: {{ include "lib.utils.strings.template" (dict "value" .value "context" $.context) | b64enc }} - {{- end }} + {{- range $environment }} + {{- if .secret }} + {{- .name | nindent 2 }}: {{ include "lib.utils.strings.template" (dict "value" .value "context" $.context) | b64enc }} {{- end }} {{- end }} {{- end }}