Documentation
¶
Index ¶
- Variables
- func AutoscaleWindow(m *metav1.ObjectMeta) string
- func ConcurrencyTarget(m *metav1.ObjectMeta) *int
- func ConcurrencyTargetUtilization(m *metav1.ObjectMeta) *int
- func ContainerOfRevisionSpec(revisionSpec *servingv1.RevisionSpec) (*corev1.Container, error)
- func ContainerOfRevisionTemplate(template *servingv1.RevisionTemplateSpec) (*corev1.Container, error)
- func FreezeImageToDigest(template *servingv1.RevisionTemplateSpec, baseRevision *servingv1.Revision) error
- func GenerateRevisionName(nameTempl string, service *servingv1.Service) (string, error)
- func Port(revisionSpec *servingv1.RevisionSpec) *int32
- func SetUserImageAnnot(template *servingv1.RevisionTemplateSpec)
- func UnsetUserImageAnnot(template *servingv1.RevisionTemplateSpec)
- func UpdateAutoscaleWindow(template *servingv1.RevisionTemplateSpec, window string) error
- func UpdateConcurrencyLimit(template *servingv1.RevisionTemplateSpec, limit int64) error
- func UpdateConcurrencyTarget(template *servingv1.RevisionTemplateSpec, target int) error
- func UpdateConcurrencyUtilization(template *servingv1.RevisionTemplateSpec, target int) error
- func UpdateLabels(labelsMap map[string]string, add map[string]string, remove []string) map[string]string
- func UpdateMaxScale(template *servingv1.RevisionTemplateSpec, max int) error
- func UpdateMinScale(template *servingv1.RevisionTemplateSpec, min int) error
- func UpdateRevisionTemplateAnnotation(template *servingv1.RevisionTemplateSpec, annotation string, value string) error
- func UpdateRevisionTemplateAnnotations(template *servingv1.RevisionTemplateSpec, toUpdate map[string]string, ...) error
- func UpdateServiceAnnotations(service *servingv1.Service, toUpdate map[string]string, toRemove []string) error
- func UserImage(m *metav1.ObjectMeta) string
- type Scaling
- type VolumeSourceType
Constants ¶
This section is empty.
Variables ¶
var ( UserImageAnnotationKey = "client.knative.dev/user-image" ApiTooOldError = errors.New("the service is using too old of an API format for the operation") )
Functions ¶
func AutoscaleWindow ¶ added in v0.12.0
func AutoscaleWindow(m *metav1.ObjectMeta) string
func ConcurrencyTarget ¶ added in v0.10.0
func ConcurrencyTarget(m *metav1.ObjectMeta) *int
func ConcurrencyTargetUtilization ¶ added in v0.13.2
func ConcurrencyTargetUtilization(m *metav1.ObjectMeta) *int
func ContainerOfRevisionSpec ¶
func ContainerOfRevisionSpec(revisionSpec *servingv1.RevisionSpec) (*corev1.Container, error)
func ContainerOfRevisionTemplate ¶
func ContainerOfRevisionTemplate(template *servingv1.RevisionTemplateSpec) (*corev1.Container, error)
func FreezeImageToDigest ¶
func FreezeImageToDigest(template *servingv1.RevisionTemplateSpec, baseRevision *servingv1.Revision) error
FreezeImageToDigest sets the image on the template to the image digest of the base revision.
func GenerateRevisionName ¶
GenerateRevisionName returns an automatically-generated name suitable for the next revision of the given service.
func Port ¶ added in v0.10.0
func Port(revisionSpec *servingv1.RevisionSpec) *int32
func SetUserImageAnnot ¶
func SetUserImageAnnot(template *servingv1.RevisionTemplateSpec)
SetUserImageAnnot sets the user image annotation if the image isn't by-digest already.
func UnsetUserImageAnnot ¶
func UnsetUserImageAnnot(template *servingv1.RevisionTemplateSpec)
UnsetUserImageAnnot removes the user image annotation
func UpdateAutoscaleWindow ¶ added in v0.12.0
func UpdateAutoscaleWindow(template *servingv1.RevisionTemplateSpec, window string) error
UpdateAutoscaleWindow updates the autoscale window annotation
func UpdateConcurrencyLimit ¶
func UpdateConcurrencyLimit(template *servingv1.RevisionTemplateSpec, limit int64) error
UpdateConcurrencyLimit updates container concurrency limit
func UpdateConcurrencyTarget ¶
func UpdateConcurrencyTarget(template *servingv1.RevisionTemplateSpec, target int) error
UpdateConcurrencyTarget updates container concurrency annotation
func UpdateConcurrencyUtilization ¶ added in v0.13.2
func UpdateConcurrencyUtilization(template *servingv1.RevisionTemplateSpec, target int) error
UpdateConcurrencyUtilization updates container target utilization percentage annotation
func UpdateLabels ¶
func UpdateLabels(labelsMap map[string]string, add map[string]string, remove []string) map[string]string
UpdateLabels updates the labels by adding items from `add` then removing any items from `remove`
func UpdateMaxScale ¶
func UpdateMaxScale(template *servingv1.RevisionTemplateSpec, max int) error
UpdateMaxScale updates max scale annotation
func UpdateMinScale ¶
func UpdateMinScale(template *servingv1.RevisionTemplateSpec, min int) error
UpdateMinScale updates min scale annotation
func UpdateRevisionTemplateAnnotation ¶
func UpdateRevisionTemplateAnnotation(template *servingv1.RevisionTemplateSpec, annotation string, value string) error
UpdateRevisionTemplateAnnotation updates an annotation for the given Revision Template. Also validates the autoscaling annotation values
func UpdateRevisionTemplateAnnotations ¶ added in v0.18.0
func UpdateRevisionTemplateAnnotations(template *servingv1.RevisionTemplateSpec, toUpdate map[string]string, toRemove []string) error
UpdateRevisionTemplateAnnotations updates annotations for the given Revision Template. Also validates the autoscaling annotation values
func UpdateServiceAnnotations ¶ added in v0.18.0
func UpdateServiceAnnotations(service *servingv1.Service, toUpdate map[string]string, toRemove []string) error
UpdateServiceAnnotations updates annotations for the given Service Metadata.
func UserImage ¶ added in v0.10.0
func UserImage(m *metav1.ObjectMeta) string
Types ¶
type Scaling ¶ added in v0.10.0
func ScalingInfo ¶ added in v0.10.0
func ScalingInfo(m *metav1.ObjectMeta) (*Scaling, error)
type VolumeSourceType ¶ added in v0.10.0
type VolumeSourceType int
VolumeSourceType is a type standing for enumeration of ConfigMap and Secret
const ( ConfigMapVolumeSourceType VolumeSourceType = iota SecretVolumeSourceType PortFormatErr = "" /* 154-byte string literal not displayed */ )
Enumeration of volume source types: ConfigMap or Secret
func (VolumeSourceType) String ¶ added in v0.10.0
func (vt VolumeSourceType) String() string