Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions example/kubernetes/using-secrets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ldap-secret.yaml
14 changes: 14 additions & 0 deletions example/kubernetes/using-secrets/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ldap-secret.yaml: example
$(eval PWD := $(shell pwd -P))
$(eval ENV_DIR := $(shell echo ${PWD}/environment))
ENV_YAML=$(shell ${ENV_DIR}/file-to-base64.sh ${ENV_DIR}/my-env.yaml) \
ENV_STARTUP_YAML=$(shell ${ENV_DIR}/file-to-base64.sh ${ENV_DIR}/my-env.startup.yaml) \
envsubst < ldap-secret.tpl > ldap-secret.yaml

example: environment/my-env.startup.yaml environment/my-env.yaml

environment/my-env.startup.yaml:
cd environment ; cp my-env.startup.yaml.example my-env.startup.yaml

environment/my-env.yaml:
cd environment ; cp my-env.yaml.example my-env.yaml
7 changes: 7 additions & 0 deletions example/kubernetes/using-secrets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Generating ldap-secret.yaml

`make example`

Then edit the yaml files in the environment directory to have the desired paraneters, and then make the secret file:

`make ldap-secret.yaml`
2 changes: 2 additions & 0 deletions example/kubernetes/using-secrets/environment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
my-env.startup.yaml
my-env.yaml
11 changes: 11 additions & 0 deletions example/kubernetes/using-secrets/ldap-secret.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: "v1"
kind: "List"
items:
- kind: "Secret"
apiVersion: "v1"
metadata:
name: "ldap-secret"
data:
# files in environment/* converted into base64 with file-to-base64.sh
env.yaml: "$ENV_YAML"
env.startup.yaml: "$ENV_STARTUP_YAML"
11 changes: 0 additions & 11 deletions example/kubernetes/using-secrets/ldap-secret.yaml

This file was deleted.