Files
kustomize/api/types/image.go
Dipto Chakrabarty a464ed0c59 add tagsuffix to take image tag suffix (#4364)
* add tagsuffix to take image tag suffix

* add comments to warn about specifications

* add test and error handle

* fix indent

* update comment

* fix merge errors and return updates

* update image update and fix example

* fix yamls formats

remove tabs in yamls

fix space in image name

tag error in name

* fix spacing issue

format of yaml

set example as above

* spacing of spec in testing templates

* change to switch case
2022-04-14 10:00:47 -07:00

26 lines
950 B
Go

// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package types
// Image contains an image name, a new name, a new tag or digest,
// which will replace the original name and tag.
type Image struct {
// Name is a tag-less image name.
Name string `json:"name,omitempty" yaml:"name,omitempty"`
// NewName is the value used to replace the original name.
NewName string `json:"newName,omitempty" yaml:"newName,omitempty"`
// TagSuffix is the value used to suffix the original tag
// If Digest and NewTag is present an error is thrown
TagSuffix string `json:"tagSuffix,omitempty" yaml:"tagSuffix,omitempty"`
// NewTag is the value used to replace the original tag.
NewTag string `json:"newTag,omitempty" yaml:"newTag,omitempty"`
// Digest is the value used to replace the original image tag.
// If digest is present NewTag value is ignored.
Digest string `json:"digest,omitempty" yaml:"digest,omitempty"`
}