Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Kind is the kind for the kustomize function.
Kind = "ImagePrefix"
)
Variables ¶
View Source
var DefaultFsSlice = []types.FieldSpec{ { Path: "spec/template/spec/containers[]/image", }, { Path: "spec/template/spec/initContainers[]/image", }, { Path: "spec/jobTemplate/spec/template/spec/containers[]/image", }, { Gvk: resid.Gvk{ Kind: "MLSBackend", }, Path: "spec/runtime/image", }, { Gvk: resid.Gvk{ Kind: "ConfigMap", }, Path: "data/IO_SIDECAR_IMAGE", }, { Gvk: resid.Gvk{ Kind: "ConfigMap", }, Path: "data/SERVER_IMAGE", }, { Gvk: resid.Gvk{ Kind: "ConfigMap", }, Path: "data/REDIS_IMAGE", }, { Gvk: resid.Gvk{ Kind: "ConfigMap", }, Path: "data/MLT_TRAINER_IMAGE", }, { Gvk: resid.Gvk{ Kind: "ConfigMap", }, Path: "data/connection_pooler_image", }, { Gvk: resid.Gvk{ Kind: "ConfigMap", }, Path: "data/docker_image", }, { Gvk: resid.Gvk{ Kind: "ConfigMap", }, Path: "data/logical_backup_docker_image", }, { Gvk: resid.Gvk{ Kind: "Kafka", }, Path: "spec/entityOperator/topicOperator/image", }, { Gvk: resid.Gvk{ Kind: "Kafka", }, Path: "spec/entityOperator/userOperator/image", }, { Gvk: resid.Gvk{ Kind: "Kafka", }, Path: "spec/kafka/image", }, { Gvk: resid.Gvk{ Kind: "Kafka", }, Path: "spec/zookeeper/image", }, { Gvk: resid.Gvk{ Kind: "Kafka", }, Path: "spec/kafkaExporter/image", }, { Gvk: resid.Gvk{ Kind: "ConfigMap", }, Path: "data/ABBA_ABEX_IMAGE", }, { Gvk: resid.Gvk{ Kind: "ConfigMap", }, Path: "data/ONPREM_IMAGE", }, { Gvk: resid.Gvk{ Kind: "ConfigMap", }, Path: "data/ABBA_APP_IMAGE", }, { Gvk: resid.Gvk{ Kind: "RedisCluster", }, Path: "spec/kubernetesConfig/image", }, { Gvk: resid.Gvk{ Kind: "RedisCluster", }, Path: "spec/redisExporter/image", }, { Gvk: resid.Gvk{ Kind: "Redis", }, Path: "spec/kubernetesConfig/image", }, { Gvk: resid.Gvk{ Kind: "Redis", }, Path: "spec/redisExporter/image", }, }
DefaultFsSlice are the default FieldSpecs for resources that should be transformed N.B. I couldn't find a reference in the kustomize codebase with a list of the default values. I think that's because kustomize uses a legacy filter to handle default fields. see: https://github.com/kubernetes-sigs/kustomize/blob/57206a628d8096824eded1e574bc85547245fcf8/api/builtins/ImageTagTransformer.go#L28 I think the new kyaml filter is only used to handle custom kinds.
Functions ¶
Types ¶
type ImageMapping ¶
ImageMapping represents the mapping from a source to a destination repo.
type ImagePrefixFn ¶
type ImagePrefixFn struct { // Kind is the API name. Kind string `yaml:"kind"` // APIVersion is the API version. Must be examples.kpt.dev/v1alpha1 APIVersion string `yaml:"apiVersion"` // Metadata defines instance metadata. Metadata v1alpha1.Metadata `yaml:"metadata"` // Spec defines the desired declarative configuration. Spec Spec `yaml:"spec"` }
ImagePrefixFn implements the ImagePrefix Function
type Spec ¶
type Spec struct { ImageMappings []ImageMapping `yaml:"imageMappings"` // FsSlice contains the FieldSpecs to locate an image field, // e.g. Path: "spec/myContainers[]/image" FsSlice types.FsSlice `json:"fieldSpecs,omitempty" yaml:"fieldSpecs,omitempty"` }
Spec is the spec for the kustomize function.
Click to show internal directories.
Click to hide internal directories.