Skip to content

Commit

Permalink
Create Secret chart with sample values.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
PastNullInfinity committed Apr 1, 2020
1 parent b23a8be commit 7a6d1f4
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/secrets/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
21 changes: 21 additions & 0 deletions charts/secrets/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v2
name: secrets
description: Chart for templating secrets

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.16.0
11 changes: 11 additions & 0 deletions charts/secrets/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
secrets:
- name: mongodb
namespace: default
secrets:
MONGO_USER: test
MONGO_PASSWORD: letmein
- name: postgresql
namespace: default
secrets:
POSTGRES_ROOT_PASSWORD: letmein
POSTGRES_ROOT_USERNAME: test
14 changes: 14 additions & 0 deletions charts/secrets/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- range .Values.secrets -}}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .name }}
namespace: {{ .namespace }}
data:
{{- range $key, $val := .secrets }}
{{$key}}: {{$val|b32enc}}
{{ end -}}
type: Opaque
{{ end }}

0 comments on commit 7a6d1f4

Please sign in to comment.