-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix #116 - workload.annotations and fix to serviceAccountName for hashicorp vault * #117 - Change fullimagename to fullname for cluster service * #117, #116 - Fixing bug with use of clusterIdentifier and image names * Prepping for release 0.5.2 * #116 - Support annotations at workload * #116 - Need to check to see if annotations are defined * Release 0.5.2 - final checkin
- Loading branch information
Showing
20 changed files
with
306 additions
and
106 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
File renamed without changes.
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{{/********************************************************************** | ||
** pinglib.annotations.vault snippet | ||
**********************************************************************/}} | ||
{{- define "pinglib.annotations.vault" -}} | ||
{{- if .enabled }} | ||
{{- with .hashicorp -}} | ||
#---------------------------------------------------- | ||
# Annotation secrets prepared for hashicorp vault secrets | ||
# for use in Deployment, StatefulSet, Pod resources. | ||
# | ||
# https://www.vaultproject.io/docs/platform/k8s/injector/annotations | ||
# | ||
vault.hashicorp.com/agent-pre-populate-only: {{ ( index . "pre-populate-only" ) | quote }} | ||
vault.hashicorp.com/agent-inject: "true" | ||
vault.hashicorp.com/agent-init-first: "true" | ||
vault.hashicorp.com/role: {{ ( index . "role" ) | quote }} | ||
vault.hashicorp.com/log-level: {{ ( index . "log-level" ) | quote }} | ||
vault.hashicorp.com/preserve-secret-case: {{ ( index . "preserve-secret-case" ) | quote }} | ||
vault.hashicorp.com/secret-volume-path: {{ index . "secret-volume-path" | quote }} | ||
#---------------------------------------------------- | ||
# Additional Vault configuration annotations | ||
{{- range $annotation, $val := .annotations }} | ||
vault.hashicorp.com/{{ $annotation }}: {{ $val | quote }} | ||
{{- end -}} | ||
#---------------------------------------------------- | ||
marker.hello.1: world2 | ||
{{- $defaultSecretVolumePath := index .annotations "secret-volume-path" }} | ||
{{- $secretPrefix := .secretPrefix }} | ||
{{- range $secretName, $secretVal := .secrets }} | ||
#------------ Processing Secret | ||
{{- $fullSecret := printf "%s%s" $secretPrefix $secretName }} | ||
debug.json.{{ $secretName }}: {{ $secretVal }} | ||
{{- range $keyName, $keyVal := $secretVal }} | ||
marker.hello.{{ $keyName }}: {{ $keyVal }} | ||
{{- $keyPath := default $defaultSecretVolumePath $keyVal.path }} | ||
{{- $keyFile := default $keyName (required "A 'vault.hashicorp.secrets.{secret-name}.file' is required for each secret" $keyVal.file) }} | ||
{{- $keyFile := ternary (printf "%s.json" $keyFile) $keyFile (eq $keyName "to-json") }} | ||
vault.hashicorp.com/secret-volume-path-{{ $keyFile }}: {{ $keyPath }} | ||
vault.hashicorp.com/agent-inject-secret-{{ $keyFile }}: {{ $fullSecret | quote }} | ||
{{- if eq $keyName "to-json" }} | ||
vault.hashicorp.com/agent-inject-template-{{ $keyFile}}: | | ||
{{ printf "{{- with secret %s }}" ($fullSecret | quote) }} | ||
{{ printf "{{ .Data.data | toJSONPretty }}" }} | ||
{{ printf "{{- end }}" }} | ||
{{- else }} | ||
vault.hashicorp.com/agent-inject-template-{{ $keyFile }}: | | ||
{{ printf "{{- with secret %s }}" ($fullSecret | quote) }} | ||
{{ printf "{{- index .Data.data %s }}" ($keyName | quote) }} | ||
{{ printf "{{- end }}" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- 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
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.