| 1 |
// Copyright 2019 The Kubernetes Authors. |
| 2 |
// SPDX-License-Identifier: Apache-2.0 |
| 3 |
|
| 4 |
package types |
| 5 |
|
| 6 |
// Image contains an image name, a new name, a new tag or digest, |
| 7 |
// which will replace the original name and tag. |
| 8 |
type Image struct { |
| 9 |
// Name is a tag-less image name. |
| 10 |
Name string `json:"name,omitempty" yaml:"name,omitempty"` |
| 11 |
|
| 12 |
// NewName is the value used to replace the original name. |
| 13 |
NewName string `json:"newName,omitempty" yaml:"newName,omitempty"` |
| 14 |
|
| 15 |
// TagSuffix is the value used to suffix the original tag |
| 16 |
// If Digest and NewTag is present an error is thrown |
| 17 |
TagSuffix string `json:"tagSuffix,omitempty" yaml:"tagSuffix,omitempty"` |
| 18 |
|
| 19 |
// NewTag is the value used to replace the original tag. |
| 20 |
NewTag string `json:"newTag,omitempty" yaml:"newTag,omitempty"` |
| 21 |
|
| 22 |
// Digest is the value used to replace the original image tag. |
| 23 |
// If digest is present NewTag value is ignored. |
| 24 |
Digest string `json:"digest,omitempty" yaml:"digest,omitempty"` |
| 25 |
} |