...

Source file src/sigs.k8s.io/kustomize/kyaml/fn/framework/example/doc.go

Documentation: sigs.k8s.io/kustomize/kyaml/fn/framework/example

     1  // Copyright 2019 The Kubernetes Authors.
     2  // SPDX-License-Identifier: Apache-2.0
     3  
     4  // Package main contains an example using the framework.
     5  // The example annotates all resources in the input with the value provided as a flag,
     6  // and adds all resources in the templates/ directory to the list.
     7  //
     8  // To execute the function, run:
     9  //
    10  //   $ cat testdata/basic/input.yaml | go run ./main.go --value=foo
    11  //
    12  // Alternatively, you can provide the value via a config file instead of a flag:
    13  //
    14  //   $ go run ./main.go testdata/basic/config.yaml testdata/basic/input.yaml
    15  //
    16  // To generate the Dockerfile for the function image run:
    17  //
    18  //   $ go run ./main.go gen ./
    19  package main
    20  

View as plain text