configmap

package
v0.43.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Example (WithData)
ctx := testlog.NewContext()
images := map[string]string{}
cfg := map[string]interface{}{
	"name":      "foo",
	"namespace": "bar",
}

WithData("ca.crt", "x\nx")(cfg)
WithLabels(map[string]string{"a": "b"})(cfg)

files, err := manifest.ExecuteYAML(ctx, yaml, images, cfg)
if err != nil {
	panic(err)
}

manifest.OutputYAML(os.Stdout, files)
Output:

apiVersion: v1
kind: ConfigMap
metadata:
  name: foo
  namespace: bar
  labels:
    a: "b"
data:
  ca.crt: |-
    x
    x

Index

Examples

Constants

This section is empty.

Variables

View Source
var WithLabels = manifest.WithLabels

Functions

func Install

func Install(name string, ns string, opts ...manifest.CfgFn) feature.StepFn

Install will create a configmap resource and will load the configmap to the context.

func WithData added in v0.42.0

func WithData(key, value string) manifest.CfgFn

Types

This section is empty.

Jump to

Keyboard shortcuts

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