Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 398 Bytes

NOTES.md

File metadata and controls

20 lines (17 loc) · 398 Bytes

TIP TO REPLACE VALUES IN YAML WITH BASE64 EQUIVALENT

Given a base secrets.yaml.tmpl file

apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: kafka-users
  namespace: confluent
data:
  plain-users.json: PLAIN_USERS_JSON
sed "s/PLAIN_USERS_JSON/`cat kafka-plain-users.json|base64 -w0`/g" secrets.yml.tmpl | \
sed <chain the next replacement> | \
 > secrets.yaml