Documentation ¶
Index ¶
- func AddBothBoolFlags(f *pflag.FlagSet, p *bool, name, short string, value bool, usage string)
- func AddBothBoolFlagsUnhidden(f *pflag.FlagSet, p *bool, name, short string, value bool, usage string)
- func FirstCharToLower(s string) string
- func InvertUsage(usage string) string
- func ReconcileBoolFlags(f *pflag.FlagSet) error
- func UpdateContainerArg(spec *corev1.PodSpec, arg []string) error
- func UpdateContainerCommand(spec *corev1.PodSpec, command []string) error
- func UpdateContainerPort(spec *corev1.PodSpec, port string) error
- func UpdateContainers(spec *corev1.PodSpec, containers []corev1.Container)
- func UpdateEnvFrom(spec *corev1.PodSpec, toUpdate []string, toRemove []string) error
- func UpdateEnvVars(spec *corev1.PodSpec, allArgs []string, envToUpdate *util.OrderedMap, ...) error
- func UpdateImage(spec *corev1.PodSpec, image string) error
- func UpdateImagePullPolicy(spec *corev1.PodSpec, imagePullPolicy string) error
- func UpdateImagePullSecrets(spec *corev1.PodSpec, pullsecrets string)
- func UpdateLivenessProbe(spec *corev1.PodSpec, probeString string) error
- func UpdateLivenessProbeOpts(spec *corev1.PodSpec, probeString string) error
- func UpdateReadinessProbe(spec *corev1.PodSpec, probeString string) error
- func UpdateReadinessProbeOpts(spec *corev1.PodSpec, probeString string) error
- func UpdateResources(spec *corev1.PodSpec, resources corev1.ResourceRequirements, ...) error
- func UpdateServiceAccountName(spec *corev1.PodSpec, serviceAccountName string)
- func UpdateUser(spec *corev1.PodSpec, user int64) error
- func UpdateVolumeMountsAndVolumes(spec *corev1.PodSpec, mountsToUpdate *util.OrderedMap, mountsToRemove []string, ...) error
- type MountInfo
- type VolumeSourceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBothBoolFlags ¶
AddBothBoolFlags adds the given flag in both `--foo` and `--no-foo` variants. If you do this, make sure you call ReconcileBoolFlags later to catch errors and set the relationship between the flag values. Only the flag that does the non-default behavior is visible; the other is hidden.
func AddBothBoolFlagsUnhidden ¶
func AddBothBoolFlagsUnhidden(f *pflag.FlagSet, p *bool, name, short string, value bool, usage string)
AddBothBoolFlagsUnhidden is just like AddBothBoolFlags but shows both flags.
func FirstCharToLower ¶
FirstCharToLower converts first char in given string to lowercase
func InvertUsage ¶
InvertUsage inverts the usage string with prefix "Do not"
func ReconcileBoolFlags ¶
ReconcileBoolFlags sets the value of the all the "--foo" flags based on "--no-foo" if provided, and returns an error if both were provided or an explicit value of false was provided to either (as that's confusing).
func UpdateContainerArg ¶
UpdateContainerArg updates container with a given argument
func UpdateContainerCommand ¶
UpdateContainerCommand updates container with a given argument
func UpdateContainerPort ¶
UpdateContainerPort updates container with a given name:port
func UpdateContainers ¶
UpdateContainers updates the containers array with additional ones provided from file or os.Stdin
func UpdateEnvFrom ¶
UpdateEnvFrom updates envFrom
func UpdateEnvVars ¶
func UpdateEnvVars(spec *corev1.PodSpec, allArgs []string, envToUpdate *util.OrderedMap, envToRemove []string, envValueFromToUpdate *util.OrderedMap, envValueFromToRemove []string, envFileName string, envValueFileToUpdate *util.OrderedMap, envValueFileToRemove []string, ) error
UpdateEnvVars gives the configuration all the env var values listed in the given map of vars. Does not touch any environment variables not mentioned, but it can add new env vars and change the values of existing ones.
func UpdateImage ¶
UpdateImage a given image
func UpdateImagePullPolicy ¶
UpdateImagePullPolicy updates the pull policy for the given revision template
func UpdateImagePullSecrets ¶
UpdateImagePullSecrets updates the image pull secrets used for the corresponding knative service
func UpdateLivenessProbe ¶
UpdateLivenessProbe updates container liveness probe based on provided string
func UpdateLivenessProbeOpts ¶
UpdateLivenessProbeOpts updates container liveness probe commons options based on provided string
func UpdateReadinessProbe ¶
UpdateReadinessProbe updates container readiness probe based on provided string
func UpdateReadinessProbeOpts ¶
UpdateReadinessProbeOpts updates container readiness probe commons options based on provided string
func UpdateResources ¶
func UpdateResources(spec *corev1.PodSpec, resources corev1.ResourceRequirements, requestsToRemove, limitsToRemove []string) error
UpdateResources updates container resources for given revision spec
func UpdateServiceAccountName ¶
UpdateServiceAccountName updates the service account name used for the corresponding knative service
func UpdateUser ¶
UpdateUser updates container with a given user id
func UpdateVolumeMountsAndVolumes ¶
func UpdateVolumeMountsAndVolumes(spec *corev1.PodSpec, mountsToUpdate *util.OrderedMap, mountsToRemove []string, volumesToUpdate *util.OrderedMap, volumesToRemove []string) error
UpdateVolumeMountsAndVolumes updates the configuration for volume mounts and volumes.
Types ¶
type VolumeSourceType ¶
type VolumeSourceType int
VolumeSourceType is a type standing for enumeration of ConfigMap and Secret
const ( ConfigMapVolumeSourceType VolumeSourceType = iota SecretVolumeSourceType EmptyDirVolumeSourceType PVCVolumeSourceType PortFormatErr = "" /* 154-byte string literal not displayed */ )
Enumeration of volume source types: ConfigMap or Secret
func (VolumeSourceType) String ¶
func (vt VolumeSourceType) String() string