helm

command
v0.0.1-beta07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

secret

This function generates a Secret resource from a set of given key/value mappings.

Values for each key can be provided verbatim in function configuration or read from a file.

The Secret can also be marked as immutable if desired (see Kubernetes documentation on what immutable Secret resources are).

Usage

apiVersion: kude.kfirs.com/v1alpha2
kind: Pipeline
resources:
  - deployment.yaml
steps:
  - image: ghcr.io/arikkfir/kude/functions/create-secret
    config:
      name: my-secret
      namespace: appX # optional
      immutable: true # optional (default in Kubernetes is false)
      contents:
        - key: foo
          value: bar
        - key: file-foo
          path: FOO.txt

Assuming the file FOO.txt contains file-bar, the pipeline above would add a Secret resource that would look like this:

apiVersion: v1
data:
  file-foo: ZmlsZS1iYXI=
  foo: YmFy
immutable: true
kind: Secret
metadata:
  annotations:
    kude.kfirs.com/previous-name: my-secret
  name: my-secret-248ydjh28y42h3 # made-up hash here, mileage will vary
  namespace: appX

The values in the data map are base64 encoded as required by Kubernetes (this is not encryption!).

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL