From 3fdaa2e90399ac4ed7c3375ce4a765fe45cd01bf Mon Sep 17 00:00:00 2001 From: Jingfang Liu Date: Thu, 19 Jul 2018 13:25:42 -0700 Subject: [PATCH] Add ImageTags in kustomization type --- pkg/types/kustomization.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkg/types/kustomization.go b/pkg/types/kustomization.go index 52e5a4963..136c366c5 100644 --- a/pkg/types/kustomization.go +++ b/pkg/types/kustomization.go @@ -68,6 +68,12 @@ type Kustomization struct { // Variables which will be substituted at runtime Vars []Var `json:"vars,omitempty" yaml:"vars,omitempty"` + + // If set to true, all images need to have tags + RequireTag bool `json:"requireTag,omitempty" yaml:"requireTag,omitempty"` + + // ImageTags is a list of ImageTag for changing image tags + ImageTags []ImageTag `json:"imageTags,omitempty" yaml:"imageTags,omitempty"` } // ConfigMapArgs contains the metadata of how to generate a configmap. @@ -136,3 +142,12 @@ type DataSources struct { // i.e. a Docker .env file or a .ini file. EnvSource string `json:"env,omitempty" yaml:"env,omitempty"` } + +// ImageTag contains an image and a new tag, which will replace the original tag. +type ImageTag struct { + // Name is a tag-less image name. + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + // NewTag is the value to use in replacing the original tag. + NewTag string `json:"newTag,omitempty" yaml:"newTag,omitempty"` +}