-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from meisterplan/feature/KNUTH-78681-helm-char…
…t-anpassen KNUTH-78681 Helm Chart anpassen
- Loading branch information
Showing
15 changed files
with
182 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v1 | ||
name: cronjob | ||
description: A generalized cronjob that can access secrets. | ||
version: 1.4.0 | ||
version: 1.5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
{{- if .Values.env.fromSecret }} | ||
apiVersion: "kubernetes-client.io/v1" | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
namespace: {{ .Values.namespace }} | ||
name: {{ .Values.cronJobName }}-external-secret | ||
spec: | ||
backendType: systemManager | ||
roleArn: {{ required "secretsRoleArn must be set!" .Values.secretsRoleArn }} | ||
refreshInterval: "5m" | ||
secretStoreRef: | ||
name: secret-store | ||
kind: SecretStore | ||
data: | ||
{{- range $key, $value := .Values.env.fromSecret }} | ||
- name: "{{ $key }}" | ||
key: "/{{ $.Values.clusterName }}/{{ $value.parameterName }}" | ||
- secretKey: "{{ $key }}" | ||
remoteRef: | ||
key: "/{{ $.Values.clusterName }}/{{ $value.parameterName }}" | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v1 | ||
name: spring-service | ||
description: A generalized deployment for Meisterplan Spring Boot services in Kubernetes. | ||
version: 3.8.0 | ||
version: 3.9.0 |
88 changes: 53 additions & 35 deletions
88
charts/spring-service/templates/pre-deployment/secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,71 @@ | ||
{{- if and .Values.env.springDatasourceFromSecret .Values.env.springDatasourceFromSecretWithRLS }} | ||
{{ fail "You cannot set both springDatasourceFromSecret and springDatasourceFromSecretWithRLS at the same time" }} | ||
{{- end}} | ||
apiVersion: "kubernetes-client.io/v1" | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
namespace: {{ .Values.namespace }} | ||
name: {{ .Values.serviceName }}-external-secret | ||
spec: | ||
backendType: systemManager | ||
roleArn: {{ required "secretsRoleArn must be set!" .Values.secretsRoleArn }} | ||
refreshInterval: "5m" | ||
secretStoreRef: | ||
name: secret-store | ||
kind: SecretStore | ||
data: | ||
- name: "SENTRY_DSN" | ||
key: "/{{ required "clusterName must be set!" .Values.clusterName }}/sentry/dsn-{{ .Values.serviceName }}" | ||
- name: "SERVICE_OAUTH2_PUBLIC_KEY" | ||
key: "/{{ .Values.clusterName }}/authenticorn/public-key" | ||
- secretKey: "SENTRY_DSN" | ||
remoteRef: | ||
key: "/{{ required "clusterName must be set!" .Values.clusterName }}/sentry/dsn-{{ .Values.serviceName }}" | ||
- secretKey: "SERVICE_OAUTH2_PUBLIC_KEY" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/authenticorn/public-key" | ||
{{- if .Values.env.springDatasourceFromSecret }} | ||
- name: "SPRING_DATASOURCE_URL" | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecret }}/jdbc-url" | ||
- name: "SPRING_DATASOURCE_USERNAME" | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecret }}/username" | ||
- name: "SPRING_DATASOURCE_PASSWORD" | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecret }}/password" | ||
- secretKey: "SPRING_DATASOURCE_URL" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecret }}/jdbc-url" | ||
- secretKey: "SPRING_DATASOURCE_USERNAME" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecret }}/username" | ||
- secretKey: "SPRING_DATASOURCE_PASSWORD" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecret }}/password" | ||
{{- else if .Values.env.springDatasourceFromSecretWithRLS }} | ||
- name: "SPRING_DATASOURCE_URL" | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecretWithRLS }}/jdbc-url" | ||
- name: "SPRING_DATASOURCE_USERNAME" | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecretWithRLS }}/rls-username" | ||
- name: "SPRING_DATASOURCE_PASSWORD" | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecretWithRLS }}/rls-password" | ||
- name: "SPRING_FLYWAY_USER" | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecretWithRLS }}/username" | ||
- name: "SPRING_FLYWAY_PASSWORD" | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecretWithRLS }}/password" | ||
- secretKey: "SPRING_DATASOURCE_URL" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecretWithRLS }}/jdbc-url" | ||
- secretKey: "SPRING_DATASOURCE_USERNAME" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecretWithRLS }}/rls-username" | ||
- secretKey: "SPRING_DATASOURCE_PASSWORD" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecretWithRLS }}/rls-password" | ||
- secretKey: "SPRING_FLYWAY_USER" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecretWithRLS }}/username" | ||
- secretKey: "SPRING_FLYWAY_PASSWORD" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/{{ .Values.env.springDatasourceFromSecretWithRLS }}/password" | ||
{{- end }} | ||
{{- if .Values.env.springRabbitMQSecret }} | ||
- name: "SPRING_RABBITMQ_HOST" | ||
key: "/{{ .Values.clusterName }}/rabbitmq/hostname" | ||
- name: "SPRING_RABBITMQ_SSL_ENABLED" | ||
key: "/{{ .Values.clusterName }}/rabbitmq/ssl" | ||
- name: "SPRING_RABBITMQ_USERNAME" | ||
key: "/{{ .Values.clusterName }}/rabbitmq/username" | ||
- name: "SPRING_RABBITMQ_PASSWORD" | ||
key: "/{{ .Values.clusterName }}/rabbitmq/password" | ||
- secretKey: "SPRING_RABBITMQ_HOST" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/rabbitmq/hostname" | ||
- secretKey: "SPRING_RABBITMQ_SSL_ENABLED" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/rabbitmq/ssl" | ||
- secretKey: "SPRING_RABBITMQ_USERNAME" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/rabbitmq/username" | ||
- secretKey: "SPRING_RABBITMQ_PASSWORD" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/rabbitmq/password" | ||
{{- end }} | ||
{{- if .Values.ingress.basicAuthSecretParameterName }} | ||
- name: "auth" | ||
key: "/{{ .Values.clusterName }}/{{ .Values.ingress.basicAuthSecretParameterName }}" | ||
- secretKey: "auth" | ||
remoteRef: | ||
key: "/{{ .Values.clusterName }}/{{ .Values.ingress.basicAuthSecretParameterName }}" | ||
{{- end }} | ||
{{- range $key, $value := .Values.env.fromSecret }} | ||
- name: "{{ $key }}" | ||
key: "/{{ $.Values.clusterName }}/{{ $value.parameterName }}" | ||
- secretKey: "{{ $key }}" | ||
remoteRef: | ||
key: "/{{ $.Values.clusterName }}/{{ $value.parameterName }}" | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 11 additions & 7 deletions
18
tests/cronjob/service-account-cronjob/expected/cronjob/templates/pre-deployment/secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
--- | ||
# Source: cronjob/templates/pre-deployment/secret.yaml | ||
apiVersion: "kubernetes-client.io/v1" | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
namespace: team-superpower | ||
name: simple-job-staging-external-secret | ||
spec: | ||
backendType: systemManager | ||
roleArn: arn:aws:iam::1234567890:role/read-secrets-role-staging-team-superpower | ||
refreshInterval: "5m" | ||
secretStoreRef: | ||
name: secret-store | ||
kind: SecretStore | ||
data: | ||
- name: "AWS_ACCESS_KEY_ID" | ||
key: "/staging/aws/access-key-id" | ||
- name: "THIRD_PARTY_API_KEY" | ||
key: "/staging/third-party/api-key" | ||
- secretKey: "AWS_ACCESS_KEY_ID" | ||
remoteRef: | ||
key: "/staging/aws/access-key-id" | ||
- secretKey: "THIRD_PARTY_API_KEY" | ||
remoteRef: | ||
key: "/staging/third-party/api-key" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 11 additions & 7 deletions
18
tests/cronjob/simple-cronjob/expected/cronjob/templates/pre-deployment/secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
--- | ||
# Source: cronjob/templates/pre-deployment/secret.yaml | ||
apiVersion: "kubernetes-client.io/v1" | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
namespace: team-superpower | ||
name: simple-job-staging-external-secret | ||
spec: | ||
backendType: systemManager | ||
roleArn: arn:aws:iam::1234567890:role/read-secrets-role-staging-team-superpower | ||
refreshInterval: "5m" | ||
secretStoreRef: | ||
name: secret-store | ||
kind: SecretStore | ||
data: | ||
- name: "AWS_ACCESS_KEY_ID" | ||
key: "/staging/aws/access-key-id" | ||
- name: "THIRD_PARTY_API_KEY" | ||
key: "/staging/third-party/api-key" | ||
- secretKey: "AWS_ACCESS_KEY_ID" | ||
remoteRef: | ||
key: "/staging/aws/access-key-id" | ||
- secretKey: "THIRD_PARTY_API_KEY" | ||
remoteRef: | ||
key: "/staging/third-party/api-key" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 41 additions & 27 deletions
68
...ring-service/complex-service/expected/spring-service/templates/pre-deployment/secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,49 @@ | ||
--- | ||
# Source: spring-service/templates/pre-deployment/secret.yaml | ||
apiVersion: "kubernetes-client.io/v1" | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
namespace: team-supercool | ||
name: myservice-external-secret | ||
spec: | ||
backendType: systemManager | ||
roleArn: arn:aws:iam::1234567890:role/read-secrets-role-staging-team-superpower | ||
refreshInterval: "5m" | ||
secretStoreRef: | ||
name: secret-store | ||
kind: SecretStore | ||
data: | ||
- name: "SENTRY_DSN" | ||
key: "/staging/sentry/dsn-myservice" | ||
- name: "SERVICE_OAUTH2_PUBLIC_KEY" | ||
key: "/staging/authenticorn/public-key" | ||
- name: "SPRING_DATASOURCE_URL" | ||
key: "/staging/rds/myservice/jdbc-url" | ||
- name: "SPRING_DATASOURCE_USERNAME" | ||
key: "/staging/rds/myservice/rls-username" | ||
- name: "SPRING_DATASOURCE_PASSWORD" | ||
key: "/staging/rds/myservice/rls-password" | ||
- name: "SPRING_FLYWAY_USER" | ||
key: "/staging/rds/myservice/username" | ||
- name: "SPRING_FLYWAY_PASSWORD" | ||
key: "/staging/rds/myservice/password" | ||
- name: "SPRING_RABBITMQ_HOST" | ||
key: "/staging/rabbitmq/hostname" | ||
- name: "SPRING_RABBITMQ_SSL_ENABLED" | ||
key: "/staging/rabbitmq/ssl" | ||
- name: "SPRING_RABBITMQ_USERNAME" | ||
key: "/staging/rabbitmq/username" | ||
- name: "SPRING_RABBITMQ_PASSWORD" | ||
key: "/staging/rabbitmq/password" | ||
- name: "auth" | ||
key: "/staging/myservice/auth" | ||
- secretKey: "SENTRY_DSN" | ||
remoteRef: | ||
key: "/staging/sentry/dsn-myservice" | ||
- secretKey: "SERVICE_OAUTH2_PUBLIC_KEY" | ||
remoteRef: | ||
key: "/staging/authenticorn/public-key" | ||
- secretKey: "SPRING_DATASOURCE_URL" | ||
remoteRef: | ||
key: "/staging/rds/myservice/jdbc-url" | ||
- secretKey: "SPRING_DATASOURCE_USERNAME" | ||
remoteRef: | ||
key: "/staging/rds/myservice/rls-username" | ||
- secretKey: "SPRING_DATASOURCE_PASSWORD" | ||
remoteRef: | ||
key: "/staging/rds/myservice/rls-password" | ||
- secretKey: "SPRING_FLYWAY_USER" | ||
remoteRef: | ||
key: "/staging/rds/myservice/username" | ||
- secretKey: "SPRING_FLYWAY_PASSWORD" | ||
remoteRef: | ||
key: "/staging/rds/myservice/password" | ||
- secretKey: "SPRING_RABBITMQ_HOST" | ||
remoteRef: | ||
key: "/staging/rabbitmq/hostname" | ||
- secretKey: "SPRING_RABBITMQ_SSL_ENABLED" | ||
remoteRef: | ||
key: "/staging/rabbitmq/ssl" | ||
- secretKey: "SPRING_RABBITMQ_USERNAME" | ||
remoteRef: | ||
key: "/staging/rabbitmq/username" | ||
- secretKey: "SPRING_RABBITMQ_PASSWORD" | ||
remoteRef: | ||
key: "/staging/rabbitmq/password" | ||
- secretKey: "auth" | ||
remoteRef: | ||
key: "/staging/myservice/auth" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.