Skip to content

Commit

Permalink
bump version, update secret and service, update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Chelbsik committed Feb 12, 2024
1 parent ae5365a commit 284cfb2
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 7 deletions.
2 changes: 2 additions & 0 deletions standard-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 0.3.0
* implemented services, ports, readiness probe, volume mounts and resources configuration support at the container level in deployments
2 changes: 1 addition & 1 deletion standard-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: standard-app
description: A Helm chart library by Cloudkite
type: application
version: 0.2.0
version: 0.3.0
maintainters:
- email: [email protected]
name: cloudkite
52 changes: 46 additions & 6 deletions standard-app/templates/configs/externalsecret.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
# deployment secret
{{- if .Values.externalSecret }}

# deployment secrets
{{- range $appName, $appConfig := .Values.apps }}

# deployment container secret
{{- range $containerName, $containerConfig := $appConfig.containers -}}
{{- if $containerConfig.secrets }}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: {{ $containerName }}
labels:
app: {{ $appName }}
product: {{ $.Release.Name }}
{{- with $.Values.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
refreshInterval: 1m
secretStoreRef:
kind: ClusterSecretStore
name: {{ $.Values.externalSecret.secretStoreName }}
target:
name: {{ $containerName }}
creationPolicy: Owner
data:
{{- range $secret := $containerConfig.secrets }}
- secretKey: {{ $secret.secretKey }}
remoteRef:
{{- if eq $.Values.externalSecret.type "gcp" }}
key: {{ $.Release.Name | upper }}_{{ $secret }}
{{- end }}
{{- if eq $.Values.externalSecret.type "vault" }}
key: {{ $.Values.externalSecret.secretPath }}/{{ $.Release.Name }}
property: {{ $secret.property | default $secret.secretKey }}
{{- end }}
{{- end }}
---
{{- end }}
{{- end }}

# deployment global secret
{{- if $appConfig.secrets }}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
Expand All @@ -10,7 +50,7 @@ metadata:
app: {{ if $.Values.pr }}{{ $.Release.Name }}-{{ $appName | trimPrefix $.Release.Name | trimPrefix "-" }}{{ else }}{{ $appName }}{{ end }}
product: {{ $.Release.Name }}
{{- with $.Values.labels }}
{{- toYaml . | nindent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
refreshInterval: {{ $.Values.externalSecret.refreshInterval | default "1m" }}
Expand All @@ -24,13 +64,13 @@ spec:
{{- range $secret := $appConfig.secrets }}
- secretKey: {{ $secret.secretKey }}
remoteRef:
{{- if eq $.Values.externalSecret.type "gcp" }}
{{- if eq $.Values.externalSecret.type "gcp" }}
key: {{ $.Release.Name | upper }}_{{ $secret }}
{{- end }}
{{- if eq $.Values.externalSecret.type "vault" }}
{{- end }}
{{- if eq $.Values.externalSecret.type "vault" }}
key: {{ $.Values.externalSecret.secretPath }}/{{ $.Release.Name }}
property: {{ $secret.property | default $secret.secretKey }}
{{- end }}
{{- end }}
{{- end }}
---
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions standard-app/templates/network/service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# deployment services
{{ range $appName, $appConfig := .Values.apps }}

# deployment container service
{{- if $appConfig.containers }}
{{- range $containerName, $containerConfig := $appConfig.containers }}
{{- if $containerConfig.service }}
Expand All @@ -22,6 +25,8 @@ spec:
app: {{ if $.Values.pr }}{{ $.Release.Name }}-{{ $appName | trimPrefix $.Release.Name | trimPrefix "-" }}{{ else }}{{ $appName }}{{ end }}
{{- end }}
{{- end }}

# deployment global service
{{- else if $appConfig.service }}
apiVersion: v1
kind: Service
Expand All @@ -43,6 +48,9 @@ spec:
app: {{ if $.Values.pr }}{{ $.Release.Name }}-{{ $appName | trimPrefix $.Release.Name | trimPrefix "-" }}{{ else }}{{ $appName }}{{ end }}
{{- end }}
---

# rollout services
# rollout global service
{{- if $appConfig.rollout }}
apiVersion: v1
kind: Service
Expand Down

0 comments on commit 284cfb2

Please sign in to comment.