mirror of
https://github.com/holos-run/holos.git
synced 2026-03-12 15:59:01 +00:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c20872c92f | ||
|
|
ecce1f797e | ||
|
|
0d7033d063 | ||
|
|
84bf0c8945 | ||
|
|
466b48966a | ||
|
|
84bcf4b2d0 | ||
|
|
bdd76c78a7 | ||
|
|
95e0dfa44a | ||
|
|
90d70a6afa | ||
|
|
d0c2d85246 | ||
|
|
7e637b4647 | ||
|
|
9bc96d0783 | ||
|
|
ac72ac5ace | ||
|
|
51f22443f3 | ||
|
|
e98ee28f74 | ||
|
|
b16d3459f7 | ||
|
|
f41b883dce | ||
|
|
572281914c | ||
|
|
4cdf9d2dae | ||
|
|
29a4fae059 | ||
|
|
fd306aae76 | ||
|
|
e4875fe3a6 | ||
|
|
5bf2b85036 | ||
|
|
0771bd6b6c | ||
|
|
f647a4a76c | ||
|
|
37d5eac841 | ||
|
|
3e991d9026 | ||
|
|
a6dab235f5 | ||
|
|
f4c85736a2 | ||
|
|
f9fef06c55 | ||
|
|
039fb056c0 | ||
|
|
cde4380049 | ||
|
|
0d4f36333f | ||
|
|
69916a13ab | ||
|
|
9739fc6471 | ||
|
|
1d3b9340ab | ||
|
|
bb06fa742a | ||
|
|
7dce445c1a | ||
|
|
a3c26bc30a |
1
.github/workflows/release.yaml
vendored
1
.github/workflows/release.yaml
vendored
@@ -1,7 +1,6 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
# Run only against tags
|
||||
tags:
|
||||
|
||||
@@ -4,14 +4,14 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"github.com/holos-run/holos/pkg/cli"
|
||||
"github.com/holos-run/holos/pkg/config"
|
||||
"github.com/holos-run/holos/pkg/holos"
|
||||
"github.com/holos-run/holos/pkg/wrapper"
|
||||
"log/slog"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cfg := config.New()
|
||||
cfg := holos.New()
|
||||
slog.SetDefault(cfg.Logger())
|
||||
ctx := context.Background()
|
||||
if err := cli.New(cfg).ExecuteContext(ctx); err != nil {
|
||||
|
||||
@@ -0,0 +1,378 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-secrets-eso/prod-secrets-eso.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"struct"
|
||||
)
|
||||
|
||||
// ClusterExternalSecret is the Schema for the
|
||||
// clusterexternalsecrets API.
|
||||
#ClusterExternalSecret: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object.
|
||||
// Servers should convert recognized schemas to the latest
|
||||
// internal value, and
|
||||
// may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "external-secrets.io/v1beta1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents.
|
||||
// Servers may infer this from the endpoint the client submits
|
||||
// requests to.
|
||||
// Cannot be updated.
|
||||
// In CamelCase.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "ClusterExternalSecret"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace?: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// ClusterExternalSecretSpec defines the desired state of
|
||||
// ClusterExternalSecret.
|
||||
spec!: #ClusterExternalSecretSpec
|
||||
}
|
||||
|
||||
// ClusterExternalSecretSpec defines the desired state of
|
||||
// ClusterExternalSecret.
|
||||
#ClusterExternalSecretSpec: {
|
||||
// The metadata of the external secrets to be created
|
||||
externalSecretMetadata?: {
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// The name of the external secrets to be created defaults to the
|
||||
// name of the ClusterExternalSecret
|
||||
externalSecretName?: string
|
||||
|
||||
// The spec for the ExternalSecrets to be created
|
||||
externalSecretSpec: {
|
||||
// Data defines the connection between the Kubernetes Secret keys
|
||||
// and the Provider data
|
||||
data?: [...{
|
||||
// RemoteRef points to the remote secret and defines
|
||||
// which secret (version/property/..) to fetch.
|
||||
remoteRef: {
|
||||
// Used to define a conversion Strategy
|
||||
conversionStrategy?: "Default" | "Unicode" | *"Default"
|
||||
|
||||
// Used to define a decoding Strategy
|
||||
decodingStrategy?: "Auto" | "Base64" | "Base64URL" | "None" | *"None"
|
||||
|
||||
// Key is the key used in the Provider, mandatory
|
||||
key: string
|
||||
|
||||
// Policy for fetching tags/labels from provider secrets, possible
|
||||
// options are Fetch, None. Defaults to None
|
||||
metadataPolicy?: "None" | "Fetch" | *"None"
|
||||
|
||||
// Used to select a specific property of the Provider value (if a
|
||||
// map), if supported
|
||||
property?: string
|
||||
|
||||
// Used to select a specific version of the Provider value, if
|
||||
// supported
|
||||
version?: string
|
||||
}
|
||||
|
||||
// SecretKey defines the key in which the controller stores
|
||||
// the value. This is the key in the Kind=Secret
|
||||
secretKey: string
|
||||
|
||||
// SourceRef allows you to override the source
|
||||
// from which the value will pulled from.
|
||||
sourceRef?: struct.MaxFields(1) & {
|
||||
// GeneratorRef points to a generator custom resource.
|
||||
//
|
||||
//
|
||||
// Deprecated: The generatorRef is not implemented in .data[].
|
||||
// this will be removed with v1.
|
||||
generatorRef?: {
|
||||
// Specify the apiVersion of the generator resource
|
||||
apiVersion?: string | *"generators.external-secrets.io/v1alpha1"
|
||||
|
||||
// Specify the Kind of the resource, e.g. Password, ACRAccessToken
|
||||
// etc.
|
||||
kind: string
|
||||
|
||||
// Specify the name of the generator resource
|
||||
name: string
|
||||
}
|
||||
|
||||
// SecretStoreRef defines which SecretStore to fetch the
|
||||
// ExternalSecret data.
|
||||
storeRef?: {
|
||||
// Kind of the SecretStore resource (SecretStore or
|
||||
// ClusterSecretStore)
|
||||
// Defaults to `SecretStore`
|
||||
kind?: string
|
||||
|
||||
// Name of the SecretStore resource
|
||||
name: string
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// DataFrom is used to fetch all properties from a specific
|
||||
// Provider data
|
||||
// If multiple entries are specified, the Secret keys are merged
|
||||
// in the specified order
|
||||
dataFrom?: [...{
|
||||
// Used to extract multiple key/value pairs from one secret
|
||||
// Note: Extract does not support sourceRef.Generator or
|
||||
// sourceRef.GeneratorRef.
|
||||
extract?: {
|
||||
// Used to define a conversion Strategy
|
||||
conversionStrategy?: "Default" | "Unicode" | *"Default"
|
||||
|
||||
// Used to define a decoding Strategy
|
||||
decodingStrategy?: "Auto" | "Base64" | "Base64URL" | "None" | *"None"
|
||||
|
||||
// Key is the key used in the Provider, mandatory
|
||||
key: string
|
||||
|
||||
// Policy for fetching tags/labels from provider secrets, possible
|
||||
// options are Fetch, None. Defaults to None
|
||||
metadataPolicy?: "None" | "Fetch" | *"None"
|
||||
|
||||
// Used to select a specific property of the Provider value (if a
|
||||
// map), if supported
|
||||
property?: string
|
||||
|
||||
// Used to select a specific version of the Provider value, if
|
||||
// supported
|
||||
version?: string
|
||||
}
|
||||
|
||||
// Used to find secrets based on tags or regular expressions
|
||||
// Note: Find does not support sourceRef.Generator or
|
||||
// sourceRef.GeneratorRef.
|
||||
find?: {
|
||||
// Used to define a conversion Strategy
|
||||
conversionStrategy?: "Default" | "Unicode" | *"Default"
|
||||
|
||||
// Used to define a decoding Strategy
|
||||
decodingStrategy?: "Auto" | "Base64" | "Base64URL" | "None" | *"None"
|
||||
name?: {
|
||||
// Finds secrets base
|
||||
regexp?: string
|
||||
}
|
||||
|
||||
// A root path to start the find operations.
|
||||
path?: string
|
||||
|
||||
// Find secrets based on tags.
|
||||
tags?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Used to rewrite secret Keys after getting them from the secret
|
||||
// Provider
|
||||
// Multiple Rewrite operations can be provided. They are applied
|
||||
// in a layered order (first to last)
|
||||
rewrite?: [...{
|
||||
// Used to rewrite with regular expressions.
|
||||
// The resulting key will be the output of a regexp.ReplaceAll
|
||||
// operation.
|
||||
regexp?: {
|
||||
// Used to define the regular expression of a re.Compiler.
|
||||
source: string
|
||||
|
||||
// Used to define the target pattern of a ReplaceAll operation.
|
||||
target: string
|
||||
}
|
||||
transform?: {
|
||||
// Used to define the template to apply on the secret name.
|
||||
// `.value ` will specify the secret name in the template.
|
||||
template: string
|
||||
}
|
||||
}]
|
||||
|
||||
// SourceRef points to a store or generator
|
||||
// which contains secret values ready to use.
|
||||
// Use this in combination with Extract or Find pull values out of
|
||||
// a specific SecretStore.
|
||||
// When sourceRef points to a generator Extract or Find is not
|
||||
// supported.
|
||||
// The generator returns a static map of values
|
||||
sourceRef?: struct.MaxFields(1) & {
|
||||
// GeneratorRef points to a generator custom resource.
|
||||
generatorRef?: {
|
||||
// Specify the apiVersion of the generator resource
|
||||
apiVersion?: string | *"generators.external-secrets.io/v1alpha1"
|
||||
|
||||
// Specify the Kind of the resource, e.g. Password, ACRAccessToken
|
||||
// etc.
|
||||
kind: string
|
||||
|
||||
// Specify the name of the generator resource
|
||||
name: string
|
||||
}
|
||||
|
||||
// SecretStoreRef defines which SecretStore to fetch the
|
||||
// ExternalSecret data.
|
||||
storeRef?: {
|
||||
// Kind of the SecretStore resource (SecretStore or
|
||||
// ClusterSecretStore)
|
||||
// Defaults to `SecretStore`
|
||||
kind?: string
|
||||
|
||||
// Name of the SecretStore resource
|
||||
name: string
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// RefreshInterval is the amount of time before the values are
|
||||
// read again from the SecretStore provider
|
||||
// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"
|
||||
// May be set to zero to fetch and create it once. Defaults to 1h.
|
||||
refreshInterval?: string | *"1h"
|
||||
|
||||
// SecretStoreRef defines which SecretStore to fetch the
|
||||
// ExternalSecret data.
|
||||
secretStoreRef?: {
|
||||
// Kind of the SecretStore resource (SecretStore or
|
||||
// ClusterSecretStore)
|
||||
// Defaults to `SecretStore`
|
||||
kind?: string
|
||||
|
||||
// Name of the SecretStore resource
|
||||
name: string
|
||||
}
|
||||
|
||||
// ExternalSecretTarget defines the Kubernetes Secret to be
|
||||
// created
|
||||
// There can be only one target per ExternalSecret.
|
||||
target?: {
|
||||
// CreationPolicy defines rules on how to create the resulting
|
||||
// Secret
|
||||
// Defaults to 'Owner'
|
||||
creationPolicy?: "Owner" | "Orphan" | "Merge" | "None" | *"Owner"
|
||||
|
||||
// DeletionPolicy defines rules on how to delete the resulting
|
||||
// Secret
|
||||
// Defaults to 'Retain'
|
||||
deletionPolicy?: "Delete" | "Merge" | "Retain" | *"Retain"
|
||||
|
||||
// Immutable defines if the final secret will be immutable
|
||||
immutable?: bool
|
||||
|
||||
// Name defines the name of the Secret resource to be managed
|
||||
// This field is immutable
|
||||
// Defaults to the .metadata.name of the ExternalSecret resource
|
||||
name?: string
|
||||
|
||||
// Template defines a blueprint for the created Secret resource.
|
||||
template?: {
|
||||
data?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// EngineVersion specifies the template engine version
|
||||
// that should be used to compile/execute the
|
||||
// template specified in .data and .templateFrom[].
|
||||
engineVersion?: "v1" | "v2" | *"v2"
|
||||
mergePolicy?: "Replace" | "Merge" | *"Replace"
|
||||
|
||||
// ExternalSecretTemplateMetadata defines metadata fields for the
|
||||
// Secret blueprint.
|
||||
metadata?: {
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
templateFrom?: [...{
|
||||
configMap?: {
|
||||
items: [...{
|
||||
key: string
|
||||
templateAs?: "Values" | "KeysAndValues" | *"Values"
|
||||
}]
|
||||
name: string
|
||||
}
|
||||
literal?: string
|
||||
secret?: {
|
||||
items: [...{
|
||||
key: string
|
||||
templateAs?: "Values" | "KeysAndValues" | *"Values"
|
||||
}]
|
||||
name: string
|
||||
}
|
||||
target?: "Data" | "Annotations" | "Labels" | *"Data"
|
||||
}]
|
||||
type?: string
|
||||
}
|
||||
} | *{
|
||||
creationPolicy: "Owner"
|
||||
deletionPolicy: "Retain"
|
||||
}
|
||||
}
|
||||
|
||||
// The labels to select by to find the Namespaces to create the
|
||||
// ExternalSecrets in.
|
||||
namespaceSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn,
|
||||
// the values array must be non-empty. If the operator is Exists
|
||||
// or DoesNotExist,
|
||||
// the values array must be empty. This array is replaced during a
|
||||
// strategic
|
||||
// merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels
|
||||
// map is equivalent to an element of matchExpressions, whose key
|
||||
// field is "key", the
|
||||
// operator is "In", and the values array contains only "value".
|
||||
// The requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Choose namespaces by name. This field is ORed with anything
|
||||
// that NamespaceSelector ends up choosing.
|
||||
namespaces?: [...string]
|
||||
|
||||
// The time in which the controller should reconcile its objects
|
||||
// and recheck namespaces for labels.
|
||||
refreshTime?: string
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,168 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-secrets-eso/prod-secrets-eso.gen.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"struct"
|
||||
)
|
||||
|
||||
// ExternalSecret is the Schema for the external-secrets API.
|
||||
#ExternalSecret: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object.
|
||||
// Servers should convert recognized schemas to the latest
|
||||
// internal value, and
|
||||
// may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "external-secrets.io/v1alpha1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents.
|
||||
// Servers may infer this from the endpoint the client submits
|
||||
// requests to.
|
||||
// Cannot be updated.
|
||||
// In CamelCase.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "ExternalSecret"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// ExternalSecretSpec defines the desired state of ExternalSecret.
|
||||
spec!: #ExternalSecretSpec
|
||||
}
|
||||
|
||||
// ExternalSecretSpec defines the desired state of ExternalSecret.
|
||||
#ExternalSecretSpec: {
|
||||
// Data defines the connection between the Kubernetes Secret keys
|
||||
// and the Provider data
|
||||
data?: [...{
|
||||
// ExternalSecretDataRemoteRef defines Provider data location.
|
||||
remoteRef: {
|
||||
// Used to define a conversion Strategy
|
||||
conversionStrategy?: "Default" | "Unicode" | *"Default"
|
||||
|
||||
// Key is the key used in the Provider, mandatory
|
||||
key: string
|
||||
|
||||
// Used to select a specific property of the Provider value (if a
|
||||
// map), if supported
|
||||
property?: string
|
||||
|
||||
// Used to select a specific version of the Provider value, if
|
||||
// supported
|
||||
version?: string
|
||||
}
|
||||
secretKey: string
|
||||
}]
|
||||
|
||||
// DataFrom is used to fetch all properties from a specific
|
||||
// Provider data
|
||||
// If multiple entries are specified, the Secret keys are merged
|
||||
// in the specified order
|
||||
dataFrom?: [...{
|
||||
// Used to define a conversion Strategy
|
||||
conversionStrategy?: "Default" | "Unicode" | *"Default"
|
||||
|
||||
// Key is the key used in the Provider, mandatory
|
||||
key: string
|
||||
|
||||
// Used to select a specific property of the Provider value (if a
|
||||
// map), if supported
|
||||
property?: string
|
||||
|
||||
// Used to select a specific version of the Provider value, if
|
||||
// supported
|
||||
version?: string
|
||||
}]
|
||||
|
||||
// RefreshInterval is the amount of time before the values are
|
||||
// read again from the SecretStore provider
|
||||
// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"
|
||||
// May be set to zero to fetch and create it once. Defaults to 1h.
|
||||
refreshInterval?: string | *"1h"
|
||||
|
||||
// SecretStoreRef defines which SecretStore to fetch the
|
||||
// ExternalSecret data.
|
||||
secretStoreRef: {
|
||||
// Kind of the SecretStore resource (SecretStore or
|
||||
// ClusterSecretStore)
|
||||
// Defaults to `SecretStore`
|
||||
kind?: string
|
||||
|
||||
// Name of the SecretStore resource
|
||||
name: string
|
||||
}
|
||||
|
||||
// ExternalSecretTarget defines the Kubernetes Secret to be
|
||||
// created
|
||||
// There can be only one target per ExternalSecret.
|
||||
target: {
|
||||
// CreationPolicy defines rules on how to create the resulting
|
||||
// Secret
|
||||
// Defaults to 'Owner'
|
||||
creationPolicy?: "Owner" | "Merge" | "None" | *"Owner"
|
||||
|
||||
// Immutable defines if the final secret will be immutable
|
||||
immutable?: bool
|
||||
|
||||
// Name defines the name of the Secret resource to be managed
|
||||
// This field is immutable
|
||||
// Defaults to the .metadata.name of the ExternalSecret resource
|
||||
name?: string
|
||||
|
||||
// Template defines a blueprint for the created Secret resource.
|
||||
template?: {
|
||||
data?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// EngineVersion specifies the template engine version
|
||||
// that should be used to compile/execute the
|
||||
// template specified in .data and .templateFrom[].
|
||||
engineVersion?: "v1" | "v2" | *"v1"
|
||||
|
||||
// ExternalSecretTemplateMetadata defines metadata fields for the
|
||||
// Secret blueprint.
|
||||
metadata?: {
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
templateFrom?: [...struct.MaxFields(1) & {
|
||||
configMap?: {
|
||||
items: [...{
|
||||
key: string
|
||||
}]
|
||||
name: string
|
||||
}
|
||||
secret?: {
|
||||
items: [...{
|
||||
key: string
|
||||
}]
|
||||
name: string
|
||||
}
|
||||
}]
|
||||
type?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,316 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-secrets-eso/prod-secrets-eso.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"struct"
|
||||
)
|
||||
|
||||
// ExternalSecret is the Schema for the external-secrets API.
|
||||
#ExternalSecret: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object.
|
||||
// Servers should convert recognized schemas to the latest
|
||||
// internal value, and
|
||||
// may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "external-secrets.io/v1beta1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents.
|
||||
// Servers may infer this from the endpoint the client submits
|
||||
// requests to.
|
||||
// Cannot be updated.
|
||||
// In CamelCase.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "ExternalSecret"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// ExternalSecretSpec defines the desired state of ExternalSecret.
|
||||
spec!: #ExternalSecretSpec
|
||||
}
|
||||
|
||||
// ExternalSecretSpec defines the desired state of ExternalSecret.
|
||||
#ExternalSecretSpec: {
|
||||
// Data defines the connection between the Kubernetes Secret keys
|
||||
// and the Provider data
|
||||
data?: [...{
|
||||
// RemoteRef points to the remote secret and defines
|
||||
// which secret (version/property/..) to fetch.
|
||||
remoteRef: {
|
||||
// Used to define a conversion Strategy
|
||||
conversionStrategy?: "Default" | "Unicode" | *"Default"
|
||||
|
||||
// Used to define a decoding Strategy
|
||||
decodingStrategy?: "Auto" | "Base64" | "Base64URL" | "None" | *"None"
|
||||
|
||||
// Key is the key used in the Provider, mandatory
|
||||
key: string
|
||||
|
||||
// Policy for fetching tags/labels from provider secrets, possible
|
||||
// options are Fetch, None. Defaults to None
|
||||
metadataPolicy?: "None" | "Fetch" | *"None"
|
||||
|
||||
// Used to select a specific property of the Provider value (if a
|
||||
// map), if supported
|
||||
property?: string
|
||||
|
||||
// Used to select a specific version of the Provider value, if
|
||||
// supported
|
||||
version?: string
|
||||
}
|
||||
|
||||
// SecretKey defines the key in which the controller stores
|
||||
// the value. This is the key in the Kind=Secret
|
||||
secretKey: string
|
||||
|
||||
// SourceRef allows you to override the source
|
||||
// from which the value will pulled from.
|
||||
sourceRef?: struct.MaxFields(1) & {
|
||||
// GeneratorRef points to a generator custom resource.
|
||||
//
|
||||
//
|
||||
// Deprecated: The generatorRef is not implemented in .data[].
|
||||
// this will be removed with v1.
|
||||
generatorRef?: {
|
||||
// Specify the apiVersion of the generator resource
|
||||
apiVersion?: string | *"generators.external-secrets.io/v1alpha1"
|
||||
|
||||
// Specify the Kind of the resource, e.g. Password, ACRAccessToken
|
||||
// etc.
|
||||
kind: string
|
||||
|
||||
// Specify the name of the generator resource
|
||||
name: string
|
||||
}
|
||||
|
||||
// SecretStoreRef defines which SecretStore to fetch the
|
||||
// ExternalSecret data.
|
||||
storeRef?: {
|
||||
// Kind of the SecretStore resource (SecretStore or
|
||||
// ClusterSecretStore)
|
||||
// Defaults to `SecretStore`
|
||||
kind?: string
|
||||
|
||||
// Name of the SecretStore resource
|
||||
name: string
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// DataFrom is used to fetch all properties from a specific
|
||||
// Provider data
|
||||
// If multiple entries are specified, the Secret keys are merged
|
||||
// in the specified order
|
||||
dataFrom?: [...{
|
||||
// Used to extract multiple key/value pairs from one secret
|
||||
// Note: Extract does not support sourceRef.Generator or
|
||||
// sourceRef.GeneratorRef.
|
||||
extract?: {
|
||||
// Used to define a conversion Strategy
|
||||
conversionStrategy?: "Default" | "Unicode" | *"Default"
|
||||
|
||||
// Used to define a decoding Strategy
|
||||
decodingStrategy?: "Auto" | "Base64" | "Base64URL" | "None" | *"None"
|
||||
|
||||
// Key is the key used in the Provider, mandatory
|
||||
key: string
|
||||
|
||||
// Policy for fetching tags/labels from provider secrets, possible
|
||||
// options are Fetch, None. Defaults to None
|
||||
metadataPolicy?: "None" | "Fetch" | *"None"
|
||||
|
||||
// Used to select a specific property of the Provider value (if a
|
||||
// map), if supported
|
||||
property?: string
|
||||
|
||||
// Used to select a specific version of the Provider value, if
|
||||
// supported
|
||||
version?: string
|
||||
}
|
||||
|
||||
// Used to find secrets based on tags or regular expressions
|
||||
// Note: Find does not support sourceRef.Generator or
|
||||
// sourceRef.GeneratorRef.
|
||||
find?: {
|
||||
// Used to define a conversion Strategy
|
||||
conversionStrategy?: "Default" | "Unicode" | *"Default"
|
||||
|
||||
// Used to define a decoding Strategy
|
||||
decodingStrategy?: "Auto" | "Base64" | "Base64URL" | "None" | *"None"
|
||||
name?: {
|
||||
// Finds secrets base
|
||||
regexp?: string
|
||||
}
|
||||
|
||||
// A root path to start the find operations.
|
||||
path?: string
|
||||
|
||||
// Find secrets based on tags.
|
||||
tags?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Used to rewrite secret Keys after getting them from the secret
|
||||
// Provider
|
||||
// Multiple Rewrite operations can be provided. They are applied
|
||||
// in a layered order (first to last)
|
||||
rewrite?: [...{
|
||||
// Used to rewrite with regular expressions.
|
||||
// The resulting key will be the output of a regexp.ReplaceAll
|
||||
// operation.
|
||||
regexp?: {
|
||||
// Used to define the regular expression of a re.Compiler.
|
||||
source: string
|
||||
|
||||
// Used to define the target pattern of a ReplaceAll operation.
|
||||
target: string
|
||||
}
|
||||
transform?: {
|
||||
// Used to define the template to apply on the secret name.
|
||||
// `.value ` will specify the secret name in the template.
|
||||
template: string
|
||||
}
|
||||
}]
|
||||
|
||||
// SourceRef points to a store or generator
|
||||
// which contains secret values ready to use.
|
||||
// Use this in combination with Extract or Find pull values out of
|
||||
// a specific SecretStore.
|
||||
// When sourceRef points to a generator Extract or Find is not
|
||||
// supported.
|
||||
// The generator returns a static map of values
|
||||
sourceRef?: struct.MaxFields(1) & {
|
||||
// GeneratorRef points to a generator custom resource.
|
||||
generatorRef?: {
|
||||
// Specify the apiVersion of the generator resource
|
||||
apiVersion?: string | *"generators.external-secrets.io/v1alpha1"
|
||||
|
||||
// Specify the Kind of the resource, e.g. Password, ACRAccessToken
|
||||
// etc.
|
||||
kind: string
|
||||
|
||||
// Specify the name of the generator resource
|
||||
name: string
|
||||
}
|
||||
|
||||
// SecretStoreRef defines which SecretStore to fetch the
|
||||
// ExternalSecret data.
|
||||
storeRef?: {
|
||||
// Kind of the SecretStore resource (SecretStore or
|
||||
// ClusterSecretStore)
|
||||
// Defaults to `SecretStore`
|
||||
kind?: string
|
||||
|
||||
// Name of the SecretStore resource
|
||||
name: string
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// RefreshInterval is the amount of time before the values are
|
||||
// read again from the SecretStore provider
|
||||
// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"
|
||||
// May be set to zero to fetch and create it once. Defaults to 1h.
|
||||
refreshInterval?: string | *"1h"
|
||||
|
||||
// SecretStoreRef defines which SecretStore to fetch the
|
||||
// ExternalSecret data.
|
||||
secretStoreRef?: {
|
||||
// Kind of the SecretStore resource (SecretStore or
|
||||
// ClusterSecretStore)
|
||||
// Defaults to `SecretStore`
|
||||
kind?: string
|
||||
|
||||
// Name of the SecretStore resource
|
||||
name: string
|
||||
}
|
||||
|
||||
// ExternalSecretTarget defines the Kubernetes Secret to be
|
||||
// created
|
||||
// There can be only one target per ExternalSecret.
|
||||
target?: {
|
||||
// CreationPolicy defines rules on how to create the resulting
|
||||
// Secret
|
||||
// Defaults to 'Owner'
|
||||
creationPolicy?: "Owner" | "Orphan" | "Merge" | "None" | *"Owner"
|
||||
|
||||
// DeletionPolicy defines rules on how to delete the resulting
|
||||
// Secret
|
||||
// Defaults to 'Retain'
|
||||
deletionPolicy?: "Delete" | "Merge" | "Retain" | *"Retain"
|
||||
|
||||
// Immutable defines if the final secret will be immutable
|
||||
immutable?: bool
|
||||
|
||||
// Name defines the name of the Secret resource to be managed
|
||||
// This field is immutable
|
||||
// Defaults to the .metadata.name of the ExternalSecret resource
|
||||
name?: string
|
||||
|
||||
// Template defines a blueprint for the created Secret resource.
|
||||
template?: {
|
||||
data?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// EngineVersion specifies the template engine version
|
||||
// that should be used to compile/execute the
|
||||
// template specified in .data and .templateFrom[].
|
||||
engineVersion?: "v1" | "v2" | *"v2"
|
||||
mergePolicy?: "Replace" | "Merge" | *"Replace"
|
||||
|
||||
// ExternalSecretTemplateMetadata defines metadata fields for the
|
||||
// Secret blueprint.
|
||||
metadata?: {
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
templateFrom?: [...{
|
||||
configMap?: {
|
||||
items: [...{
|
||||
key: string
|
||||
templateAs?: "Values" | "KeysAndValues" | *"Values"
|
||||
}]
|
||||
name: string
|
||||
}
|
||||
literal?: string
|
||||
secret?: {
|
||||
items: [...{
|
||||
key: string
|
||||
templateAs?: "Values" | "KeysAndValues" | *"Values"
|
||||
}]
|
||||
name: string
|
||||
}
|
||||
target?: "Data" | "Annotations" | "Labels" | *"Data"
|
||||
}]
|
||||
type?: string
|
||||
}
|
||||
} | *{
|
||||
creationPolicy: "Owner"
|
||||
deletionPolicy: "Retain"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-secrets-eso/prod-secrets-eso.gen.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
#PushSecret: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object.
|
||||
// Servers should convert recognized schemas to the latest
|
||||
// internal value, and
|
||||
// may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "external-secrets.io/v1alpha1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents.
|
||||
// Servers may infer this from the endpoint the client submits
|
||||
// requests to.
|
||||
// Cannot be updated.
|
||||
// In CamelCase.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "PushSecret"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// PushSecretSpec configures the behavior of the PushSecret.
|
||||
spec!: #PushSecretSpec
|
||||
}
|
||||
|
||||
// PushSecretSpec configures the behavior of the PushSecret.
|
||||
#PushSecretSpec: {
|
||||
// Secret Data that should be pushed to providers
|
||||
data?: [...{
|
||||
// Match a given Secret Key to be pushed to the provider.
|
||||
match: {
|
||||
// Remote Refs to push to providers.
|
||||
remoteRef: {
|
||||
// Name of the property in the resulting secret
|
||||
property?: string
|
||||
|
||||
// Name of the resulting provider secret.
|
||||
remoteKey: string
|
||||
}
|
||||
|
||||
// Secret Key to be pushed
|
||||
secretKey?: string
|
||||
}
|
||||
|
||||
// Metadata is metadata attached to the secret.
|
||||
// The structure of metadata is provider specific, please look it
|
||||
// up in the provider documentation.
|
||||
metadata?: _
|
||||
}]
|
||||
|
||||
// Deletion Policy to handle Secrets in the provider. Possible
|
||||
// Values: "Delete/None". Defaults to "None".
|
||||
deletionPolicy?: "Delete" | "None" | *"None"
|
||||
|
||||
// The Interval to which External Secrets will try to push a
|
||||
// secret definition
|
||||
refreshInterval?: string
|
||||
secretStoreRefs: [...{
|
||||
// Kind of the SecretStore resource (SecretStore or
|
||||
// ClusterSecretStore)
|
||||
// Defaults to `SecretStore`
|
||||
kind?: string | *"SecretStore"
|
||||
|
||||
// Optionally, sync to secret stores with label selector
|
||||
labelSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn,
|
||||
// the values array must be non-empty. If the operator is Exists
|
||||
// or DoesNotExist,
|
||||
// the values array must be empty. This array is replaced during a
|
||||
// strategic
|
||||
// merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels
|
||||
// map is equivalent to an element of matchExpressions, whose key
|
||||
// field is "key", the
|
||||
// operator is "In", and the values array contains only "value".
|
||||
// The requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Optionally, sync to the SecretStore of the given name
|
||||
name?: string
|
||||
}]
|
||||
selector: {
|
||||
secret: {
|
||||
// Name of the Secret. The Secret must exist in the same namespace
|
||||
// as the PushSecret manifest.
|
||||
name: string
|
||||
}
|
||||
}
|
||||
|
||||
// Template defines a blueprint for the created Secret resource.
|
||||
template?: {
|
||||
data?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// EngineVersion specifies the template engine version
|
||||
// that should be used to compile/execute the
|
||||
// template specified in .data and .templateFrom[].
|
||||
engineVersion?: "v1" | "v2" | *"v2"
|
||||
mergePolicy?: "Replace" | "Merge" | *"Replace"
|
||||
|
||||
// ExternalSecretTemplateMetadata defines metadata fields for the
|
||||
// Secret blueprint.
|
||||
metadata?: {
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
templateFrom?: [...{
|
||||
configMap?: {
|
||||
items: [...{
|
||||
key: string
|
||||
templateAs?: "Values" | "KeysAndValues" | *"Values"
|
||||
}]
|
||||
name: string
|
||||
}
|
||||
literal?: string
|
||||
secret?: {
|
||||
items: [...{
|
||||
key: string
|
||||
templateAs?: "Values" | "KeysAndValues" | *"Values"
|
||||
}]
|
||||
name: string
|
||||
}
|
||||
target?: "Data" | "Annotations" | "Labels" | *"Data"
|
||||
}]
|
||||
type?: string
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,167 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-secrets-eso/prod-secrets-eso.gen.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
// ACRAccessToken returns a Azure Container Registry token
|
||||
// that can be used for pushing/pulling images.
|
||||
// Note: by default it will return an ACR Refresh Token with full
|
||||
// access
|
||||
// (depending on the identity).
|
||||
// This can be scoped down to the repository level using
|
||||
// .spec.scope.
|
||||
// In case scope is defined it will return an ACR Access Token.
|
||||
//
|
||||
//
|
||||
// See docs:
|
||||
// https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md
|
||||
#ACRAccessToken: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object.
|
||||
// Servers should convert recognized schemas to the latest
|
||||
// internal value, and
|
||||
// may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "generators.external-secrets.io/v1alpha1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents.
|
||||
// Servers may infer this from the endpoint the client submits
|
||||
// requests to.
|
||||
// Cannot be updated.
|
||||
// In CamelCase.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "ACRAccessToken"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// ACRAccessTokenSpec defines how to generate the access token
|
||||
// e.g. how to authenticate and which registry to use.
|
||||
// see:
|
||||
// https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md#overview
|
||||
spec!: #ACRAccessTokenSpec
|
||||
}
|
||||
|
||||
// ACRAccessTokenSpec defines how to generate the access token
|
||||
// e.g. how to authenticate and which registry to use.
|
||||
// see:
|
||||
// https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md#overview
|
||||
#ACRAccessTokenSpec: {
|
||||
auth: {
|
||||
managedIdentity?: {
|
||||
// If multiple Managed Identity is assigned to the pod, you can
|
||||
// select the one to be used
|
||||
identityId?: string
|
||||
}
|
||||
servicePrincipal?: {
|
||||
// Configuration used to authenticate with Azure using static
|
||||
// credentials stored in a Kind=Secret.
|
||||
secretRef: {
|
||||
// The Azure clientId of the service principle used for
|
||||
// authentication.
|
||||
clientId?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// The Azure ClientSecret of the service principle used for
|
||||
// authentication.
|
||||
clientSecret?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
workloadIdentity?: {
|
||||
// ServiceAccountRef specified the service account
|
||||
// that should be used when authenticating with WorkloadIdentity.
|
||||
serviceAccountRef?: {
|
||||
// Audience specifies the `aud` claim for the service account
|
||||
// token
|
||||
// If the service account uses a well-known annotation for e.g.
|
||||
// IRSA or GCP Workload Identity
|
||||
// then this audiences will be appended to the list
|
||||
audiences?: [...string]
|
||||
|
||||
// The name of the ServiceAccount resource being referred to.
|
||||
name: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// EnvironmentType specifies the Azure cloud environment endpoints
|
||||
// to use for
|
||||
// connecting and authenticating with Azure. By default it points
|
||||
// to the public cloud AAD endpoint.
|
||||
// The following endpoints are available, also see here:
|
||||
// https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152
|
||||
// PublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud
|
||||
environmentType?: "PublicCloud" | "USGovernmentCloud" | "ChinaCloud" | "GermanCloud" | *"PublicCloud"
|
||||
|
||||
// the domain name of the ACR registry
|
||||
// e.g. foobarexample.azurecr.io
|
||||
registry: string
|
||||
|
||||
// Define the scope for the access token, e.g. pull/push access
|
||||
// for a repository.
|
||||
// if not provided it will return a refresh token that has full
|
||||
// scope.
|
||||
// Note: you need to pin it down to the repository level, there is
|
||||
// no wildcard available.
|
||||
//
|
||||
//
|
||||
// examples:
|
||||
// repository:my-repository:pull,push
|
||||
// repository:my-repository:pull
|
||||
//
|
||||
//
|
||||
// see docs for details:
|
||||
// https://docs.docker.com/registry/spec/auth/scope/
|
||||
scope?: string
|
||||
|
||||
// TenantID configures the Azure Tenant to send requests to.
|
||||
// Required for ServicePrincipal auth type.
|
||||
tenantId?: string
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-secrets-eso/prod-secrets-eso.gen.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
// ECRAuthorizationTokenSpec uses the GetAuthorizationToken API to
|
||||
// retrieve an
|
||||
// authorization token.
|
||||
// The authorization token is valid for 12 hours.
|
||||
// The authorizationToken returned is a base64 encoded string that
|
||||
// can be decoded
|
||||
// and used in a docker login command to authenticate to a
|
||||
// registry.
|
||||
// For more information, see Registry authentication
|
||||
// (https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth)
|
||||
// in the Amazon Elastic Container Registry User Guide.
|
||||
#ECRAuthorizationToken: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object.
|
||||
// Servers should convert recognized schemas to the latest
|
||||
// internal value, and
|
||||
// may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "generators.external-secrets.io/v1alpha1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents.
|
||||
// Servers may infer this from the endpoint the client submits
|
||||
// requests to.
|
||||
// Cannot be updated.
|
||||
// In CamelCase.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "ECRAuthorizationToken"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
spec!: #ECRAuthorizationTokenSpec
|
||||
}
|
||||
#ECRAuthorizationTokenSpec: {
|
||||
// Auth defines how to authenticate with AWS
|
||||
auth?: {
|
||||
jwt?: {
|
||||
// A reference to a ServiceAccount resource.
|
||||
serviceAccountRef?: {
|
||||
// Audience specifies the `aud` claim for the service account
|
||||
// token
|
||||
// If the service account uses a well-known annotation for e.g.
|
||||
// IRSA or GCP Workload Identity
|
||||
// then this audiences will be appended to the list
|
||||
audiences?: [...string]
|
||||
|
||||
// The name of the ServiceAccount resource being referred to.
|
||||
name: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
|
||||
// AWSAuthSecretRef holds secret references for AWS credentials
|
||||
// both AccessKeyID and SecretAccessKey must be defined in order
|
||||
// to properly authenticate.
|
||||
secretRef?: {
|
||||
// The AccessKeyID is used for authentication
|
||||
accessKeyIDSecretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// The SecretAccessKey is used for authentication
|
||||
secretAccessKeySecretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// The SessionToken used for authentication
|
||||
// This must be defined if AccessKeyID and SecretAccessKey are
|
||||
// temporary credentials
|
||||
// see:
|
||||
// https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html
|
||||
sessionTokenSecretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Region specifies the region to operate in.
|
||||
region: string
|
||||
|
||||
// You can assume a role before making calls to the
|
||||
// desired AWS service.
|
||||
role?: string
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-secrets-eso/prod-secrets-eso.gen.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
// Fake generator is used for testing. It lets you define
|
||||
// a static set of credentials that is always returned.
|
||||
#Fake: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object.
|
||||
// Servers should convert recognized schemas to the latest
|
||||
// internal value, and
|
||||
// may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "generators.external-secrets.io/v1alpha1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents.
|
||||
// Servers may infer this from the endpoint the client submits
|
||||
// requests to.
|
||||
// Cannot be updated.
|
||||
// In CamelCase.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "Fake"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// FakeSpec contains the static data.
|
||||
spec!: #FakeSpec
|
||||
}
|
||||
|
||||
// FakeSpec contains the static data.
|
||||
#FakeSpec: {
|
||||
// Used to select the correct ESO controller (think:
|
||||
// ingress.ingressClassName)
|
||||
// The ESO controller is instantiated with a specific controller
|
||||
// name and filters VDS based on this property
|
||||
controller?: string
|
||||
|
||||
// Data defines the static data returned
|
||||
// by this generator.
|
||||
data?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-secrets-eso/prod-secrets-eso.gen.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
// GCRAccessToken generates an GCP access token
|
||||
// that can be used to authenticate with GCR.
|
||||
#GCRAccessToken: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object.
|
||||
// Servers should convert recognized schemas to the latest
|
||||
// internal value, and
|
||||
// may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "generators.external-secrets.io/v1alpha1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents.
|
||||
// Servers may infer this from the endpoint the client submits
|
||||
// requests to.
|
||||
// Cannot be updated.
|
||||
// In CamelCase.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "GCRAccessToken"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
spec!: #GCRAccessTokenSpec
|
||||
}
|
||||
#GCRAccessTokenSpec: {
|
||||
// Auth defines the means for authenticating with GCP
|
||||
auth: {
|
||||
secretRef?: {
|
||||
// The SecretAccessKey is used for authentication
|
||||
secretAccessKeySecretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
workloadIdentity?: {
|
||||
clusterLocation: string
|
||||
clusterName: string
|
||||
clusterProjectID?: string
|
||||
|
||||
// A reference to a ServiceAccount resource.
|
||||
serviceAccountRef: {
|
||||
// Audience specifies the `aud` claim for the service account
|
||||
// token
|
||||
// If the service account uses a well-known annotation for e.g.
|
||||
// IRSA or GCP Workload Identity
|
||||
// then this audiences will be appended to the list
|
||||
audiences?: [...string]
|
||||
|
||||
// The name of the ServiceAccount resource being referred to.
|
||||
name: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ProjectID defines which project to use to authenticate with
|
||||
projectID: string
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-secrets-eso/prod-secrets-eso.gen.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
// Password generates a random password based on the
|
||||
// configuration parameters in spec.
|
||||
// You can specify the length, characterset and other attributes.
|
||||
#Password: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object.
|
||||
// Servers should convert recognized schemas to the latest
|
||||
// internal value, and
|
||||
// may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "generators.external-secrets.io/v1alpha1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents.
|
||||
// Servers may infer this from the endpoint the client submits
|
||||
// requests to.
|
||||
// Cannot be updated.
|
||||
// In CamelCase.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "Password"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// PasswordSpec controls the behavior of the password generator.
|
||||
spec!: #PasswordSpec
|
||||
}
|
||||
|
||||
// PasswordSpec controls the behavior of the password generator.
|
||||
#PasswordSpec: {
|
||||
// set AllowRepeat to true to allow repeating characters.
|
||||
allowRepeat: bool | *false
|
||||
|
||||
// Digits specifies the number of digits in the generated
|
||||
// password. If omitted it defaults to 25% of the length of the
|
||||
// password
|
||||
digits?: int
|
||||
|
||||
// Length of the password to be generated.
|
||||
// Defaults to 24
|
||||
length: int | *24
|
||||
|
||||
// Set NoUpper to disable uppercase characters
|
||||
noUpper: bool | *false
|
||||
|
||||
// SymbolCharacters specifies the special characters that should
|
||||
// be used
|
||||
// in the generated password.
|
||||
symbolCharacters?: string
|
||||
|
||||
// Symbols specifies the number of symbol characters in the
|
||||
// generated
|
||||
// password. If omitted it defaults to 25% of the length of the
|
||||
// password
|
||||
symbols?: int
|
||||
}
|
||||
@@ -0,0 +1,609 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-secrets-eso/prod-secrets-eso.gen.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
#VaultDynamicSecret: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object.
|
||||
// Servers should convert recognized schemas to the latest
|
||||
// internal value, and
|
||||
// may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "generators.external-secrets.io/v1alpha1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents.
|
||||
// Servers may infer this from the endpoint the client submits
|
||||
// requests to.
|
||||
// Cannot be updated.
|
||||
// In CamelCase.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "VaultDynamicSecret"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
spec!: #VaultDynamicSecretSpec
|
||||
}
|
||||
#VaultDynamicSecretSpec: {
|
||||
// Used to select the correct ESO controller (think:
|
||||
// ingress.ingressClassName)
|
||||
// The ESO controller is instantiated with a specific controller
|
||||
// name and filters VDS based on this property
|
||||
controller?: string
|
||||
|
||||
// Vault API method to use (GET/POST/other)
|
||||
method?: string
|
||||
|
||||
// Parameters to pass to Vault write (for non-GET methods)
|
||||
parameters?: _
|
||||
|
||||
// Vault path to obtain the dynamic secret from
|
||||
path: string
|
||||
|
||||
// Vault provider common spec
|
||||
provider: {
|
||||
// Auth configures how secret-manager authenticates with the Vault
|
||||
// server.
|
||||
auth: {
|
||||
// AppRole authenticates with Vault using the App Role auth
|
||||
// mechanism,
|
||||
// with the role and secret stored in a Kubernetes Secret
|
||||
// resource.
|
||||
appRole?: {
|
||||
// Path where the App Role authentication backend is mounted
|
||||
// in Vault, e.g: "approle"
|
||||
path: string | *"approle"
|
||||
|
||||
// RoleID configured in the App Role authentication backend when
|
||||
// setting
|
||||
// up the authentication backend in Vault.
|
||||
roleId?: string
|
||||
|
||||
// Reference to a key in a Secret that contains the App Role ID
|
||||
// used
|
||||
// to authenticate with Vault.
|
||||
// The `key` field must be specified and denotes which entry
|
||||
// within the Secret
|
||||
// resource is used as the app role id.
|
||||
roleRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// Reference to a key in a Secret that contains the App Role
|
||||
// secret used
|
||||
// to authenticate with Vault.
|
||||
// The `key` field must be specified and denotes which entry
|
||||
// within the Secret
|
||||
// resource is used as the app role secret.
|
||||
secretRef: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
|
||||
// Cert authenticates with TLS Certificates by passing client
|
||||
// certificate, private key and ca certificate
|
||||
// Cert authentication method
|
||||
cert?: {
|
||||
// ClientCert is a certificate to authenticate using the Cert
|
||||
// Vault
|
||||
// authentication method
|
||||
clientCert?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// SecretRef to a key in a Secret resource containing client
|
||||
// private key to
|
||||
// authenticate with Vault using the Cert authentication method
|
||||
secretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
|
||||
// Iam authenticates with vault by passing a special AWS request
|
||||
// signed with AWS IAM credentials
|
||||
// AWS IAM authentication method
|
||||
iam?: {
|
||||
// AWS External ID set on assumed IAM roles
|
||||
externalID?: string
|
||||
jwt?: {
|
||||
// A reference to a ServiceAccount resource.
|
||||
serviceAccountRef?: {
|
||||
// Audience specifies the `aud` claim for the service account
|
||||
// token
|
||||
// If the service account uses a well-known annotation for e.g.
|
||||
// IRSA or GCP Workload Identity
|
||||
// then this audiences will be appended to the list
|
||||
audiences?: [...string]
|
||||
|
||||
// The name of the ServiceAccount resource being referred to.
|
||||
name: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
|
||||
// Path where the AWS auth method is enabled in Vault, e.g: "aws"
|
||||
path?: string
|
||||
|
||||
// AWS region
|
||||
region?: string
|
||||
|
||||
// This is the AWS role to be assumed before talking to vault
|
||||
role?: string
|
||||
|
||||
// Specify credentials in a Secret object
|
||||
secretRef?: {
|
||||
// The AccessKeyID is used for authentication
|
||||
accessKeyIDSecretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// The SecretAccessKey is used for authentication
|
||||
secretAccessKeySecretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// The SessionToken used for authentication
|
||||
// This must be defined if AccessKeyID and SecretAccessKey are
|
||||
// temporary credentials
|
||||
// see:
|
||||
// https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html
|
||||
sessionTokenSecretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
|
||||
// X-Vault-AWS-IAM-Server-ID is an additional header used by Vault
|
||||
// IAM auth method to mitigate against different types of replay
|
||||
// attacks. More details here:
|
||||
// https://developer.hashicorp.com/vault/docs/auth/aws
|
||||
vaultAwsIamServerID?: string
|
||||
|
||||
// Vault Role. In vault, a role describes an identity with a set
|
||||
// of permissions, groups, or policies you want to attach a user
|
||||
// of the secrets engine
|
||||
vaultRole: string
|
||||
}
|
||||
|
||||
// Jwt authenticates with Vault by passing role and JWT token
|
||||
// using the
|
||||
// JWT/OIDC authentication method
|
||||
jwt?: {
|
||||
// Optional ServiceAccountToken specifies the Kubernetes service
|
||||
// account for which to request
|
||||
// a token for with the `TokenRequest` API.
|
||||
kubernetesServiceAccountToken?: {
|
||||
// Optional audiences field that will be used to request a
|
||||
// temporary Kubernetes service
|
||||
// account token for the service account referenced by
|
||||
// `serviceAccountRef`.
|
||||
// Defaults to a single audience `vault` it not specified.
|
||||
// Deprecated: use serviceAccountRef.Audiences instead
|
||||
audiences?: [...string]
|
||||
|
||||
// Optional expiration time in seconds that will be used to
|
||||
// request a temporary
|
||||
// Kubernetes service account token for the service account
|
||||
// referenced by
|
||||
// `serviceAccountRef`.
|
||||
// Deprecated: this will be removed in the future.
|
||||
// Defaults to 10 minutes.
|
||||
expirationSeconds?: int
|
||||
|
||||
// Service account field containing the name of a kubernetes
|
||||
// ServiceAccount.
|
||||
serviceAccountRef: {
|
||||
// Audience specifies the `aud` claim for the service account
|
||||
// token
|
||||
// If the service account uses a well-known annotation for e.g.
|
||||
// IRSA or GCP Workload Identity
|
||||
// then this audiences will be appended to the list
|
||||
audiences?: [...string]
|
||||
|
||||
// The name of the ServiceAccount resource being referred to.
|
||||
name: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
|
||||
// Path where the JWT authentication backend is mounted
|
||||
// in Vault, e.g: "jwt"
|
||||
path: string | *"jwt"
|
||||
|
||||
// Role is a JWT role to authenticate using the JWT/OIDC Vault
|
||||
// authentication method
|
||||
role?: string
|
||||
|
||||
// Optional SecretRef that refers to a key in a Secret resource
|
||||
// containing JWT token to
|
||||
// authenticate with Vault using the JWT/OIDC authentication
|
||||
// method.
|
||||
secretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
|
||||
// Kubernetes authenticates with Vault by passing the
|
||||
// ServiceAccount
|
||||
// token stored in the named Secret resource to the Vault server.
|
||||
kubernetes?: {
|
||||
// Path where the Kubernetes authentication backend is mounted in
|
||||
// Vault, e.g:
|
||||
// "kubernetes"
|
||||
mountPath: string | *"kubernetes"
|
||||
|
||||
// A required field containing the Vault Role to assume. A Role
|
||||
// binds a
|
||||
// Kubernetes ServiceAccount with a set of Vault policies.
|
||||
role: string
|
||||
|
||||
// Optional secret field containing a Kubernetes ServiceAccount
|
||||
// JWT used
|
||||
// for authenticating with Vault. If a name is specified without a
|
||||
// key,
|
||||
// `token` is the default. If one is not specified, the one bound
|
||||
// to
|
||||
// the controller will be used.
|
||||
secretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// Optional service account field containing the name of a
|
||||
// kubernetes ServiceAccount.
|
||||
// If the service account is specified, the service account secret
|
||||
// token JWT will be used
|
||||
// for authenticating with Vault. If the service account selector
|
||||
// is not supplied,
|
||||
// the secretRef will be used instead.
|
||||
serviceAccountRef?: {
|
||||
// Audience specifies the `aud` claim for the service account
|
||||
// token
|
||||
// If the service account uses a well-known annotation for e.g.
|
||||
// IRSA or GCP Workload Identity
|
||||
// then this audiences will be appended to the list
|
||||
audiences?: [...string]
|
||||
|
||||
// The name of the ServiceAccount resource being referred to.
|
||||
name: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
|
||||
// Ldap authenticates with Vault by passing username/password pair
|
||||
// using
|
||||
// the LDAP authentication method
|
||||
ldap?: {
|
||||
// Path where the LDAP authentication backend is mounted
|
||||
// in Vault, e.g: "ldap"
|
||||
path: string | *"ldap"
|
||||
|
||||
// SecretRef to a key in a Secret resource containing password for
|
||||
// the LDAP
|
||||
// user used to authenticate with Vault using the LDAP
|
||||
// authentication
|
||||
// method
|
||||
secretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// Username is a LDAP user name used to authenticate using the
|
||||
// LDAP Vault
|
||||
// authentication method
|
||||
username: string
|
||||
}
|
||||
|
||||
// TokenSecretRef authenticates with Vault by presenting a token.
|
||||
tokenSecretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// UserPass authenticates with Vault by passing username/password
|
||||
// pair
|
||||
userPass?: {
|
||||
// Path where the UserPassword authentication backend is mounted
|
||||
// in Vault, e.g: "user"
|
||||
path: string | *"user"
|
||||
|
||||
// SecretRef to a key in a Secret resource containing password for
|
||||
// the
|
||||
// user used to authenticate with Vault using the UserPass
|
||||
// authentication
|
||||
// method
|
||||
secretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// Username is a user name used to authenticate using the UserPass
|
||||
// Vault
|
||||
// authentication method
|
||||
username: string
|
||||
}
|
||||
}
|
||||
|
||||
// PEM encoded CA bundle used to validate Vault server
|
||||
// certificate. Only used
|
||||
// if the Server URL is using HTTPS protocol. This parameter is
|
||||
// ignored for
|
||||
// plain HTTP protocol connection. If not set the system root
|
||||
// certificates
|
||||
// are used to validate the TLS connection.
|
||||
caBundle?: string
|
||||
|
||||
// The provider for the CA bundle to use to validate Vault server
|
||||
// certificate.
|
||||
caProvider?: {
|
||||
// The key where the CA certificate can be found in the Secret or
|
||||
// ConfigMap.
|
||||
key?: string
|
||||
|
||||
// The name of the object located at the provider type.
|
||||
name: string
|
||||
|
||||
// The namespace the Provider type is in.
|
||||
// Can only be defined when used in a ClusterSecretStore.
|
||||
namespace?: string
|
||||
|
||||
// The type of provider to use such as "Secret", or "ConfigMap".
|
||||
type: "Secret" | "ConfigMap"
|
||||
}
|
||||
|
||||
// ForwardInconsistent tells Vault to forward read-after-write
|
||||
// requests to the Vault
|
||||
// leader instead of simply retrying within a loop. This can
|
||||
// increase performance if
|
||||
// the option is enabled serverside.
|
||||
// https://www.vaultproject.io/docs/configuration/replication#allow_forwarding_via_header
|
||||
forwardInconsistent?: bool
|
||||
|
||||
// Name of the vault namespace. Namespaces is a set of features
|
||||
// within Vault Enterprise that allows
|
||||
// Vault environments to support Secure Multi-tenancy. e.g: "ns1".
|
||||
// More about namespaces can be found here
|
||||
// https://www.vaultproject.io/docs/enterprise/namespaces
|
||||
namespace?: string
|
||||
|
||||
// Path is the mount path of the Vault KV backend endpoint, e.g:
|
||||
// "secret". The v2 KV secret engine version specific "/data" path
|
||||
// suffix
|
||||
// for fetching secrets from Vault is optional and will be
|
||||
// appended
|
||||
// if not present in specified path.
|
||||
path?: string
|
||||
|
||||
// ReadYourWrites ensures isolated read-after-write semantics by
|
||||
// providing discovered cluster replication states in each
|
||||
// request.
|
||||
// More information about eventual consistency in Vault can be
|
||||
// found here
|
||||
// https://www.vaultproject.io/docs/enterprise/consistency
|
||||
readYourWrites?: bool
|
||||
|
||||
// Server is the connection address for the Vault server, e.g:
|
||||
// "https://vault.example.com:8200".
|
||||
server: string
|
||||
|
||||
// The configuration used for client side related TLS
|
||||
// communication, when the Vault server
|
||||
// requires mutual authentication. Only used if the Server URL is
|
||||
// using HTTPS protocol.
|
||||
// This parameter is ignored for plain HTTP protocol connection.
|
||||
// It's worth noting this configuration is different from the "TLS
|
||||
// certificates auth method",
|
||||
// which is available under the `auth.cert` section.
|
||||
tls?: {
|
||||
// CertSecretRef is a certificate added to the transport layer
|
||||
// when communicating with the Vault server.
|
||||
// If no key for the Secret is specified, external-secret will
|
||||
// default to 'tls.crt'.
|
||||
certSecretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// KeySecretRef to a key in a Secret resource containing client
|
||||
// private key
|
||||
// added to the transport layer when communicating with the Vault
|
||||
// server.
|
||||
// If no key for the Secret is specified, external-secret will
|
||||
// default to 'tls.key'.
|
||||
keySecretRef?: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be
|
||||
// defaulted, in others it may be required.
|
||||
key?: string
|
||||
|
||||
// The name of the Secret resource being referred to.
|
||||
name?: string
|
||||
|
||||
// Namespace of the resource being referred to. Ignored if
|
||||
// referent is not cluster-scoped. cluster-scoped defaults
|
||||
// to the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
|
||||
// Version is the Vault KV secret engine version. This can be
|
||||
// either "v1" or
|
||||
// "v2". Version defaults to "v2".
|
||||
version?: "v1" | "v2" | *"v2"
|
||||
}
|
||||
|
||||
// Result type defines which data is returned from the generator.
|
||||
// By default it is the "data" section of the Vault API response.
|
||||
// When using e.g. /auth/token/create the "data" section is empty
|
||||
// but
|
||||
// the "auth" section contains the generated token.
|
||||
// Please refer to the vault docs regarding the result data
|
||||
// structure.
|
||||
resultType?: "Data" | "Auth" | *"Data"
|
||||
}
|
||||
@@ -0,0 +1,692 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f https://github.com/fluxcd/flux2/releases/download/v2.2.3/install.yaml
|
||||
|
||||
package v2beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
// HelmRelease is the Schema for the helmreleases API
|
||||
#HelmRelease: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "helm.toolkit.fluxcd.io/v2beta1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "HelmRelease"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// HelmReleaseSpec defines the desired state of a Helm release.
|
||||
spec!: #HelmReleaseSpec
|
||||
}
|
||||
|
||||
// HelmReleaseSpec defines the desired state of a Helm release.
|
||||
#HelmReleaseSpec: {
|
||||
// Chart defines the template of the v1beta2.HelmChart that should
|
||||
// be created for this HelmRelease.
|
||||
chart: {
|
||||
// ObjectMeta holds the template for metadata like labels and
|
||||
// annotations.
|
||||
metadata?: {
|
||||
// Annotations is an unstructured key value map stored with a
|
||||
// resource that may be set by external tools to store and
|
||||
// retrieve arbitrary metadata. They are not queryable and should
|
||||
// be preserved when modifying objects. More info:
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Map of string keys and values that can be used to organize and
|
||||
// categorize (scope and select) objects. More info:
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Spec holds the template for the v1beta2.HelmChartSpec for this
|
||||
// HelmRelease.
|
||||
spec: {
|
||||
// The name or path the Helm chart is available at in the
|
||||
// SourceRef.
|
||||
chart: string
|
||||
|
||||
// Interval at which to check the v1beta2.Source for updates.
|
||||
// Defaults to 'HelmReleaseSpec.Interval'.
|
||||
interval?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
|
||||
// Determines what enables the creation of a new artifact. Valid
|
||||
// values are ('ChartVersion', 'Revision'). See the documentation
|
||||
// of the values for an explanation on their behavior. Defaults
|
||||
// to ChartVersion when omitted.
|
||||
reconcileStrategy?: "ChartVersion" | "Revision" | *"ChartVersion"
|
||||
|
||||
// The name and namespace of the v1beta2.Source the chart is
|
||||
// available at.
|
||||
sourceRef: {
|
||||
// APIVersion of the referent.
|
||||
apiVersion?: string
|
||||
|
||||
// Kind of the referent.
|
||||
kind?: "HelmRepository" | "GitRepository" | "Bucket"
|
||||
|
||||
// Name of the referent.
|
||||
name: strings.MaxRunes(253) & strings.MinRunes(1)
|
||||
|
||||
// Namespace of the referent.
|
||||
namespace?: strings.MaxRunes(63) & strings.MinRunes(1)
|
||||
}
|
||||
|
||||
// Alternative values file to use as the default chart values,
|
||||
// expected to be a relative path in the SourceRef. Deprecated in
|
||||
// favor of ValuesFiles, for backwards compatibility the file
|
||||
// defined here is merged before the ValuesFiles items. Ignored
|
||||
// when omitted.
|
||||
valuesFile?: string
|
||||
|
||||
// Alternative list of values files to use as the chart values
|
||||
// (values.yaml is not included by default), expected to be a
|
||||
// relative path in the SourceRef. Values files are merged in the
|
||||
// order of this list with the last file overriding the first.
|
||||
// Ignored when omitted.
|
||||
valuesFiles?: [...string]
|
||||
|
||||
// Verify contains the secret name containing the trusted public
|
||||
// keys used to verify the signature and specifies which provider
|
||||
// to use to check whether OCI image is authentic. This field is
|
||||
// only supported for OCI sources. Chart dependencies, which are
|
||||
// not bundled in the umbrella chart artifact, are not verified.
|
||||
verify?: {
|
||||
// Provider specifies the technology used to sign the OCI Helm
|
||||
// chart.
|
||||
provider: "cosign" | *"cosign"
|
||||
secretRef?: {
|
||||
// Name of the referent.
|
||||
name: string
|
||||
}
|
||||
}
|
||||
|
||||
// Version semver expression, ignored for charts from
|
||||
// v1beta2.GitRepository and v1beta2.Bucket sources. Defaults to
|
||||
// latest when omitted.
|
||||
version?: string | *"*"
|
||||
}
|
||||
}
|
||||
|
||||
// DependsOn may contain a meta.NamespacedObjectReference slice
|
||||
// with references to HelmRelease resources that must be ready
|
||||
// before this HelmRelease can be reconciled.
|
||||
dependsOn?: [...{
|
||||
// Name of the referent.
|
||||
name: string
|
||||
|
||||
// Namespace of the referent, when not specified it acts as
|
||||
// LocalObjectReference.
|
||||
namespace?: string
|
||||
}]
|
||||
|
||||
// DriftDetection holds the configuration for detecting and
|
||||
// handling differences between the manifest in the Helm storage
|
||||
// and the resources currently existing in the cluster.
|
||||
// Note: this field is provisional to the v2beta2 API, and not
|
||||
// actively used by v2beta1 HelmReleases.
|
||||
driftDetection?: {
|
||||
// Ignore contains a list of rules for specifying which changes to
|
||||
// ignore during diffing.
|
||||
ignore?: [...{
|
||||
// Paths is a list of JSON Pointer (RFC 6901) paths to be excluded
|
||||
// from consideration in a Kubernetes object.
|
||||
paths: [...string]
|
||||
|
||||
// Target is a selector for specifying Kubernetes objects to which
|
||||
// this rule applies. If Target is not set, the Paths will be
|
||||
// ignored for all Kubernetes objects within the manifest of the
|
||||
// Helm release.
|
||||
target?: {
|
||||
// AnnotationSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource annotations.
|
||||
annotationSelector?: string
|
||||
|
||||
// Group is the API group to select resources from. Together with
|
||||
// Version and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
group?: string
|
||||
|
||||
// Kind of the API Group to select resources from. Together with
|
||||
// Group and Version it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
kind?: string
|
||||
|
||||
// LabelSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource labels.
|
||||
labelSelector?: string
|
||||
|
||||
// Name to match resources with.
|
||||
name?: string
|
||||
|
||||
// Namespace to select resources from.
|
||||
namespace?: string
|
||||
|
||||
// Version of the API Group to select resources from. Together
|
||||
// with Group and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
version?: string
|
||||
}
|
||||
}]
|
||||
|
||||
// Mode defines how differences should be handled between the Helm
|
||||
// manifest and the manifest currently applied to the cluster. If
|
||||
// not explicitly set, it defaults to DiffModeDisabled.
|
||||
mode?: "enabled" | "warn" | "disabled"
|
||||
}
|
||||
|
||||
// Install holds the configuration for Helm install actions for
|
||||
// this HelmRelease.
|
||||
install?: {
|
||||
// CRDs upgrade CRDs from the Helm Chart's crds directory
|
||||
// according to the CRD upgrade policy provided here. Valid
|
||||
// values are `Skip`, `Create` or `CreateReplace`. Default is
|
||||
// `Create` and if omitted CRDs are installed but not updated.
|
||||
// Skip: do neither install nor replace (update) any CRDs.
|
||||
// Create: new CRDs are created, existing CRDs are neither updated
|
||||
// nor deleted.
|
||||
// CreateReplace: new CRDs are created, existing CRDs are updated
|
||||
// (replaced) but not deleted.
|
||||
// By default, CRDs are applied (installed) during Helm install
|
||||
// action. With this option users can opt-in to CRD replace
|
||||
// existing CRDs on Helm install actions, which is not (yet)
|
||||
// natively supported by Helm.
|
||||
// https://helm.sh/docs/chart_best_practices/custom_resource_definitions.
|
||||
crds?: "Skip" | "Create" | "CreateReplace"
|
||||
|
||||
// CreateNamespace tells the Helm install action to create the
|
||||
// HelmReleaseSpec.TargetNamespace if it does not exist yet. On
|
||||
// uninstall, the namespace will not be garbage collected.
|
||||
createNamespace?: bool
|
||||
|
||||
// DisableHooks prevents hooks from running during the Helm
|
||||
// install action.
|
||||
disableHooks?: bool
|
||||
|
||||
// DisableOpenAPIValidation prevents the Helm install action from
|
||||
// validating rendered templates against the Kubernetes OpenAPI
|
||||
// Schema.
|
||||
disableOpenAPIValidation?: bool
|
||||
|
||||
// DisableWait disables the waiting for resources to be ready
|
||||
// after a Helm install has been performed.
|
||||
disableWait?: bool
|
||||
|
||||
// DisableWaitForJobs disables waiting for jobs to complete after
|
||||
// a Helm install has been performed.
|
||||
disableWaitForJobs?: bool
|
||||
|
||||
// Remediation holds the remediation configuration for when the
|
||||
// Helm install action for the HelmRelease fails. The default is
|
||||
// to not perform any action.
|
||||
remediation?: {
|
||||
// IgnoreTestFailures tells the controller to skip remediation
|
||||
// when the Helm tests are run after an install action but fail.
|
||||
// Defaults to 'Test.IgnoreFailures'.
|
||||
ignoreTestFailures?: bool
|
||||
|
||||
// RemediateLastFailure tells the controller to remediate the last
|
||||
// failure, when no retries remain. Defaults to 'false'.
|
||||
remediateLastFailure?: bool
|
||||
|
||||
// Retries is the number of retries that should be attempted on
|
||||
// failures before bailing. Remediation, using an uninstall, is
|
||||
// performed between each attempt. Defaults to '0', a negative
|
||||
// integer equals to unlimited retries.
|
||||
retries?: int
|
||||
}
|
||||
|
||||
// Replace tells the Helm install action to re-use the
|
||||
// 'ReleaseName', but only if that name is a deleted release
|
||||
// which remains in the history.
|
||||
replace?: bool
|
||||
|
||||
// SkipCRDs tells the Helm install action to not install any CRDs.
|
||||
// By default, CRDs are installed if not already present.
|
||||
// Deprecated use CRD policy (`crds`) attribute with value `Skip`
|
||||
// instead.
|
||||
skipCRDs?: bool
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation (like Jobs for hooks) during the performance of a
|
||||
// Helm install action. Defaults to 'HelmReleaseSpec.Timeout'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
}
|
||||
|
||||
// Interval at which to reconcile the Helm release. This interval
|
||||
// is approximate and may be subject to jitter to ensure
|
||||
// efficient use of resources.
|
||||
interval: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
kubeConfig?: {
|
||||
// SecretRef holds the name of a secret that contains a key with
|
||||
// the kubeconfig file as the value. If no key is set, the key
|
||||
// will default to 'value'. It is recommended that the kubeconfig
|
||||
// is self-contained, and the secret is regularly updated if
|
||||
// credentials such as a cloud-access-token expire. Cloud
|
||||
// specific `cmd-path` auth helpers will not function without
|
||||
// adding binaries and credentials to the Pod that is responsible
|
||||
// for reconciling Kubernetes resources.
|
||||
secretRef: {
|
||||
// Key in the Secret, when not specified an
|
||||
// implementation-specific default key is used.
|
||||
key?: string
|
||||
|
||||
// Name of the Secret.
|
||||
name: string
|
||||
}
|
||||
}
|
||||
|
||||
// MaxHistory is the number of revisions saved by Helm for this
|
||||
// HelmRelease. Use '0' for an unlimited number of revisions;
|
||||
// defaults to '10'.
|
||||
maxHistory?: int
|
||||
|
||||
// PersistentClient tells the controller to use a persistent
|
||||
// Kubernetes client for this release. When enabled, the client
|
||||
// will be reused for the duration of the reconciliation, instead
|
||||
// of being created and destroyed for each (step of a) Helm
|
||||
// action.
|
||||
// This can improve performance, but may cause issues with some
|
||||
// Helm charts that for example do create Custom Resource
|
||||
// Definitions during installation outside Helm's CRD lifecycle
|
||||
// hooks, which are then not observed to be available by e.g.
|
||||
// post-install hooks.
|
||||
// If not set, it defaults to true.
|
||||
persistentClient?: bool
|
||||
|
||||
// PostRenderers holds an array of Helm PostRenderers, which will
|
||||
// be applied in order of their definition.
|
||||
postRenderers?: [...{
|
||||
// Kustomization to apply as PostRenderer.
|
||||
kustomize?: {
|
||||
// Images is a list of (image name, new name, new tag or digest)
|
||||
// for changing image names, tags or digests. This can also be
|
||||
// achieved with a patch, but this operator is simpler to
|
||||
// specify.
|
||||
images?: [...{
|
||||
// Digest is the value used to replace the original image tag. If
|
||||
// digest is present NewTag value is ignored.
|
||||
digest?: string
|
||||
|
||||
// Name is a tag-less image name.
|
||||
name: string
|
||||
|
||||
// NewName is the value used to replace the original name.
|
||||
newName?: string
|
||||
|
||||
// NewTag is the value used to replace the original tag.
|
||||
newTag?: string
|
||||
}]
|
||||
|
||||
// Strategic merge and JSON patches, defined as inline YAML
|
||||
// objects, capable of targeting objects based on kind, label and
|
||||
// annotation selectors.
|
||||
patches?: [...{
|
||||
// Patch contains an inline StrategicMerge patch or an inline
|
||||
// JSON6902 patch with an array of operation objects.
|
||||
patch: string
|
||||
|
||||
// Target points to the resources that the patch document should
|
||||
// be applied to.
|
||||
target?: {
|
||||
// AnnotationSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource annotations.
|
||||
annotationSelector?: string
|
||||
|
||||
// Group is the API group to select resources from. Together with
|
||||
// Version and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
group?: string
|
||||
|
||||
// Kind of the API Group to select resources from. Together with
|
||||
// Group and Version it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
kind?: string
|
||||
|
||||
// LabelSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource labels.
|
||||
labelSelector?: string
|
||||
|
||||
// Name to match resources with.
|
||||
name?: string
|
||||
|
||||
// Namespace to select resources from.
|
||||
namespace?: string
|
||||
|
||||
// Version of the API Group to select resources from. Together
|
||||
// with Group and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
version?: string
|
||||
}
|
||||
}]
|
||||
|
||||
// JSON 6902 patches, defined as inline YAML objects.
|
||||
patchesJson6902?: [...{
|
||||
// Patch contains the JSON6902 patch document with an array of
|
||||
// operation objects.
|
||||
patch: [...{
|
||||
// From contains a JSON-pointer value that references a location
|
||||
// within the target document where the operation is performed.
|
||||
// The meaning of the value depends on the value of Op, and is
|
||||
// NOT taken into account by all operations.
|
||||
from?: string
|
||||
|
||||
// Op indicates the operation to perform. Its value MUST be one of
|
||||
// "add", "remove", "replace", "move", "copy", or "test".
|
||||
// https://datatracker.ietf.org/doc/html/rfc6902#section-4
|
||||
op: "test" | "remove" | "add" | "replace" | "move" | "copy"
|
||||
|
||||
// Path contains the JSON-pointer value that references a location
|
||||
// within the target document where the operation is performed.
|
||||
// The meaning of the value depends on the value of Op.
|
||||
path: string
|
||||
|
||||
// Value contains a valid JSON structure. The meaning of the value
|
||||
// depends on the value of Op, and is NOT taken into account by
|
||||
// all operations.
|
||||
value?: _
|
||||
}]
|
||||
|
||||
// Target points to the resources that the patch document should
|
||||
// be applied to.
|
||||
target: {
|
||||
// AnnotationSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource annotations.
|
||||
annotationSelector?: string
|
||||
|
||||
// Group is the API group to select resources from. Together with
|
||||
// Version and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
group?: string
|
||||
|
||||
// Kind of the API Group to select resources from. Together with
|
||||
// Group and Version it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
kind?: string
|
||||
|
||||
// LabelSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource labels.
|
||||
labelSelector?: string
|
||||
|
||||
// Name to match resources with.
|
||||
name?: string
|
||||
|
||||
// Namespace to select resources from.
|
||||
namespace?: string
|
||||
|
||||
// Version of the API Group to select resources from. Together
|
||||
// with Group and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
version?: string
|
||||
}
|
||||
}]
|
||||
|
||||
// Strategic merge patches, defined as inline YAML objects.
|
||||
patchesStrategicMerge?: [...]
|
||||
}
|
||||
}]
|
||||
|
||||
// ReleaseName used for the Helm release. Defaults to a
|
||||
// composition of '[TargetNamespace-]Name'.
|
||||
releaseName?: strings.MaxRunes(53) & strings.MinRunes(1)
|
||||
|
||||
// Rollback holds the configuration for Helm rollback actions for
|
||||
// this HelmRelease.
|
||||
rollback?: {
|
||||
// CleanupOnFail allows deletion of new resources created during
|
||||
// the Helm rollback action when it fails.
|
||||
cleanupOnFail?: bool
|
||||
|
||||
// DisableHooks prevents hooks from running during the Helm
|
||||
// rollback action.
|
||||
disableHooks?: bool
|
||||
|
||||
// DisableWait disables the waiting for resources to be ready
|
||||
// after a Helm rollback has been performed.
|
||||
disableWait?: bool
|
||||
|
||||
// DisableWaitForJobs disables waiting for jobs to complete after
|
||||
// a Helm rollback has been performed.
|
||||
disableWaitForJobs?: bool
|
||||
|
||||
// Force forces resource updates through a replacement strategy.
|
||||
force?: bool
|
||||
|
||||
// Recreate performs pod restarts for the resource if applicable.
|
||||
recreate?: bool
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation (like Jobs for hooks) during the performance of a
|
||||
// Helm rollback action. Defaults to 'HelmReleaseSpec.Timeout'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
}
|
||||
|
||||
// The name of the Kubernetes service account to impersonate when
|
||||
// reconciling this HelmRelease.
|
||||
serviceAccountName?: string
|
||||
|
||||
// StorageNamespace used for the Helm storage. Defaults to the
|
||||
// namespace of the HelmRelease.
|
||||
storageNamespace?: strings.MaxRunes(63) & strings.MinRunes(1)
|
||||
|
||||
// Suspend tells the controller to suspend reconciliation for this
|
||||
// HelmRelease, it does not apply to already started
|
||||
// reconciliations. Defaults to false.
|
||||
suspend?: bool
|
||||
|
||||
// TargetNamespace to target when performing operations for the
|
||||
// HelmRelease. Defaults to the namespace of the HelmRelease.
|
||||
targetNamespace?: strings.MaxRunes(63) & strings.MinRunes(1)
|
||||
|
||||
// Test holds the configuration for Helm test actions for this
|
||||
// HelmRelease.
|
||||
test?: {
|
||||
// Enable enables Helm test actions for this HelmRelease after an
|
||||
// Helm install or upgrade action has been performed.
|
||||
enable?: bool
|
||||
|
||||
// IgnoreFailures tells the controller to skip remediation when
|
||||
// the Helm tests are run but fail. Can be overwritten for tests
|
||||
// run after install or upgrade actions in
|
||||
// 'Install.IgnoreTestFailures' and 'Upgrade.IgnoreTestFailures'.
|
||||
ignoreFailures?: bool
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation during the performance of a Helm test action.
|
||||
// Defaults to 'HelmReleaseSpec.Timeout'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
}
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation (like Jobs for hooks) during the performance of a
|
||||
// Helm action. Defaults to '5m0s'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
|
||||
// Uninstall holds the configuration for Helm uninstall actions
|
||||
// for this HelmRelease.
|
||||
uninstall?: {
|
||||
// DeletionPropagation specifies the deletion propagation policy
|
||||
// when a Helm uninstall is performed.
|
||||
deletionPropagation?: "background" | "foreground" | "orphan" | *"background"
|
||||
|
||||
// DisableHooks prevents hooks from running during the Helm
|
||||
// rollback action.
|
||||
disableHooks?: bool
|
||||
|
||||
// DisableWait disables waiting for all the resources to be
|
||||
// deleted after a Helm uninstall is performed.
|
||||
disableWait?: bool
|
||||
|
||||
// KeepHistory tells Helm to remove all associated resources and
|
||||
// mark the release as deleted, but retain the release history.
|
||||
keepHistory?: bool
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation (like Jobs for hooks) during the performance of a
|
||||
// Helm uninstall action. Defaults to 'HelmReleaseSpec.Timeout'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
}
|
||||
|
||||
// Upgrade holds the configuration for Helm upgrade actions for
|
||||
// this HelmRelease.
|
||||
upgrade?: {
|
||||
// CleanupOnFail allows deletion of new resources created during
|
||||
// the Helm upgrade action when it fails.
|
||||
cleanupOnFail?: bool
|
||||
|
||||
// CRDs upgrade CRDs from the Helm Chart's crds directory
|
||||
// according to the CRD upgrade policy provided here. Valid
|
||||
// values are `Skip`, `Create` or `CreateReplace`. Default is
|
||||
// `Skip` and if omitted CRDs are neither installed nor upgraded.
|
||||
// Skip: do neither install nor replace (update) any CRDs.
|
||||
// Create: new CRDs are created, existing CRDs are neither updated
|
||||
// nor deleted.
|
||||
// CreateReplace: new CRDs are created, existing CRDs are updated
|
||||
// (replaced) but not deleted.
|
||||
// By default, CRDs are not applied during Helm upgrade action.
|
||||
// With this option users can opt-in to CRD upgrade, which is not
|
||||
// (yet) natively supported by Helm.
|
||||
// https://helm.sh/docs/chart_best_practices/custom_resource_definitions.
|
||||
crds?: "Skip" | "Create" | "CreateReplace"
|
||||
|
||||
// DisableHooks prevents hooks from running during the Helm
|
||||
// upgrade action.
|
||||
disableHooks?: bool
|
||||
|
||||
// DisableOpenAPIValidation prevents the Helm upgrade action from
|
||||
// validating rendered templates against the Kubernetes OpenAPI
|
||||
// Schema.
|
||||
disableOpenAPIValidation?: bool
|
||||
|
||||
// DisableWait disables the waiting for resources to be ready
|
||||
// after a Helm upgrade has been performed.
|
||||
disableWait?: bool
|
||||
|
||||
// DisableWaitForJobs disables waiting for jobs to complete after
|
||||
// a Helm upgrade has been performed.
|
||||
disableWaitForJobs?: bool
|
||||
|
||||
// Force forces resource updates through a replacement strategy.
|
||||
force?: bool
|
||||
|
||||
// PreserveValues will make Helm reuse the last release's values
|
||||
// and merge in overrides from 'Values'. Setting this flag makes
|
||||
// the HelmRelease non-declarative.
|
||||
preserveValues?: bool
|
||||
|
||||
// Remediation holds the remediation configuration for when the
|
||||
// Helm upgrade action for the HelmRelease fails. The default is
|
||||
// to not perform any action.
|
||||
remediation?: {
|
||||
// IgnoreTestFailures tells the controller to skip remediation
|
||||
// when the Helm tests are run after an upgrade action but fail.
|
||||
// Defaults to 'Test.IgnoreFailures'.
|
||||
ignoreTestFailures?: bool
|
||||
|
||||
// RemediateLastFailure tells the controller to remediate the last
|
||||
// failure, when no retries remain. Defaults to 'false' unless
|
||||
// 'Retries' is greater than 0.
|
||||
remediateLastFailure?: bool
|
||||
|
||||
// Retries is the number of retries that should be attempted on
|
||||
// failures before bailing. Remediation, using 'Strategy', is
|
||||
// performed between each attempt. Defaults to '0', a negative
|
||||
// integer equals to unlimited retries.
|
||||
retries?: int
|
||||
|
||||
// Strategy to use for failure remediation. Defaults to
|
||||
// 'rollback'.
|
||||
strategy?: "rollback" | "uninstall"
|
||||
}
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation (like Jobs for hooks) during the performance of a
|
||||
// Helm upgrade action. Defaults to 'HelmReleaseSpec.Timeout'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
}
|
||||
|
||||
// Values holds the values for this Helm release.
|
||||
values?: _
|
||||
|
||||
// ValuesFrom holds references to resources containing Helm values
|
||||
// for this HelmRelease, and information about how they should be
|
||||
// merged.
|
||||
valuesFrom?: [...{
|
||||
// Kind of the values referent, valid values are ('Secret',
|
||||
// 'ConfigMap').
|
||||
kind: "Secret" | "ConfigMap"
|
||||
|
||||
// Name of the values referent. Should reside in the same
|
||||
// namespace as the referring resource.
|
||||
name: strings.MaxRunes(253) & strings.MinRunes(1)
|
||||
|
||||
// Optional marks this ValuesReference as optional. When set, a
|
||||
// not found error for the values reference is ignored, but any
|
||||
// ValuesKey, TargetPath or transient error will still result in
|
||||
// a reconciliation failure.
|
||||
optional?: bool
|
||||
|
||||
// TargetPath is the YAML dot notation path the value should be
|
||||
// merged at. When set, the ValuesKey is expected to be a single
|
||||
// flat value. Defaults to 'None', which results in the values
|
||||
// getting merged at the root.
|
||||
targetPath?: strings.MaxRunes(250) & {
|
||||
=~"^([a-zA-Z0-9_\\-.\\\\\\/]|\\[[0-9]{1,5}\\])+$"
|
||||
}
|
||||
|
||||
// ValuesKey is the data key where the values.yaml or a specific
|
||||
// value can be found at. Defaults to 'values.yaml'. When set,
|
||||
// must be a valid Data Key, consisting of alphanumeric
|
||||
// characters, '-', '_' or '.'.
|
||||
valuesKey?: strings.MaxRunes(253) & {
|
||||
=~"^[\\-._a-zA-Z0-9]+$"
|
||||
}
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,697 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f https://github.com/fluxcd/flux2/releases/download/v2.2.3/install.yaml
|
||||
|
||||
package v2beta2
|
||||
|
||||
import "strings"
|
||||
|
||||
// HelmRelease is the Schema for the helmreleases API
|
||||
#HelmRelease: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "helm.toolkit.fluxcd.io/v2beta2"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "HelmRelease"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// HelmReleaseSpec defines the desired state of a Helm release.
|
||||
spec!: #HelmReleaseSpec
|
||||
}
|
||||
|
||||
// HelmReleaseSpec defines the desired state of a Helm release.
|
||||
#HelmReleaseSpec: {
|
||||
// Chart defines the template of the v1beta2.HelmChart that should
|
||||
// be created for this HelmRelease.
|
||||
chart: {
|
||||
// ObjectMeta holds the template for metadata like labels and
|
||||
// annotations.
|
||||
metadata?: {
|
||||
// Annotations is an unstructured key value map stored with a
|
||||
// resource that may be set by external tools to store and
|
||||
// retrieve arbitrary metadata. They are not queryable and should
|
||||
// be preserved when modifying objects. More info:
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Map of string keys and values that can be used to organize and
|
||||
// categorize (scope and select) objects. More info:
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Spec holds the template for the v1beta2.HelmChartSpec for this
|
||||
// HelmRelease.
|
||||
spec: {
|
||||
// The name or path the Helm chart is available at in the
|
||||
// SourceRef.
|
||||
chart: strings.MaxRunes(2048) & strings.MinRunes(1)
|
||||
|
||||
// Interval at which to check the v1.Source for updates. Defaults
|
||||
// to 'HelmReleaseSpec.Interval'.
|
||||
interval?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
|
||||
// Determines what enables the creation of a new artifact. Valid
|
||||
// values are ('ChartVersion', 'Revision'). See the documentation
|
||||
// of the values for an explanation on their behavior. Defaults
|
||||
// to ChartVersion when omitted.
|
||||
reconcileStrategy?: "ChartVersion" | "Revision" | *"ChartVersion"
|
||||
|
||||
// The name and namespace of the v1.Source the chart is available
|
||||
// at.
|
||||
sourceRef: {
|
||||
// APIVersion of the referent.
|
||||
apiVersion?: string
|
||||
|
||||
// Kind of the referent.
|
||||
kind?: "HelmRepository" | "GitRepository" | "Bucket"
|
||||
|
||||
// Name of the referent.
|
||||
name: strings.MaxRunes(253) & strings.MinRunes(1)
|
||||
|
||||
// Namespace of the referent.
|
||||
namespace?: strings.MaxRunes(63) & strings.MinRunes(1)
|
||||
}
|
||||
|
||||
// Alternative values file to use as the default chart values,
|
||||
// expected to be a relative path in the SourceRef. Deprecated in
|
||||
// favor of ValuesFiles, for backwards compatibility the file
|
||||
// defined here is merged before the ValuesFiles items. Ignored
|
||||
// when omitted.
|
||||
valuesFile?: string
|
||||
|
||||
// Alternative list of values files to use as the chart values
|
||||
// (values.yaml is not included by default), expected to be a
|
||||
// relative path in the SourceRef. Values files are merged in the
|
||||
// order of this list with the last file overriding the first.
|
||||
// Ignored when omitted.
|
||||
valuesFiles?: [...string]
|
||||
|
||||
// Verify contains the secret name containing the trusted public
|
||||
// keys used to verify the signature and specifies which provider
|
||||
// to use to check whether OCI image is authentic. This field is
|
||||
// only supported for OCI sources. Chart dependencies, which are
|
||||
// not bundled in the umbrella chart artifact, are not verified.
|
||||
verify?: {
|
||||
// Provider specifies the technology used to sign the OCI Helm
|
||||
// chart.
|
||||
provider: "cosign" | *"cosign"
|
||||
secretRef?: {
|
||||
// Name of the referent.
|
||||
name: string
|
||||
}
|
||||
}
|
||||
|
||||
// Version semver expression, ignored for charts from
|
||||
// v1beta2.GitRepository and v1beta2.Bucket sources. Defaults to
|
||||
// latest when omitted.
|
||||
version?: string | *"*"
|
||||
}
|
||||
}
|
||||
|
||||
// DependsOn may contain a meta.NamespacedObjectReference slice
|
||||
// with references to HelmRelease resources that must be ready
|
||||
// before this HelmRelease can be reconciled.
|
||||
dependsOn?: [...{
|
||||
// Name of the referent.
|
||||
name: string
|
||||
|
||||
// Namespace of the referent, when not specified it acts as
|
||||
// LocalObjectReference.
|
||||
namespace?: string
|
||||
}]
|
||||
|
||||
// DriftDetection holds the configuration for detecting and
|
||||
// handling differences between the manifest in the Helm storage
|
||||
// and the resources currently existing in the cluster.
|
||||
driftDetection?: {
|
||||
// Ignore contains a list of rules for specifying which changes to
|
||||
// ignore during diffing.
|
||||
ignore?: [...{
|
||||
// Paths is a list of JSON Pointer (RFC 6901) paths to be excluded
|
||||
// from consideration in a Kubernetes object.
|
||||
paths: [...string]
|
||||
|
||||
// Target is a selector for specifying Kubernetes objects to which
|
||||
// this rule applies. If Target is not set, the Paths will be
|
||||
// ignored for all Kubernetes objects within the manifest of the
|
||||
// Helm release.
|
||||
target?: {
|
||||
// AnnotationSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource annotations.
|
||||
annotationSelector?: string
|
||||
|
||||
// Group is the API group to select resources from. Together with
|
||||
// Version and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
group?: string
|
||||
|
||||
// Kind of the API Group to select resources from. Together with
|
||||
// Group and Version it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
kind?: string
|
||||
|
||||
// LabelSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource labels.
|
||||
labelSelector?: string
|
||||
|
||||
// Name to match resources with.
|
||||
name?: string
|
||||
|
||||
// Namespace to select resources from.
|
||||
namespace?: string
|
||||
|
||||
// Version of the API Group to select resources from. Together
|
||||
// with Group and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
version?: string
|
||||
}
|
||||
}]
|
||||
|
||||
// Mode defines how differences should be handled between the Helm
|
||||
// manifest and the manifest currently applied to the cluster. If
|
||||
// not explicitly set, it defaults to DiffModeDisabled.
|
||||
mode?: "enabled" | "warn" | "disabled"
|
||||
}
|
||||
|
||||
// Install holds the configuration for Helm install actions for
|
||||
// this HelmRelease.
|
||||
install?: {
|
||||
// CRDs upgrade CRDs from the Helm Chart's crds directory
|
||||
// according to the CRD upgrade policy provided here. Valid
|
||||
// values are `Skip`, `Create` or `CreateReplace`. Default is
|
||||
// `Create` and if omitted CRDs are installed but not updated.
|
||||
// Skip: do neither install nor replace (update) any CRDs.
|
||||
// Create: new CRDs are created, existing CRDs are neither updated
|
||||
// nor deleted.
|
||||
// CreateReplace: new CRDs are created, existing CRDs are updated
|
||||
// (replaced) but not deleted.
|
||||
// By default, CRDs are applied (installed) during Helm install
|
||||
// action. With this option users can opt in to CRD replace
|
||||
// existing CRDs on Helm install actions, which is not (yet)
|
||||
// natively supported by Helm.
|
||||
// https://helm.sh/docs/chart_best_practices/custom_resource_definitions.
|
||||
crds?: "Skip" | "Create" | "CreateReplace"
|
||||
|
||||
// CreateNamespace tells the Helm install action to create the
|
||||
// HelmReleaseSpec.TargetNamespace if it does not exist yet. On
|
||||
// uninstall, the namespace will not be garbage collected.
|
||||
createNamespace?: bool
|
||||
|
||||
// DisableHooks prevents hooks from running during the Helm
|
||||
// install action.
|
||||
disableHooks?: bool
|
||||
|
||||
// DisableOpenAPIValidation prevents the Helm install action from
|
||||
// validating rendered templates against the Kubernetes OpenAPI
|
||||
// Schema.
|
||||
disableOpenAPIValidation?: bool
|
||||
|
||||
// DisableWait disables the waiting for resources to be ready
|
||||
// after a Helm install has been performed.
|
||||
disableWait?: bool
|
||||
|
||||
// DisableWaitForJobs disables waiting for jobs to complete after
|
||||
// a Helm install has been performed.
|
||||
disableWaitForJobs?: bool
|
||||
|
||||
// Remediation holds the remediation configuration for when the
|
||||
// Helm install action for the HelmRelease fails. The default is
|
||||
// to not perform any action.
|
||||
remediation?: {
|
||||
// IgnoreTestFailures tells the controller to skip remediation
|
||||
// when the Helm tests are run after an install action but fail.
|
||||
// Defaults to 'Test.IgnoreFailures'.
|
||||
ignoreTestFailures?: bool
|
||||
|
||||
// RemediateLastFailure tells the controller to remediate the last
|
||||
// failure, when no retries remain. Defaults to 'false'.
|
||||
remediateLastFailure?: bool
|
||||
|
||||
// Retries is the number of retries that should be attempted on
|
||||
// failures before bailing. Remediation, using an uninstall, is
|
||||
// performed between each attempt. Defaults to '0', a negative
|
||||
// integer equals to unlimited retries.
|
||||
retries?: int
|
||||
}
|
||||
|
||||
// Replace tells the Helm install action to re-use the
|
||||
// 'ReleaseName', but only if that name is a deleted release
|
||||
// which remains in the history.
|
||||
replace?: bool
|
||||
|
||||
// SkipCRDs tells the Helm install action to not install any CRDs.
|
||||
// By default, CRDs are installed if not already present.
|
||||
// Deprecated use CRD policy (`crds`) attribute with value `Skip`
|
||||
// instead.
|
||||
skipCRDs?: bool
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation (like Jobs for hooks) during the performance of a
|
||||
// Helm install action. Defaults to 'HelmReleaseSpec.Timeout'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
}
|
||||
|
||||
// Interval at which to reconcile the Helm release.
|
||||
interval: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
kubeConfig?: {
|
||||
// SecretRef holds the name of a secret that contains a key with
|
||||
// the kubeconfig file as the value. If no key is set, the key
|
||||
// will default to 'value'. It is recommended that the kubeconfig
|
||||
// is self-contained, and the secret is regularly updated if
|
||||
// credentials such as a cloud-access-token expire. Cloud
|
||||
// specific `cmd-path` auth helpers will not function without
|
||||
// adding binaries and credentials to the Pod that is responsible
|
||||
// for reconciling Kubernetes resources.
|
||||
secretRef: {
|
||||
// Key in the Secret, when not specified an
|
||||
// implementation-specific default key is used.
|
||||
key?: string
|
||||
|
||||
// Name of the Secret.
|
||||
name: string
|
||||
}
|
||||
}
|
||||
|
||||
// MaxHistory is the number of revisions saved by Helm for this
|
||||
// HelmRelease. Use '0' for an unlimited number of revisions;
|
||||
// defaults to '5'.
|
||||
maxHistory?: int
|
||||
|
||||
// PersistentClient tells the controller to use a persistent
|
||||
// Kubernetes client for this release. When enabled, the client
|
||||
// will be reused for the duration of the reconciliation, instead
|
||||
// of being created and destroyed for each (step of a) Helm
|
||||
// action.
|
||||
// This can improve performance, but may cause issues with some
|
||||
// Helm charts that for example do create Custom Resource
|
||||
// Definitions during installation outside Helm's CRD lifecycle
|
||||
// hooks, which are then not observed to be available by e.g.
|
||||
// post-install hooks.
|
||||
// If not set, it defaults to true.
|
||||
persistentClient?: bool
|
||||
|
||||
// PostRenderers holds an array of Helm PostRenderers, which will
|
||||
// be applied in order of their definition.
|
||||
postRenderers?: [...{
|
||||
// Kustomization to apply as PostRenderer.
|
||||
kustomize?: {
|
||||
// Images is a list of (image name, new name, new tag or digest)
|
||||
// for changing image names, tags or digests. This can also be
|
||||
// achieved with a patch, but this operator is simpler to
|
||||
// specify.
|
||||
images?: [...{
|
||||
// Digest is the value used to replace the original image tag. If
|
||||
// digest is present NewTag value is ignored.
|
||||
digest?: string
|
||||
|
||||
// Name is a tag-less image name.
|
||||
name: string
|
||||
|
||||
// NewName is the value used to replace the original name.
|
||||
newName?: string
|
||||
|
||||
// NewTag is the value used to replace the original tag.
|
||||
newTag?: string
|
||||
}]
|
||||
|
||||
// Strategic merge and JSON patches, defined as inline YAML
|
||||
// objects, capable of targeting objects based on kind, label and
|
||||
// annotation selectors.
|
||||
patches?: [...{
|
||||
// Patch contains an inline StrategicMerge patch or an inline
|
||||
// JSON6902 patch with an array of operation objects.
|
||||
patch: string
|
||||
|
||||
// Target points to the resources that the patch document should
|
||||
// be applied to.
|
||||
target?: {
|
||||
// AnnotationSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource annotations.
|
||||
annotationSelector?: string
|
||||
|
||||
// Group is the API group to select resources from. Together with
|
||||
// Version and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
group?: string
|
||||
|
||||
// Kind of the API Group to select resources from. Together with
|
||||
// Group and Version it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
kind?: string
|
||||
|
||||
// LabelSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource labels.
|
||||
labelSelector?: string
|
||||
|
||||
// Name to match resources with.
|
||||
name?: string
|
||||
|
||||
// Namespace to select resources from.
|
||||
namespace?: string
|
||||
|
||||
// Version of the API Group to select resources from. Together
|
||||
// with Group and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
version?: string
|
||||
}
|
||||
}]
|
||||
|
||||
// JSON 6902 patches, defined as inline YAML objects. Deprecated:
|
||||
// use Patches instead.
|
||||
patchesJson6902?: [...{
|
||||
// Patch contains the JSON6902 patch document with an array of
|
||||
// operation objects.
|
||||
patch: [...{
|
||||
// From contains a JSON-pointer value that references a location
|
||||
// within the target document where the operation is performed.
|
||||
// The meaning of the value depends on the value of Op, and is
|
||||
// NOT taken into account by all operations.
|
||||
from?: string
|
||||
|
||||
// Op indicates the operation to perform. Its value MUST be one of
|
||||
// "add", "remove", "replace", "move", "copy", or "test".
|
||||
// https://datatracker.ietf.org/doc/html/rfc6902#section-4
|
||||
op: "test" | "remove" | "add" | "replace" | "move" | "copy"
|
||||
|
||||
// Path contains the JSON-pointer value that references a location
|
||||
// within the target document where the operation is performed.
|
||||
// The meaning of the value depends on the value of Op.
|
||||
path: string
|
||||
|
||||
// Value contains a valid JSON structure. The meaning of the value
|
||||
// depends on the value of Op, and is NOT taken into account by
|
||||
// all operations.
|
||||
value?: _
|
||||
}]
|
||||
|
||||
// Target points to the resources that the patch document should
|
||||
// be applied to.
|
||||
target: {
|
||||
// AnnotationSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource annotations.
|
||||
annotationSelector?: string
|
||||
|
||||
// Group is the API group to select resources from. Together with
|
||||
// Version and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
group?: string
|
||||
|
||||
// Kind of the API Group to select resources from. Together with
|
||||
// Group and Version it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
kind?: string
|
||||
|
||||
// LabelSelector is a string that follows the label selection
|
||||
// expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource labels.
|
||||
labelSelector?: string
|
||||
|
||||
// Name to match resources with.
|
||||
name?: string
|
||||
|
||||
// Namespace to select resources from.
|
||||
namespace?: string
|
||||
|
||||
// Version of the API Group to select resources from. Together
|
||||
// with Group and Kind it is capable of unambiguously identifying
|
||||
// and/or selecting resources.
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
|
||||
version?: string
|
||||
}
|
||||
}]
|
||||
|
||||
// Strategic merge patches, defined as inline YAML objects.
|
||||
// Deprecated: use Patches instead.
|
||||
patchesStrategicMerge?: [...]
|
||||
}
|
||||
}]
|
||||
|
||||
// ReleaseName used for the Helm release. Defaults to a
|
||||
// composition of '[TargetNamespace-]Name'.
|
||||
releaseName?: strings.MaxRunes(53) & strings.MinRunes(1)
|
||||
|
||||
// Rollback holds the configuration for Helm rollback actions for
|
||||
// this HelmRelease.
|
||||
rollback?: {
|
||||
// CleanupOnFail allows deletion of new resources created during
|
||||
// the Helm rollback action when it fails.
|
||||
cleanupOnFail?: bool
|
||||
|
||||
// DisableHooks prevents hooks from running during the Helm
|
||||
// rollback action.
|
||||
disableHooks?: bool
|
||||
|
||||
// DisableWait disables the waiting for resources to be ready
|
||||
// after a Helm rollback has been performed.
|
||||
disableWait?: bool
|
||||
|
||||
// DisableWaitForJobs disables waiting for jobs to complete after
|
||||
// a Helm rollback has been performed.
|
||||
disableWaitForJobs?: bool
|
||||
|
||||
// Force forces resource updates through a replacement strategy.
|
||||
force?: bool
|
||||
|
||||
// Recreate performs pod restarts for the resource if applicable.
|
||||
recreate?: bool
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation (like Jobs for hooks) during the performance of a
|
||||
// Helm rollback action. Defaults to 'HelmReleaseSpec.Timeout'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
}
|
||||
|
||||
// The name of the Kubernetes service account to impersonate when
|
||||
// reconciling this HelmRelease.
|
||||
serviceAccountName?: strings.MaxRunes(253) & strings.MinRunes(1)
|
||||
|
||||
// StorageNamespace used for the Helm storage. Defaults to the
|
||||
// namespace of the HelmRelease.
|
||||
storageNamespace?: strings.MaxRunes(63) & strings.MinRunes(1)
|
||||
|
||||
// Suspend tells the controller to suspend reconciliation for this
|
||||
// HelmRelease, it does not apply to already started
|
||||
// reconciliations. Defaults to false.
|
||||
suspend?: bool
|
||||
|
||||
// TargetNamespace to target when performing operations for the
|
||||
// HelmRelease. Defaults to the namespace of the HelmRelease.
|
||||
targetNamespace?: strings.MaxRunes(63) & strings.MinRunes(1)
|
||||
|
||||
// Test holds the configuration for Helm test actions for this
|
||||
// HelmRelease.
|
||||
test?: {
|
||||
// Enable enables Helm test actions for this HelmRelease after an
|
||||
// Helm install or upgrade action has been performed.
|
||||
enable?: bool
|
||||
|
||||
// Filters is a list of tests to run or exclude from running.
|
||||
filters?: [...{
|
||||
// Exclude specifies whether the named test should be excluded.
|
||||
exclude?: bool
|
||||
|
||||
// Name is the name of the test.
|
||||
name: strings.MaxRunes(253) & strings.MinRunes(1)
|
||||
}]
|
||||
|
||||
// IgnoreFailures tells the controller to skip remediation when
|
||||
// the Helm tests are run but fail. Can be overwritten for tests
|
||||
// run after install or upgrade actions in
|
||||
// 'Install.IgnoreTestFailures' and 'Upgrade.IgnoreTestFailures'.
|
||||
ignoreFailures?: bool
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation during the performance of a Helm test action.
|
||||
// Defaults to 'HelmReleaseSpec.Timeout'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
}
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation (like Jobs for hooks) during the performance of a
|
||||
// Helm action. Defaults to '5m0s'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
|
||||
// Uninstall holds the configuration for Helm uninstall actions
|
||||
// for this HelmRelease.
|
||||
uninstall?: {
|
||||
// DeletionPropagation specifies the deletion propagation policy
|
||||
// when a Helm uninstall is performed.
|
||||
deletionPropagation?: "background" | "foreground" | "orphan" | *"background"
|
||||
|
||||
// DisableHooks prevents hooks from running during the Helm
|
||||
// rollback action.
|
||||
disableHooks?: bool
|
||||
|
||||
// DisableWait disables waiting for all the resources to be
|
||||
// deleted after a Helm uninstall is performed.
|
||||
disableWait?: bool
|
||||
|
||||
// KeepHistory tells Helm to remove all associated resources and
|
||||
// mark the release as deleted, but retain the release history.
|
||||
keepHistory?: bool
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation (like Jobs for hooks) during the performance of a
|
||||
// Helm uninstall action. Defaults to 'HelmReleaseSpec.Timeout'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
}
|
||||
|
||||
// Upgrade holds the configuration for Helm upgrade actions for
|
||||
// this HelmRelease.
|
||||
upgrade?: {
|
||||
// CleanupOnFail allows deletion of new resources created during
|
||||
// the Helm upgrade action when it fails.
|
||||
cleanupOnFail?: bool
|
||||
|
||||
// CRDs upgrade CRDs from the Helm Chart's crds directory
|
||||
// according to the CRD upgrade policy provided here. Valid
|
||||
// values are `Skip`, `Create` or `CreateReplace`. Default is
|
||||
// `Skip` and if omitted CRDs are neither installed nor upgraded.
|
||||
// Skip: do neither install nor replace (update) any CRDs.
|
||||
// Create: new CRDs are created, existing CRDs are neither updated
|
||||
// nor deleted.
|
||||
// CreateReplace: new CRDs are created, existing CRDs are updated
|
||||
// (replaced) but not deleted.
|
||||
// By default, CRDs are not applied during Helm upgrade action.
|
||||
// With this option users can opt-in to CRD upgrade, which is not
|
||||
// (yet) natively supported by Helm.
|
||||
// https://helm.sh/docs/chart_best_practices/custom_resource_definitions.
|
||||
crds?: "Skip" | "Create" | "CreateReplace"
|
||||
|
||||
// DisableHooks prevents hooks from running during the Helm
|
||||
// upgrade action.
|
||||
disableHooks?: bool
|
||||
|
||||
// DisableOpenAPIValidation prevents the Helm upgrade action from
|
||||
// validating rendered templates against the Kubernetes OpenAPI
|
||||
// Schema.
|
||||
disableOpenAPIValidation?: bool
|
||||
|
||||
// DisableWait disables the waiting for resources to be ready
|
||||
// after a Helm upgrade has been performed.
|
||||
disableWait?: bool
|
||||
|
||||
// DisableWaitForJobs disables waiting for jobs to complete after
|
||||
// a Helm upgrade has been performed.
|
||||
disableWaitForJobs?: bool
|
||||
|
||||
// Force forces resource updates through a replacement strategy.
|
||||
force?: bool
|
||||
|
||||
// PreserveValues will make Helm reuse the last release's values
|
||||
// and merge in overrides from 'Values'. Setting this flag makes
|
||||
// the HelmRelease non-declarative.
|
||||
preserveValues?: bool
|
||||
|
||||
// Remediation holds the remediation configuration for when the
|
||||
// Helm upgrade action for the HelmRelease fails. The default is
|
||||
// to not perform any action.
|
||||
remediation?: {
|
||||
// IgnoreTestFailures tells the controller to skip remediation
|
||||
// when the Helm tests are run after an upgrade action but fail.
|
||||
// Defaults to 'Test.IgnoreFailures'.
|
||||
ignoreTestFailures?: bool
|
||||
|
||||
// RemediateLastFailure tells the controller to remediate the last
|
||||
// failure, when no retries remain. Defaults to 'false' unless
|
||||
// 'Retries' is greater than 0.
|
||||
remediateLastFailure?: bool
|
||||
|
||||
// Retries is the number of retries that should be attempted on
|
||||
// failures before bailing. Remediation, using 'Strategy', is
|
||||
// performed between each attempt. Defaults to '0', a negative
|
||||
// integer equals to unlimited retries.
|
||||
retries?: int
|
||||
|
||||
// Strategy to use for failure remediation. Defaults to
|
||||
// 'rollback'.
|
||||
strategy?: "rollback" | "uninstall"
|
||||
}
|
||||
|
||||
// Timeout is the time to wait for any individual Kubernetes
|
||||
// operation (like Jobs for hooks) during the performance of a
|
||||
// Helm upgrade action. Defaults to 'HelmReleaseSpec.Timeout'.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
}
|
||||
|
||||
// Values holds the values for this Helm release.
|
||||
values?: _
|
||||
|
||||
// ValuesFrom holds references to resources containing Helm values
|
||||
// for this HelmRelease, and information about how they should be
|
||||
// merged.
|
||||
valuesFrom?: [...{
|
||||
// Kind of the values referent, valid values are ('Secret',
|
||||
// 'ConfigMap').
|
||||
kind: "Secret" | "ConfigMap"
|
||||
|
||||
// Name of the values referent. Should reside in the same
|
||||
// namespace as the referring resource.
|
||||
name: strings.MaxRunes(253) & strings.MinRunes(1)
|
||||
|
||||
// Optional marks this ValuesReference as optional. When set, a
|
||||
// not found error for the values reference is ignored, but any
|
||||
// ValuesKey, TargetPath or transient error will still result in
|
||||
// a reconciliation failure.
|
||||
optional?: bool
|
||||
|
||||
// TargetPath is the YAML dot notation path the value should be
|
||||
// merged at. When set, the ValuesKey is expected to be a single
|
||||
// flat value. Defaults to 'None', which results in the values
|
||||
// getting merged at the root.
|
||||
targetPath?: strings.MaxRunes(250) & {
|
||||
=~"^([a-zA-Z0-9_\\-.\\\\\\/]|\\[[0-9]{1,5}\\])+$"
|
||||
}
|
||||
|
||||
// ValuesKey is the data key where the values.yaml or a specific
|
||||
// value can be found at. Defaults to 'values.yaml'.
|
||||
valuesKey?: strings.MaxRunes(253) & {
|
||||
=~"^[\\-._a-zA-Z0-9]+$"
|
||||
}
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f https://github.com/fluxcd/flux2/releases/download/v2.2.3/install.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
// ImagePolicy is the Schema for the imagepolicies API
|
||||
#ImagePolicy: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "image.toolkit.fluxcd.io/v1beta1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "ImagePolicy"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// ImagePolicySpec defines the parameters for calculating the
|
||||
// ImagePolicy
|
||||
spec!: #ImagePolicySpec
|
||||
}
|
||||
|
||||
// ImagePolicySpec defines the parameters for calculating the
|
||||
// ImagePolicy
|
||||
#ImagePolicySpec: {
|
||||
// FilterTags enables filtering for only a subset of tags based on
|
||||
// a set of rules. If no rules are provided, all the tags from
|
||||
// the repository will be ordered and compared.
|
||||
filterTags?: {
|
||||
// Extract allows a capture group to be extracted from the
|
||||
// specified regular expression pattern, useful before tag
|
||||
// evaluation.
|
||||
extract?: string
|
||||
|
||||
// Pattern specifies a regular expression pattern used to filter
|
||||
// for image tags.
|
||||
pattern?: string
|
||||
}
|
||||
|
||||
// ImageRepositoryRef points at the object specifying the image
|
||||
// being scanned
|
||||
imageRepositoryRef: {
|
||||
// Name of the referent.
|
||||
name: string
|
||||
|
||||
// Namespace of the referent, when not specified it acts as
|
||||
// LocalObjectReference.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// Policy gives the particulars of the policy to be followed in
|
||||
// selecting the most recent image
|
||||
policy: {
|
||||
alphabetical?: {
|
||||
// Order specifies the sorting order of the tags. Given the
|
||||
// letters of the alphabet as tags, ascending order would select
|
||||
// Z, and descending order would select A.
|
||||
order?: "asc" | "desc" | *"asc"
|
||||
}
|
||||
numerical?: {
|
||||
// Order specifies the sorting order of the tags. Given the
|
||||
// integer values from 0 to 9 as tags, ascending order would
|
||||
// select 9, and descending order would select 0.
|
||||
order?: "asc" | "desc" | *"asc"
|
||||
}
|
||||
semver?: {
|
||||
// Range gives a semver range for the image tag; the highest
|
||||
// version within the range that's a tag yields the latest image.
|
||||
range: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f https://github.com/fluxcd/flux2/releases/download/v2.2.3/install.yaml
|
||||
|
||||
package v1beta2
|
||||
|
||||
import "strings"
|
||||
|
||||
// ImagePolicy is the Schema for the imagepolicies API
|
||||
#ImagePolicy: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "image.toolkit.fluxcd.io/v1beta2"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "ImagePolicy"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// ImagePolicySpec defines the parameters for calculating the
|
||||
// ImagePolicy.
|
||||
spec!: #ImagePolicySpec
|
||||
}
|
||||
|
||||
// ImagePolicySpec defines the parameters for calculating the
|
||||
// ImagePolicy.
|
||||
#ImagePolicySpec: {
|
||||
// FilterTags enables filtering for only a subset of tags based on
|
||||
// a set of rules. If no rules are provided, all the tags from
|
||||
// the repository will be ordered and compared.
|
||||
filterTags?: {
|
||||
// Extract allows a capture group to be extracted from the
|
||||
// specified regular expression pattern, useful before tag
|
||||
// evaluation.
|
||||
extract?: string
|
||||
|
||||
// Pattern specifies a regular expression pattern used to filter
|
||||
// for image tags.
|
||||
pattern?: string
|
||||
}
|
||||
|
||||
// ImageRepositoryRef points at the object specifying the image
|
||||
// being scanned
|
||||
imageRepositoryRef: {
|
||||
// Name of the referent.
|
||||
name: string
|
||||
|
||||
// Namespace of the referent, when not specified it acts as
|
||||
// LocalObjectReference.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// Policy gives the particulars of the policy to be followed in
|
||||
// selecting the most recent image
|
||||
policy: {
|
||||
alphabetical?: {
|
||||
// Order specifies the sorting order of the tags. Given the
|
||||
// letters of the alphabet as tags, ascending order would select
|
||||
// Z, and descending order would select A.
|
||||
order?: "asc" | "desc" | *"asc"
|
||||
}
|
||||
numerical?: {
|
||||
// Order specifies the sorting order of the tags. Given the
|
||||
// integer values from 0 to 9 as tags, ascending order would
|
||||
// select 9, and descending order would select 0.
|
||||
order?: "asc" | "desc" | *"asc"
|
||||
}
|
||||
semver?: {
|
||||
// Range gives a semver range for the image tag; the highest
|
||||
// version within the range that's a tag yields the latest image.
|
||||
range: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f https://github.com/fluxcd/flux2/releases/download/v2.2.3/install.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
// ImageRepository is the Schema for the imagerepositories API
|
||||
#ImageRepository: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "image.toolkit.fluxcd.io/v1beta1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "ImageRepository"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// ImageRepositorySpec defines the parameters for scanning an
|
||||
// image repository, e.g., `fluxcd/flux`.
|
||||
spec!: #ImageRepositorySpec
|
||||
}
|
||||
|
||||
// ImageRepositorySpec defines the parameters for scanning an
|
||||
// image repository, e.g., `fluxcd/flux`.
|
||||
#ImageRepositorySpec: {
|
||||
accessFrom?: {
|
||||
// NamespaceSelectors is the list of namespace selectors to which
|
||||
// this ACL applies. Items in this list are evaluated using a
|
||||
// logical OR operation.
|
||||
namespaceSelectors: [...{
|
||||
// MatchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}]
|
||||
}
|
||||
certSecretRef?: {
|
||||
// Name of the referent.
|
||||
name: string
|
||||
}
|
||||
|
||||
// ExclusionList is a list of regex strings used to exclude
|
||||
// certain tags from being stored in the database.
|
||||
exclusionList?: [...string]
|
||||
|
||||
// Image is the name of the image repository
|
||||
image?: string
|
||||
|
||||
// Interval is the length of time to wait between scans of the
|
||||
// image repository.
|
||||
interval?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
secretRef?: {
|
||||
// Name of the referent.
|
||||
name: string
|
||||
}
|
||||
|
||||
// ServiceAccountName is the name of the Kubernetes ServiceAccount
|
||||
// used to authenticate the image pull if the service account has
|
||||
// attached pull secrets.
|
||||
serviceAccountName?: strings.MaxRunes(253)
|
||||
|
||||
// This flag tells the controller to suspend subsequent image
|
||||
// scans. It does not apply to already started scans. Defaults to
|
||||
// false.
|
||||
suspend?: bool
|
||||
|
||||
// Timeout for image scanning. Defaults to 'Interval' duration.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m))+$"
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f https://github.com/fluxcd/flux2/releases/download/v2.2.3/install.yaml
|
||||
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"list"
|
||||
)
|
||||
|
||||
// ImageRepository is the Schema for the imagerepositories API
|
||||
#ImageRepository: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "image.toolkit.fluxcd.io/v1beta2"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "ImageRepository"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// ImageRepositorySpec defines the parameters for scanning an
|
||||
// image repository, e.g., `fluxcd/flux`.
|
||||
spec!: #ImageRepositorySpec
|
||||
}
|
||||
|
||||
// ImageRepositorySpec defines the parameters for scanning an
|
||||
// image repository, e.g., `fluxcd/flux`.
|
||||
#ImageRepositorySpec: {
|
||||
accessFrom?: {
|
||||
// NamespaceSelectors is the list of namespace selectors to which
|
||||
// this ACL applies. Items in this list are evaluated using a
|
||||
// logical OR operation.
|
||||
namespaceSelectors: [...{
|
||||
// MatchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}]
|
||||
}
|
||||
certSecretRef?: {
|
||||
// Name of the referent.
|
||||
name: string
|
||||
}
|
||||
|
||||
// ExclusionList is a list of regex strings used to exclude
|
||||
// certain tags from being stored in the database.
|
||||
exclusionList?: list.MaxItems(25) & [...string] | *["^.*\\.sig$"]
|
||||
|
||||
// Image is the name of the image repository
|
||||
image?: string
|
||||
|
||||
// Insecure allows connecting to a non-TLS HTTP container
|
||||
// registry.
|
||||
insecure?: bool
|
||||
|
||||
// Interval is the length of time to wait between scans of the
|
||||
// image repository.
|
||||
interval?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
|
||||
// The provider used for authentication, can be 'aws', 'azure',
|
||||
// 'gcp' or 'generic'. When not specified, defaults to 'generic'.
|
||||
provider?: "generic" | "aws" | "azure" | "gcp" | *"generic"
|
||||
secretRef?: {
|
||||
// Name of the referent.
|
||||
name: string
|
||||
}
|
||||
|
||||
// ServiceAccountName is the name of the Kubernetes ServiceAccount
|
||||
// used to authenticate the image pull if the service account has
|
||||
// attached pull secrets.
|
||||
serviceAccountName?: strings.MaxRunes(253)
|
||||
|
||||
// This flag tells the controller to suspend subsequent image
|
||||
// scans. It does not apply to already started scans. Defaults to
|
||||
// false.
|
||||
suspend?: bool
|
||||
|
||||
// Timeout for image scanning. Defaults to 'Interval' duration.
|
||||
timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m))+$"
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f https://github.com/fluxcd/flux2/releases/download/v2.2.3/install.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
// ImageUpdateAutomation is the Schema for the
|
||||
// imageupdateautomations API
|
||||
#ImageUpdateAutomation: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "image.toolkit.fluxcd.io/v1beta1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "ImageUpdateAutomation"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// ImageUpdateAutomationSpec defines the desired state of
|
||||
// ImageUpdateAutomation
|
||||
spec!: #ImageUpdateAutomationSpec
|
||||
}
|
||||
|
||||
// ImageUpdateAutomationSpec defines the desired state of
|
||||
// ImageUpdateAutomation
|
||||
#ImageUpdateAutomationSpec: {
|
||||
// GitSpec contains all the git-specific definitions. This is
|
||||
// technically optional, but in practice mandatory until there
|
||||
// are other kinds of source allowed.
|
||||
git?: {
|
||||
checkout?: {
|
||||
// Reference gives a branch, tag or commit to clone from the Git
|
||||
// repository.
|
||||
ref: {
|
||||
// Branch to check out, defaults to 'master' if no other field is
|
||||
// defined.
|
||||
branch?: string
|
||||
|
||||
// Commit SHA to check out, takes precedence over all reference
|
||||
// fields.
|
||||
// This can be combined with Branch to shallow clone the branch,
|
||||
// in which the commit is expected to exist.
|
||||
commit?: string
|
||||
|
||||
// Name of the reference to check out; takes precedence over
|
||||
// Branch, Tag and SemVer.
|
||||
// It must be a valid Git reference:
|
||||
// https://git-scm.com/docs/git-check-ref-format#_description
|
||||
// Examples: "refs/heads/main", "refs/tags/v0.1.0",
|
||||
// "refs/pull/420/head", "refs/merge-requests/1/head"
|
||||
name?: string
|
||||
|
||||
// SemVer tag expression to check out, takes precedence over Tag.
|
||||
semver?: string
|
||||
|
||||
// Tag to check out, takes precedence over Branch.
|
||||
tag?: string
|
||||
}
|
||||
}
|
||||
|
||||
// Commit specifies how to commit to the git repository.
|
||||
commit: {
|
||||
// Author gives the email and optionally the name to use as the
|
||||
// author of commits.
|
||||
author: {
|
||||
// Email gives the email to provide when making a commit.
|
||||
email: string
|
||||
|
||||
// Name gives the name to provide when making a commit.
|
||||
name?: string
|
||||
}
|
||||
|
||||
// MessageTemplate provides a template for the commit message,
|
||||
// into which will be interpolated the details of the change
|
||||
// made.
|
||||
messageTemplate?: string
|
||||
signingKey?: {
|
||||
secretRef?: {
|
||||
// Name of the referent.
|
||||
name: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Push specifies how and where to push commits made by the
|
||||
// automation. If missing, commits are pushed (back) to
|
||||
// `.spec.checkout.branch` or its default.
|
||||
push?: {
|
||||
// Branch specifies that commits should be pushed to the branch
|
||||
// named. The branch is created using `.spec.checkout.branch` as
|
||||
// the starting point, if it doesn't already exist.
|
||||
branch?: string
|
||||
|
||||
// Options specifies the push options that are sent to the Git
|
||||
// server when performing a push operation. For details, see:
|
||||
// https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt
|
||||
options?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Refspec specifies the Git Refspec to use for a push operation.
|
||||
// If both Branch and Refspec are provided, then the commit is
|
||||
// pushed to the branch and also using the specified refspec. For
|
||||
// more details about Git Refspecs, see:
|
||||
// https://git-scm.com/book/en/v2/Git-Internals-The-Refspec
|
||||
refspec?: string
|
||||
}
|
||||
}
|
||||
|
||||
// Interval gives an lower bound for how often the automation run
|
||||
// should be attempted.
|
||||
interval: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
|
||||
// SourceRef refers to the resource giving access details to a git
|
||||
// repository.
|
||||
sourceRef: {
|
||||
// API version of the referent.
|
||||
apiVersion?: string
|
||||
|
||||
// Kind of the referent.
|
||||
kind: "GitRepository" | *"GitRepository"
|
||||
|
||||
// Name of the referent.
|
||||
name: string
|
||||
|
||||
// Namespace of the referent, defaults to the namespace of the
|
||||
// Kubernetes resource object that contains the reference.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// Suspend tells the controller to not run this automation, until
|
||||
// it is unset (or set to false). Defaults to false.
|
||||
suspend?: bool
|
||||
|
||||
// Update gives the specification for how to update the files in
|
||||
// the repository. This can be left empty, to use the default
|
||||
// value.
|
||||
update?: {
|
||||
// Path to the directory containing the manifests to be updated.
|
||||
// Defaults to 'None', which translates to the root path of the
|
||||
// GitRepositoryRef.
|
||||
path?: string
|
||||
|
||||
// Strategy names the strategy to be used.
|
||||
strategy: "Setters" | *"Setters"
|
||||
} | *{
|
||||
strategy: "Setters"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admission/v1
|
||||
|
||||
package v1
|
||||
|
||||
#GroupName: "admission.k8s.io"
|
||||
@@ -0,0 +1,172 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admission/v1
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
authenticationv1 "k8s.io/api/authentication/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// AdmissionReview describes an admission review request/response.
|
||||
#AdmissionReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Request describes the attributes for the admission request.
|
||||
// +optional
|
||||
request?: null | #AdmissionRequest @go(Request,*AdmissionRequest) @protobuf(1,bytes,opt)
|
||||
|
||||
// Response describes the attributes for the admission response.
|
||||
// +optional
|
||||
response?: null | #AdmissionResponse @go(Response,*AdmissionResponse) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// AdmissionRequest describes the admission.Attributes for the admission request.
|
||||
#AdmissionRequest: {
|
||||
// UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
|
||||
// otherwise identical (parallel requests, requests when earlier requests did not modify etc)
|
||||
// The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
|
||||
// It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
|
||||
uid: types.#UID @go(UID) @protobuf(1,bytes,opt)
|
||||
|
||||
// Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
|
||||
kind: metav1.#GroupVersionKind @go(Kind) @protobuf(2,bytes,opt)
|
||||
|
||||
// Resource is the fully-qualified resource being requested (for example, v1.pods)
|
||||
resource: metav1.#GroupVersionResource @go(Resource) @protobuf(3,bytes,opt)
|
||||
|
||||
// SubResource is the subresource being requested, if any (for example, "status" or "scale")
|
||||
// +optional
|
||||
subResource?: string @go(SubResource) @protobuf(4,bytes,opt)
|
||||
|
||||
// RequestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale).
|
||||
// If this is specified and differs from the value in "kind", an equivalent match and conversion was performed.
|
||||
//
|
||||
// For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
|
||||
// `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
|
||||
// an API request to apps/v1beta1 deployments would be converted and sent to the webhook
|
||||
// with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for),
|
||||
// and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request).
|
||||
//
|
||||
// See documentation for the "matchPolicy" field in the webhook configuration type for more details.
|
||||
// +optional
|
||||
requestKind?: null | metav1.#GroupVersionKind @go(RequestKind,*metav1.GroupVersionKind) @protobuf(13,bytes,opt)
|
||||
|
||||
// RequestResource is the fully-qualified resource of the original API request (for example, v1.pods).
|
||||
// If this is specified and differs from the value in "resource", an equivalent match and conversion was performed.
|
||||
//
|
||||
// For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
|
||||
// `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
|
||||
// an API request to apps/v1beta1 deployments would be converted and sent to the webhook
|
||||
// with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for),
|
||||
// and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request).
|
||||
//
|
||||
// See documentation for the "matchPolicy" field in the webhook configuration type.
|
||||
// +optional
|
||||
requestResource?: null | metav1.#GroupVersionResource @go(RequestResource,*metav1.GroupVersionResource) @protobuf(14,bytes,opt)
|
||||
|
||||
// RequestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale")
|
||||
// If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed.
|
||||
// See documentation for the "matchPolicy" field in the webhook configuration type.
|
||||
// +optional
|
||||
requestSubResource?: string @go(RequestSubResource) @protobuf(15,bytes,opt)
|
||||
|
||||
// Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and
|
||||
// rely on the server to generate the name. If that is the case, this field will contain an empty string.
|
||||
// +optional
|
||||
name?: string @go(Name) @protobuf(5,bytes,opt)
|
||||
|
||||
// Namespace is the namespace associated with the request (if any).
|
||||
// +optional
|
||||
namespace?: string @go(Namespace) @protobuf(6,bytes,opt)
|
||||
|
||||
// Operation is the operation being performed. This may be different than the operation
|
||||
// requested. e.g. a patch can result in either a CREATE or UPDATE Operation.
|
||||
operation: #Operation @go(Operation) @protobuf(7,bytes,opt)
|
||||
|
||||
// UserInfo is information about the requesting user
|
||||
userInfo: authenticationv1.#UserInfo @go(UserInfo) @protobuf(8,bytes,opt)
|
||||
|
||||
// Object is the object from the incoming request.
|
||||
// +optional
|
||||
object?: runtime.#RawExtension @go(Object) @protobuf(9,bytes,opt)
|
||||
|
||||
// OldObject is the existing object. Only populated for DELETE and UPDATE requests.
|
||||
// +optional
|
||||
oldObject?: runtime.#RawExtension @go(OldObject) @protobuf(10,bytes,opt)
|
||||
|
||||
// DryRun indicates that modifications will definitely not be persisted for this request.
|
||||
// Defaults to false.
|
||||
// +optional
|
||||
dryRun?: null | bool @go(DryRun,*bool) @protobuf(11,varint,opt)
|
||||
|
||||
// Options is the operation option structure of the operation being performed.
|
||||
// e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be
|
||||
// different than the options the caller provided. e.g. for a patch request the performed
|
||||
// Operation might be a CREATE, in which case the Options will a
|
||||
// `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.
|
||||
// +optional
|
||||
options?: runtime.#RawExtension @go(Options) @protobuf(12,bytes,opt)
|
||||
}
|
||||
|
||||
// AdmissionResponse describes an admission response.
|
||||
#AdmissionResponse: {
|
||||
// UID is an identifier for the individual request/response.
|
||||
// This must be copied over from the corresponding AdmissionRequest.
|
||||
uid: types.#UID @go(UID) @protobuf(1,bytes,opt)
|
||||
|
||||
// Allowed indicates whether or not the admission request was permitted.
|
||||
allowed: bool @go(Allowed) @protobuf(2,varint,opt)
|
||||
|
||||
// Result contains extra details into why an admission request was denied.
|
||||
// This field IS NOT consulted in any way if "Allowed" is "true".
|
||||
// +optional
|
||||
status?: null | metav1.#Status @go(Result,*metav1.Status) @protobuf(3,bytes,opt)
|
||||
|
||||
// The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
|
||||
// +optional
|
||||
patch?: bytes @go(Patch,[]byte) @protobuf(4,bytes,opt)
|
||||
|
||||
// The type of Patch. Currently we only allow "JSONPatch".
|
||||
// +optional
|
||||
patchType?: null | #PatchType @go(PatchType,*PatchType) @protobuf(5,bytes,opt)
|
||||
|
||||
// AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
|
||||
// MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
|
||||
// admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
|
||||
// the admission webhook to add additional context to the audit log for this request.
|
||||
// +optional
|
||||
auditAnnotations?: {[string]: string} @go(AuditAnnotations,map[string]string) @protobuf(6,bytes,opt)
|
||||
|
||||
// warnings is a list of warning messages to return to the requesting API client.
|
||||
// Warning messages describe a problem the client making the API request should correct or be aware of.
|
||||
// Limit warnings to 120 characters if possible.
|
||||
// Warnings over 256 characters and large numbers of warnings may be truncated.
|
||||
// +optional
|
||||
warnings?: [...string] @go(Warnings,[]string) @protobuf(7,bytes,rep)
|
||||
}
|
||||
|
||||
// PatchType is the type of patch being used to represent the mutated object
|
||||
#PatchType: string // #enumPatchType
|
||||
|
||||
#enumPatchType:
|
||||
#PatchTypeJSONPatch
|
||||
|
||||
#PatchTypeJSONPatch: #PatchType & "JSONPatch"
|
||||
|
||||
// Operation is the type of resource operation being checked for admission control
|
||||
#Operation: string // #enumOperation
|
||||
|
||||
#enumOperation:
|
||||
#Create |
|
||||
#Update |
|
||||
#Delete |
|
||||
#Connect
|
||||
|
||||
#Create: #Operation & "CREATE"
|
||||
#Update: #Operation & "UPDATE"
|
||||
#Delete: #Operation & "DELETE"
|
||||
#Connect: #Operation & "CONNECT"
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admission/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "admission.k8s.io"
|
||||
@@ -0,0 +1,172 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admission/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
authenticationv1 "k8s.io/api/authentication/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// AdmissionReview describes an admission review request/response.
|
||||
#AdmissionReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Request describes the attributes for the admission request.
|
||||
// +optional
|
||||
request?: null | #AdmissionRequest @go(Request,*AdmissionRequest) @protobuf(1,bytes,opt)
|
||||
|
||||
// Response describes the attributes for the admission response.
|
||||
// +optional
|
||||
response?: null | #AdmissionResponse @go(Response,*AdmissionResponse) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// AdmissionRequest describes the admission.Attributes for the admission request.
|
||||
#AdmissionRequest: {
|
||||
// UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
|
||||
// otherwise identical (parallel requests, requests when earlier requests did not modify etc)
|
||||
// The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
|
||||
// It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
|
||||
uid: types.#UID @go(UID) @protobuf(1,bytes,opt)
|
||||
|
||||
// Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
|
||||
kind: metav1.#GroupVersionKind @go(Kind) @protobuf(2,bytes,opt)
|
||||
|
||||
// Resource is the fully-qualified resource being requested (for example, v1.pods)
|
||||
resource: metav1.#GroupVersionResource @go(Resource) @protobuf(3,bytes,opt)
|
||||
|
||||
// SubResource is the subresource being requested, if any (for example, "status" or "scale")
|
||||
// +optional
|
||||
subResource?: string @go(SubResource) @protobuf(4,bytes,opt)
|
||||
|
||||
// RequestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale).
|
||||
// If this is specified and differs from the value in "kind", an equivalent match and conversion was performed.
|
||||
//
|
||||
// For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
|
||||
// `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
|
||||
// an API request to apps/v1beta1 deployments would be converted and sent to the webhook
|
||||
// with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for),
|
||||
// and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request).
|
||||
//
|
||||
// See documentation for the "matchPolicy" field in the webhook configuration type for more details.
|
||||
// +optional
|
||||
requestKind?: null | metav1.#GroupVersionKind @go(RequestKind,*metav1.GroupVersionKind) @protobuf(13,bytes,opt)
|
||||
|
||||
// RequestResource is the fully-qualified resource of the original API request (for example, v1.pods).
|
||||
// If this is specified and differs from the value in "resource", an equivalent match and conversion was performed.
|
||||
//
|
||||
// For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
|
||||
// `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
|
||||
// an API request to apps/v1beta1 deployments would be converted and sent to the webhook
|
||||
// with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for),
|
||||
// and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request).
|
||||
//
|
||||
// See documentation for the "matchPolicy" field in the webhook configuration type.
|
||||
// +optional
|
||||
requestResource?: null | metav1.#GroupVersionResource @go(RequestResource,*metav1.GroupVersionResource) @protobuf(14,bytes,opt)
|
||||
|
||||
// RequestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale")
|
||||
// If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed.
|
||||
// See documentation for the "matchPolicy" field in the webhook configuration type.
|
||||
// +optional
|
||||
requestSubResource?: string @go(RequestSubResource) @protobuf(15,bytes,opt)
|
||||
|
||||
// Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and
|
||||
// rely on the server to generate the name. If that is the case, this field will contain an empty string.
|
||||
// +optional
|
||||
name?: string @go(Name) @protobuf(5,bytes,opt)
|
||||
|
||||
// Namespace is the namespace associated with the request (if any).
|
||||
// +optional
|
||||
namespace?: string @go(Namespace) @protobuf(6,bytes,opt)
|
||||
|
||||
// Operation is the operation being performed. This may be different than the operation
|
||||
// requested. e.g. a patch can result in either a CREATE or UPDATE Operation.
|
||||
operation: #Operation @go(Operation) @protobuf(7,bytes,opt)
|
||||
|
||||
// UserInfo is information about the requesting user
|
||||
userInfo: authenticationv1.#UserInfo @go(UserInfo) @protobuf(8,bytes,opt)
|
||||
|
||||
// Object is the object from the incoming request.
|
||||
// +optional
|
||||
object?: runtime.#RawExtension @go(Object) @protobuf(9,bytes,opt)
|
||||
|
||||
// OldObject is the existing object. Only populated for DELETE and UPDATE requests.
|
||||
// +optional
|
||||
oldObject?: runtime.#RawExtension @go(OldObject) @protobuf(10,bytes,opt)
|
||||
|
||||
// DryRun indicates that modifications will definitely not be persisted for this request.
|
||||
// Defaults to false.
|
||||
// +optional
|
||||
dryRun?: null | bool @go(DryRun,*bool) @protobuf(11,varint,opt)
|
||||
|
||||
// Options is the operation option structure of the operation being performed.
|
||||
// e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be
|
||||
// different than the options the caller provided. e.g. for a patch request the performed
|
||||
// Operation might be a CREATE, in which case the Options will a
|
||||
// `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.
|
||||
// +optional
|
||||
options?: runtime.#RawExtension @go(Options) @protobuf(12,bytes,opt)
|
||||
}
|
||||
|
||||
// AdmissionResponse describes an admission response.
|
||||
#AdmissionResponse: {
|
||||
// UID is an identifier for the individual request/response.
|
||||
// This should be copied over from the corresponding AdmissionRequest.
|
||||
uid: types.#UID @go(UID) @protobuf(1,bytes,opt)
|
||||
|
||||
// Allowed indicates whether or not the admission request was permitted.
|
||||
allowed: bool @go(Allowed) @protobuf(2,varint,opt)
|
||||
|
||||
// Result contains extra details into why an admission request was denied.
|
||||
// This field IS NOT consulted in any way if "Allowed" is "true".
|
||||
// +optional
|
||||
status?: null | metav1.#Status @go(Result,*metav1.Status) @protobuf(3,bytes,opt)
|
||||
|
||||
// The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
|
||||
// +optional
|
||||
patch?: bytes @go(Patch,[]byte) @protobuf(4,bytes,opt)
|
||||
|
||||
// The type of Patch. Currently we only allow "JSONPatch".
|
||||
// +optional
|
||||
patchType?: null | #PatchType @go(PatchType,*PatchType) @protobuf(5,bytes,opt)
|
||||
|
||||
// AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
|
||||
// MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with
|
||||
// admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
|
||||
// the admission webhook to add additional context to the audit log for this request.
|
||||
// +optional
|
||||
auditAnnotations?: {[string]: string} @go(AuditAnnotations,map[string]string) @protobuf(6,bytes,opt)
|
||||
|
||||
// warnings is a list of warning messages to return to the requesting API client.
|
||||
// Warning messages describe a problem the client making the API request should correct or be aware of.
|
||||
// Limit warnings to 120 characters if possible.
|
||||
// Warnings over 256 characters and large numbers of warnings may be truncated.
|
||||
// +optional
|
||||
warnings?: [...string] @go(Warnings,[]string) @protobuf(7,bytes,rep)
|
||||
}
|
||||
|
||||
// PatchType is the type of patch being used to represent the mutated object
|
||||
#PatchType: string // #enumPatchType
|
||||
|
||||
#enumPatchType:
|
||||
#PatchTypeJSONPatch
|
||||
|
||||
#PatchTypeJSONPatch: #PatchType & "JSONPatch"
|
||||
|
||||
// Operation is the type of resource operation being checked for admission control
|
||||
#Operation: string // #enumOperation
|
||||
|
||||
#enumOperation:
|
||||
#Create |
|
||||
#Update |
|
||||
#Delete |
|
||||
#Connect
|
||||
|
||||
#Create: #Operation & "CREATE"
|
||||
#Update: #Operation & "UPDATE"
|
||||
#Delete: #Operation & "DELETE"
|
||||
#Connect: #Operation & "CONNECT"
|
||||
@@ -0,0 +1,9 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admissionregistration/v1
|
||||
|
||||
// Package v1 is the v1 version of the API.
|
||||
// AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration
|
||||
// MutatingWebhookConfiguration and ValidatingWebhookConfiguration are for the
|
||||
// new dynamic admission controller configuration.
|
||||
package v1
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admissionregistration/v1
|
||||
|
||||
package v1
|
||||
|
||||
#GroupName: "admissionregistration.k8s.io"
|
||||
@@ -0,0 +1,645 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admissionregistration/v1
|
||||
|
||||
package v1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
|
||||
// to make sure that all the tuple expansions are valid.
|
||||
#Rule: {
|
||||
// APIGroups is the API groups the resources belong to. '*' is all groups.
|
||||
// If '*' is present, the length of the slice must be one.
|
||||
// Required.
|
||||
// +listType=atomic
|
||||
apiGroups?: [...string] @go(APIGroups,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// APIVersions is the API versions the resources belong to. '*' is all versions.
|
||||
// If '*' is present, the length of the slice must be one.
|
||||
// Required.
|
||||
// +listType=atomic
|
||||
apiVersions?: [...string] @go(APIVersions,[]string) @protobuf(2,bytes,rep)
|
||||
|
||||
// Resources is a list of resources this rule applies to.
|
||||
//
|
||||
// For example:
|
||||
// 'pods' means pods.
|
||||
// 'pods/log' means the log subresource of pods.
|
||||
// '*' means all resources, but not subresources.
|
||||
// 'pods/*' means all subresources of pods.
|
||||
// '*/scale' means all scale subresources.
|
||||
// '*/*' means all resources and their subresources.
|
||||
//
|
||||
// If wildcard is present, the validation rule will ensure resources do not
|
||||
// overlap with each other.
|
||||
//
|
||||
// Depending on the enclosing object, subresources might not be allowed.
|
||||
// Required.
|
||||
// +listType=atomic
|
||||
resources?: [...string] @go(Resources,[]string) @protobuf(3,bytes,rep)
|
||||
|
||||
// scope specifies the scope of this rule.
|
||||
// Valid values are "Cluster", "Namespaced", and "*"
|
||||
// "Cluster" means that only cluster-scoped resources will match this rule.
|
||||
// Namespace API objects are cluster-scoped.
|
||||
// "Namespaced" means that only namespaced resources will match this rule.
|
||||
// "*" means that there are no scope restrictions.
|
||||
// Subresources match the scope of their parent resource.
|
||||
// Default is "*".
|
||||
//
|
||||
// +optional
|
||||
scope?: null | #ScopeType @go(Scope,*ScopeType) @protobuf(4,bytes,rep)
|
||||
}
|
||||
|
||||
// ScopeType specifies a scope for a Rule.
|
||||
// +enum
|
||||
#ScopeType: string // #enumScopeType
|
||||
|
||||
#enumScopeType:
|
||||
#ClusterScope |
|
||||
#NamespacedScope |
|
||||
#AllScopes
|
||||
|
||||
// ClusterScope means that scope is limited to cluster-scoped objects.
|
||||
// Namespace objects are cluster-scoped.
|
||||
#ClusterScope: #ScopeType & "Cluster"
|
||||
|
||||
// NamespacedScope means that scope is limited to namespaced objects.
|
||||
#NamespacedScope: #ScopeType & "Namespaced"
|
||||
|
||||
// AllScopes means that all scopes are included.
|
||||
#AllScopes: #ScopeType & "*"
|
||||
|
||||
// FailurePolicyType specifies a failure policy that defines how unrecognized errors from the admission endpoint are handled.
|
||||
// +enum
|
||||
#FailurePolicyType: string // #enumFailurePolicyType
|
||||
|
||||
#enumFailurePolicyType:
|
||||
#Ignore |
|
||||
#Fail
|
||||
|
||||
// Ignore means that an error calling the webhook is ignored.
|
||||
#Ignore: #FailurePolicyType & "Ignore"
|
||||
|
||||
// Fail means that an error calling the webhook causes the admission to fail.
|
||||
#Fail: #FailurePolicyType & "Fail"
|
||||
|
||||
// MatchPolicyType specifies the type of match policy.
|
||||
// +enum
|
||||
#MatchPolicyType: string // #enumMatchPolicyType
|
||||
|
||||
#enumMatchPolicyType:
|
||||
#Exact |
|
||||
#Equivalent
|
||||
|
||||
// Exact means requests should only be sent to the webhook if they exactly match a given rule.
|
||||
#Exact: #MatchPolicyType & "Exact"
|
||||
|
||||
// Equivalent means requests should be sent to the webhook if they modify a resource listed in rules via another API group or version.
|
||||
#Equivalent: #MatchPolicyType & "Equivalent"
|
||||
|
||||
// SideEffectClass specifies the types of side effects a webhook may have.
|
||||
// +enum
|
||||
#SideEffectClass: string // #enumSideEffectClass
|
||||
|
||||
#enumSideEffectClass:
|
||||
#SideEffectClassUnknown |
|
||||
#SideEffectClassNone |
|
||||
#SideEffectClassSome |
|
||||
#SideEffectClassNoneOnDryRun
|
||||
|
||||
// SideEffectClassUnknown means that no information is known about the side effects of calling the webhook.
|
||||
// If a request with the dry-run attribute would trigger a call to this webhook, the request will instead fail.
|
||||
#SideEffectClassUnknown: #SideEffectClass & "Unknown"
|
||||
|
||||
// SideEffectClassNone means that calling the webhook will have no side effects.
|
||||
#SideEffectClassNone: #SideEffectClass & "None"
|
||||
|
||||
// SideEffectClassSome means that calling the webhook will possibly have side effects.
|
||||
// If a request with the dry-run attribute would trigger a call to this webhook, the request will instead fail.
|
||||
#SideEffectClassSome: #SideEffectClass & "Some"
|
||||
|
||||
// SideEffectClassNoneOnDryRun means that calling the webhook will possibly have side effects, but if the
|
||||
// request being reviewed has the dry-run attribute, the side effects will be suppressed.
|
||||
#SideEffectClassNoneOnDryRun: #SideEffectClass & "NoneOnDryRun"
|
||||
|
||||
// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
|
||||
#ValidatingWebhookConfiguration: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Webhooks is a list of webhooks and the affected resources and operations.
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
webhooks?: [...#ValidatingWebhook] @go(Webhooks,[]ValidatingWebhook) @protobuf(2,bytes,rep,name=Webhooks)
|
||||
}
|
||||
|
||||
// ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
|
||||
#ValidatingWebhookConfigurationList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// List of ValidatingWebhookConfiguration.
|
||||
items: [...#ValidatingWebhookConfiguration] @go(Items,[]ValidatingWebhookConfiguration) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
|
||||
#MutatingWebhookConfiguration: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Webhooks is a list of webhooks and the affected resources and operations.
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
webhooks?: [...#MutatingWebhook] @go(Webhooks,[]MutatingWebhook) @protobuf(2,bytes,rep,name=Webhooks)
|
||||
}
|
||||
|
||||
// MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
|
||||
#MutatingWebhookConfigurationList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// List of MutatingWebhookConfiguration.
|
||||
items: [...#MutatingWebhookConfiguration] @go(Items,[]MutatingWebhookConfiguration) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// ValidatingWebhook describes an admission webhook and the resources and operations it applies to.
|
||||
#ValidatingWebhook: {
|
||||
// The name of the admission webhook.
|
||||
// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
|
||||
// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
|
||||
// of the organization.
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
|
||||
// ClientConfig defines how to communicate with the hook.
|
||||
// Required
|
||||
clientConfig: #WebhookClientConfig @go(ClientConfig) @protobuf(2,bytes,opt)
|
||||
|
||||
// Rules describes what operations on what resources/subresources the webhook cares about.
|
||||
// The webhook cares about an operation if it matches _any_ Rule.
|
||||
// However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
|
||||
// from putting the cluster in a state which cannot be recovered from without completely
|
||||
// disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
|
||||
// on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
|
||||
rules?: [...#RuleWithOperations] @go(Rules,[]RuleWithOperations) @protobuf(3,bytes,rep)
|
||||
|
||||
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
|
||||
// allowed values are Ignore or Fail. Defaults to Fail.
|
||||
// +optional
|
||||
failurePolicy?: null | #FailurePolicyType @go(FailurePolicy,*FailurePolicyType) @protobuf(4,bytes,opt,casttype=FailurePolicyType)
|
||||
|
||||
// matchPolicy defines how the "rules" list is used to match incoming requests.
|
||||
// Allowed values are "Exact" or "Equivalent".
|
||||
//
|
||||
// - Exact: match a request only if it exactly matches a specified rule.
|
||||
// For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
|
||||
// but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
|
||||
// a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.
|
||||
//
|
||||
// - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version.
|
||||
// For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
|
||||
// and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
|
||||
// a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.
|
||||
//
|
||||
// Defaults to "Equivalent"
|
||||
// +optional
|
||||
matchPolicy?: null | #MatchPolicyType @go(MatchPolicy,*MatchPolicyType) @protobuf(9,bytes,opt,casttype=MatchPolicyType)
|
||||
|
||||
// NamespaceSelector decides whether to run the webhook on an object based
|
||||
// on whether the namespace for that object matches the selector. If the
|
||||
// object itself is a namespace, the matching is performed on
|
||||
// object.metadata.labels. If the object is another cluster scoped resource,
|
||||
// it never skips the webhook.
|
||||
//
|
||||
// For example, to run the webhook on any objects whose namespace is not
|
||||
// associated with "runlevel" of "0" or "1"; you will set the selector as
|
||||
// follows:
|
||||
// "namespaceSelector": {
|
||||
// "matchExpressions": [
|
||||
// {
|
||||
// "key": "runlevel",
|
||||
// "operator": "NotIn",
|
||||
// "values": [
|
||||
// "0",
|
||||
// "1"
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// If instead you want to only run the webhook on any objects whose
|
||||
// namespace is associated with the "environment" of "prod" or "staging";
|
||||
// you will set the selector as follows:
|
||||
// "namespaceSelector": {
|
||||
// "matchExpressions": [
|
||||
// {
|
||||
// "key": "environment",
|
||||
// "operator": "In",
|
||||
// "values": [
|
||||
// "prod",
|
||||
// "staging"
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// See
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
|
||||
// for more examples of label selectors.
|
||||
//
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
// +optional
|
||||
namespaceSelector?: null | metav1.#LabelSelector @go(NamespaceSelector,*metav1.LabelSelector) @protobuf(5,bytes,opt)
|
||||
|
||||
// ObjectSelector decides whether to run the webhook based on if the
|
||||
// object has matching labels. objectSelector is evaluated against both
|
||||
// the oldObject and newObject that would be sent to the webhook, and
|
||||
// is considered to match if either object matches the selector. A null
|
||||
// object (oldObject in the case of create, or newObject in the case of
|
||||
// delete) or an object that cannot have labels (like a
|
||||
// DeploymentRollback or a PodProxyOptions object) is not considered to
|
||||
// match.
|
||||
// Use the object selector only if the webhook is opt-in, because end
|
||||
// users may skip the admission webhook by setting the labels.
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
// +optional
|
||||
objectSelector?: null | metav1.#LabelSelector @go(ObjectSelector,*metav1.LabelSelector) @protobuf(10,bytes,opt)
|
||||
|
||||
// SideEffects states whether this webhook has side effects.
|
||||
// Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown).
|
||||
// Webhooks with side effects MUST implement a reconciliation system, since a request may be
|
||||
// rejected by a future step in the admission chain and the side effects therefore need to be undone.
|
||||
// Requests with the dryRun attribute will be auto-rejected if they match a webhook with
|
||||
// sideEffects == Unknown or Some.
|
||||
sideEffects?: null | #SideEffectClass @go(SideEffects,*SideEffectClass) @protobuf(6,bytes,opt,casttype=SideEffectClass)
|
||||
|
||||
// TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
|
||||
// the webhook call will be ignored or the API call will fail based on the
|
||||
// failure policy.
|
||||
// The timeout value must be between 1 and 30 seconds.
|
||||
// Default to 10 seconds.
|
||||
// +optional
|
||||
timeoutSeconds?: null | int32 @go(TimeoutSeconds,*int32) @protobuf(7,varint,opt)
|
||||
|
||||
// AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
|
||||
// versions the Webhook expects. API server will try to use first version in
|
||||
// the list which it supports. If none of the versions specified in this list
|
||||
// supported by API server, validation will fail for this object.
|
||||
// If a persisted webhook configuration specifies allowed versions and does not
|
||||
// include any versions known to the API Server, calls to the webhook will fail
|
||||
// and be subject to the failure policy.
|
||||
admissionReviewVersions: [...string] @go(AdmissionReviewVersions,[]string) @protobuf(8,bytes,rep)
|
||||
|
||||
// MatchConditions is a list of conditions that must be met for a request to be sent to this
|
||||
// webhook. Match conditions filter requests that have already been matched by the rules,
|
||||
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
|
||||
// There are a maximum of 64 match conditions allowed.
|
||||
//
|
||||
// The exact matching logic is (in order):
|
||||
// 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.
|
||||
// 2. If ALL matchConditions evaluate to TRUE, the webhook is called.
|
||||
// 3. If any matchCondition evaluates to an error (but none are FALSE):
|
||||
// - If failurePolicy=Fail, reject the request
|
||||
// - If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
||||
//
|
||||
// This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
|
||||
//
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +featureGate=AdmissionWebhookMatchConditions
|
||||
// +optional
|
||||
matchConditions?: [...#MatchCondition] @go(MatchConditions,[]MatchCondition) @protobuf(11,bytes,opt)
|
||||
}
|
||||
|
||||
// MutatingWebhook describes an admission webhook and the resources and operations it applies to.
|
||||
#MutatingWebhook: {
|
||||
// The name of the admission webhook.
|
||||
// Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where
|
||||
// "imagepolicy" is the name of the webhook, and kubernetes.io is the name
|
||||
// of the organization.
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
|
||||
// ClientConfig defines how to communicate with the hook.
|
||||
// Required
|
||||
clientConfig: #WebhookClientConfig @go(ClientConfig) @protobuf(2,bytes,opt)
|
||||
|
||||
// Rules describes what operations on what resources/subresources the webhook cares about.
|
||||
// The webhook cares about an operation if it matches _any_ Rule.
|
||||
// However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks
|
||||
// from putting the cluster in a state which cannot be recovered from without completely
|
||||
// disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called
|
||||
// on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
|
||||
rules?: [...#RuleWithOperations] @go(Rules,[]RuleWithOperations) @protobuf(3,bytes,rep)
|
||||
|
||||
// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
|
||||
// allowed values are Ignore or Fail. Defaults to Fail.
|
||||
// +optional
|
||||
failurePolicy?: null | #FailurePolicyType @go(FailurePolicy,*FailurePolicyType) @protobuf(4,bytes,opt,casttype=FailurePolicyType)
|
||||
|
||||
// matchPolicy defines how the "rules" list is used to match incoming requests.
|
||||
// Allowed values are "Exact" or "Equivalent".
|
||||
//
|
||||
// - Exact: match a request only if it exactly matches a specified rule.
|
||||
// For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
|
||||
// but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
|
||||
// a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.
|
||||
//
|
||||
// - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version.
|
||||
// For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
|
||||
// and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
|
||||
// a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.
|
||||
//
|
||||
// Defaults to "Equivalent"
|
||||
// +optional
|
||||
matchPolicy?: null | #MatchPolicyType @go(MatchPolicy,*MatchPolicyType) @protobuf(9,bytes,opt,casttype=MatchPolicyType)
|
||||
|
||||
// NamespaceSelector decides whether to run the webhook on an object based
|
||||
// on whether the namespace for that object matches the selector. If the
|
||||
// object itself is a namespace, the matching is performed on
|
||||
// object.metadata.labels. If the object is another cluster scoped resource,
|
||||
// it never skips the webhook.
|
||||
//
|
||||
// For example, to run the webhook on any objects whose namespace is not
|
||||
// associated with "runlevel" of "0" or "1"; you will set the selector as
|
||||
// follows:
|
||||
// "namespaceSelector": {
|
||||
// "matchExpressions": [
|
||||
// {
|
||||
// "key": "runlevel",
|
||||
// "operator": "NotIn",
|
||||
// "values": [
|
||||
// "0",
|
||||
// "1"
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// If instead you want to only run the webhook on any objects whose
|
||||
// namespace is associated with the "environment" of "prod" or "staging";
|
||||
// you will set the selector as follows:
|
||||
// "namespaceSelector": {
|
||||
// "matchExpressions": [
|
||||
// {
|
||||
// "key": "environment",
|
||||
// "operator": "In",
|
||||
// "values": [
|
||||
// "prod",
|
||||
// "staging"
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// See
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
// for more examples of label selectors.
|
||||
//
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
// +optional
|
||||
namespaceSelector?: null | metav1.#LabelSelector @go(NamespaceSelector,*metav1.LabelSelector) @protobuf(5,bytes,opt)
|
||||
|
||||
// ObjectSelector decides whether to run the webhook based on if the
|
||||
// object has matching labels. objectSelector is evaluated against both
|
||||
// the oldObject and newObject that would be sent to the webhook, and
|
||||
// is considered to match if either object matches the selector. A null
|
||||
// object (oldObject in the case of create, or newObject in the case of
|
||||
// delete) or an object that cannot have labels (like a
|
||||
// DeploymentRollback or a PodProxyOptions object) is not considered to
|
||||
// match.
|
||||
// Use the object selector only if the webhook is opt-in, because end
|
||||
// users may skip the admission webhook by setting the labels.
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
// +optional
|
||||
objectSelector?: null | metav1.#LabelSelector @go(ObjectSelector,*metav1.LabelSelector) @protobuf(11,bytes,opt)
|
||||
|
||||
// SideEffects states whether this webhook has side effects.
|
||||
// Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown).
|
||||
// Webhooks with side effects MUST implement a reconciliation system, since a request may be
|
||||
// rejected by a future step in the admission chain and the side effects therefore need to be undone.
|
||||
// Requests with the dryRun attribute will be auto-rejected if they match a webhook with
|
||||
// sideEffects == Unknown or Some.
|
||||
sideEffects?: null | #SideEffectClass @go(SideEffects,*SideEffectClass) @protobuf(6,bytes,opt,casttype=SideEffectClass)
|
||||
|
||||
// TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
|
||||
// the webhook call will be ignored or the API call will fail based on the
|
||||
// failure policy.
|
||||
// The timeout value must be between 1 and 30 seconds.
|
||||
// Default to 10 seconds.
|
||||
// +optional
|
||||
timeoutSeconds?: null | int32 @go(TimeoutSeconds,*int32) @protobuf(7,varint,opt)
|
||||
|
||||
// AdmissionReviewVersions is an ordered list of preferred `AdmissionReview`
|
||||
// versions the Webhook expects. API server will try to use first version in
|
||||
// the list which it supports. If none of the versions specified in this list
|
||||
// supported by API server, validation will fail for this object.
|
||||
// If a persisted webhook configuration specifies allowed versions and does not
|
||||
// include any versions known to the API Server, calls to the webhook will fail
|
||||
// and be subject to the failure policy.
|
||||
admissionReviewVersions: [...string] @go(AdmissionReviewVersions,[]string) @protobuf(8,bytes,rep)
|
||||
|
||||
// reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation.
|
||||
// Allowed values are "Never" and "IfNeeded".
|
||||
//
|
||||
// Never: the webhook will not be called more than once in a single admission evaluation.
|
||||
//
|
||||
// IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation
|
||||
// if the object being admitted is modified by other admission plugins after the initial webhook call.
|
||||
// Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted.
|
||||
// Note:
|
||||
// * the number of additional invocations is not guaranteed to be exactly one.
|
||||
// * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again.
|
||||
// * webhooks that use this option may be reordered to minimize the number of additional invocations.
|
||||
// * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.
|
||||
//
|
||||
// Defaults to "Never".
|
||||
// +optional
|
||||
reinvocationPolicy?: null | #ReinvocationPolicyType @go(ReinvocationPolicy,*ReinvocationPolicyType) @protobuf(10,bytes,opt,casttype=ReinvocationPolicyType)
|
||||
|
||||
// MatchConditions is a list of conditions that must be met for a request to be sent to this
|
||||
// webhook. Match conditions filter requests that have already been matched by the rules,
|
||||
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
|
||||
// There are a maximum of 64 match conditions allowed.
|
||||
//
|
||||
// The exact matching logic is (in order):
|
||||
// 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.
|
||||
// 2. If ALL matchConditions evaluate to TRUE, the webhook is called.
|
||||
// 3. If any matchCondition evaluates to an error (but none are FALSE):
|
||||
// - If failurePolicy=Fail, reject the request
|
||||
// - If failurePolicy=Ignore, the error is ignored and the webhook is skipped
|
||||
//
|
||||
// This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate.
|
||||
//
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +featureGate=AdmissionWebhookMatchConditions
|
||||
// +optional
|
||||
matchConditions?: [...#MatchCondition] @go(MatchConditions,[]MatchCondition) @protobuf(12,bytes,opt)
|
||||
}
|
||||
|
||||
// ReinvocationPolicyType specifies what type of policy the admission hook uses.
|
||||
// +enum
|
||||
#ReinvocationPolicyType: string // #enumReinvocationPolicyType
|
||||
|
||||
#enumReinvocationPolicyType:
|
||||
#NeverReinvocationPolicy |
|
||||
#IfNeededReinvocationPolicy
|
||||
|
||||
// NeverReinvocationPolicy indicates that the webhook must not be called more than once in a
|
||||
// single admission evaluation.
|
||||
#NeverReinvocationPolicy: #ReinvocationPolicyType & "Never"
|
||||
|
||||
// IfNeededReinvocationPolicy indicates that the webhook may be called at least one
|
||||
// additional time as part of the admission evaluation if the object being admitted is
|
||||
// modified by other admission plugins after the initial webhook call.
|
||||
#IfNeededReinvocationPolicy: #ReinvocationPolicyType & "IfNeeded"
|
||||
|
||||
// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
|
||||
// sure that all the tuple expansions are valid.
|
||||
#RuleWithOperations: {
|
||||
// Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or *
|
||||
// for all of those operations and any future admission operations that are added.
|
||||
// If '*' is present, the length of the slice must be one.
|
||||
// Required.
|
||||
// +listType=atomic
|
||||
operations?: [...#OperationType] @go(Operations,[]OperationType) @protobuf(1,bytes,rep,casttype=OperationType)
|
||||
|
||||
#Rule
|
||||
}
|
||||
|
||||
// OperationType specifies an operation for a request.
|
||||
// +enum
|
||||
#OperationType: string // #enumOperationType
|
||||
|
||||
#enumOperationType:
|
||||
#OperationAll |
|
||||
#Create |
|
||||
#Update |
|
||||
#Delete |
|
||||
#Connect
|
||||
|
||||
#OperationAll: #OperationType & "*"
|
||||
#Create: #OperationType & "CREATE"
|
||||
#Update: #OperationType & "UPDATE"
|
||||
#Delete: #OperationType & "DELETE"
|
||||
#Connect: #OperationType & "CONNECT"
|
||||
|
||||
// WebhookClientConfig contains the information to make a TLS
|
||||
// connection with the webhook
|
||||
#WebhookClientConfig: {
|
||||
// `url` gives the location of the webhook, in standard URL form
|
||||
// (`scheme://host:port/path`). Exactly one of `url` or `service`
|
||||
// must be specified.
|
||||
//
|
||||
// The `host` should not refer to a service running in the cluster; use
|
||||
// the `service` field instead. The host might be resolved via external
|
||||
// DNS in some apiservers (e.g., `kube-apiserver` cannot resolve
|
||||
// in-cluster DNS as that would be a layering violation). `host` may
|
||||
// also be an IP address.
|
||||
//
|
||||
// Please note that using `localhost` or `127.0.0.1` as a `host` is
|
||||
// risky unless you take great care to run this webhook on all hosts
|
||||
// which run an apiserver which might need to make calls to this
|
||||
// webhook. Such installs are likely to be non-portable, i.e., not easy
|
||||
// to turn up in a new cluster.
|
||||
//
|
||||
// The scheme must be "https"; the URL must begin with "https://".
|
||||
//
|
||||
// A path is optional, and if present may be any string permissible in
|
||||
// a URL. You may use the path to pass an arbitrary string to the
|
||||
// webhook, for example, a cluster identifier.
|
||||
//
|
||||
// Attempting to use a user or basic auth e.g. "user:password@" is not
|
||||
// allowed. Fragments ("#...") and query parameters ("?...") are not
|
||||
// allowed, either.
|
||||
//
|
||||
// +optional
|
||||
url?: null | string @go(URL,*string) @protobuf(3,bytes,opt)
|
||||
|
||||
// `service` is a reference to the service for this webhook. Either
|
||||
// `service` or `url` must be specified.
|
||||
//
|
||||
// If the webhook is running within the cluster, then you should use `service`.
|
||||
//
|
||||
// +optional
|
||||
service?: null | #ServiceReference @go(Service,*ServiceReference) @protobuf(1,bytes,opt)
|
||||
|
||||
// `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
|
||||
// If unspecified, system trust roots on the apiserver are used.
|
||||
// +optional
|
||||
caBundle?: bytes @go(CABundle,[]byte) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// ServiceReference holds a reference to Service.legacy.k8s.io
|
||||
#ServiceReference: {
|
||||
// `namespace` is the namespace of the service.
|
||||
// Required
|
||||
namespace: string @go(Namespace) @protobuf(1,bytes,opt)
|
||||
|
||||
// `name` is the name of the service.
|
||||
// Required
|
||||
name: string @go(Name) @protobuf(2,bytes,opt)
|
||||
|
||||
// `path` is an optional URL path which will be sent in any request to
|
||||
// this service.
|
||||
// +optional
|
||||
path?: null | string @go(Path,*string) @protobuf(3,bytes,opt)
|
||||
|
||||
// If specified, the port on the service that hosting webhook.
|
||||
// Default to 443 for backward compatibility.
|
||||
// `port` should be a valid port number (1-65535, inclusive).
|
||||
// +optional
|
||||
port?: null | int32 @go(Port,*int32) @protobuf(4,varint,opt)
|
||||
}
|
||||
|
||||
// MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
|
||||
#MatchCondition: {
|
||||
// Name is an identifier for this match condition, used for strategic merging of MatchConditions,
|
||||
// as well as providing an identifier for logging purposes. A good name should be descriptive of
|
||||
// the associated expression.
|
||||
// Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and
|
||||
// must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or
|
||||
// '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an
|
||||
// optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')
|
||||
//
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
|
||||
// Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
|
||||
// CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
|
||||
//
|
||||
// 'object' - The object from the incoming request. The value is null for DELETE requests.
|
||||
// 'oldObject' - The existing object. The value is null for CREATE requests.
|
||||
// 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).
|
||||
// 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
|
||||
// See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
|
||||
// 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
|
||||
// request resource.
|
||||
// Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
|
||||
//
|
||||
// Required.
|
||||
expression: string @go(Expression) @protobuf(2,bytes,opt)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admissionregistration/v1alpha1
|
||||
|
||||
// Package v1alpha1 is the v1alpha1 version of the API.
|
||||
package v1alpha1
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admissionregistration/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
#GroupName: "admissionregistration.k8s.io"
|
||||
@@ -0,0 +1,679 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admissionregistration/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"k8s.io/api/admissionregistration/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
|
||||
// to make sure that all the tuple expansions are valid.
|
||||
#Rule: v1.#Rule
|
||||
|
||||
// ScopeType specifies a scope for a Rule.
|
||||
// +enum
|
||||
#ScopeType: v1.#ScopeType // #enumScopeType
|
||||
|
||||
#enumScopeType:
|
||||
#ClusterScope |
|
||||
#NamespacedScope |
|
||||
#AllScopes
|
||||
|
||||
// ClusterScope means that scope is limited to cluster-scoped objects.
|
||||
// Namespace objects are cluster-scoped.
|
||||
#ClusterScope: v1.#ScopeType & "Cluster"
|
||||
|
||||
// NamespacedScope means that scope is limited to namespaced objects.
|
||||
#NamespacedScope: v1.#ScopeType & "Namespaced"
|
||||
|
||||
// AllScopes means that all scopes are included.
|
||||
#AllScopes: v1.#ScopeType & "*"
|
||||
|
||||
// ParameterNotFoundActionType specifies a failure policy that defines how a binding
|
||||
// is evaluated when the param referred by its perNamespaceParamRef is not found.
|
||||
// +enum
|
||||
#ParameterNotFoundActionType: string // #enumParameterNotFoundActionType
|
||||
|
||||
#enumParameterNotFoundActionType:
|
||||
#AllowAction |
|
||||
#DenyAction
|
||||
|
||||
// Ignore means that an error finding params for a binding is ignored
|
||||
#AllowAction: #ParameterNotFoundActionType & "Allow"
|
||||
|
||||
// Fail means that an error finding params for a binding is ignored
|
||||
#DenyAction: #ParameterNotFoundActionType & "Deny"
|
||||
|
||||
// FailurePolicyType specifies a failure policy that defines how unrecognized errors from the admission endpoint are handled.
|
||||
// +enum
|
||||
#FailurePolicyType: string // #enumFailurePolicyType
|
||||
|
||||
#enumFailurePolicyType:
|
||||
#Ignore |
|
||||
#Fail
|
||||
|
||||
// Ignore means that an error calling the webhook is ignored.
|
||||
#Ignore: #FailurePolicyType & "Ignore"
|
||||
|
||||
// Fail means that an error calling the webhook causes the admission to fail.
|
||||
#Fail: #FailurePolicyType & "Fail"
|
||||
|
||||
// MatchPolicyType specifies the type of match policy.
|
||||
// +enum
|
||||
#MatchPolicyType: string // #enumMatchPolicyType
|
||||
|
||||
#enumMatchPolicyType:
|
||||
#Exact |
|
||||
#Equivalent
|
||||
|
||||
// Exact means requests should only be sent to the webhook if they exactly match a given rule.
|
||||
#Exact: #MatchPolicyType & "Exact"
|
||||
|
||||
// Equivalent means requests should be sent to the webhook if they modify a resource listed in rules via another API group or version.
|
||||
#Equivalent: #MatchPolicyType & "Equivalent"
|
||||
|
||||
// ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
|
||||
#ValidatingAdmissionPolicy: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Specification of the desired behavior of the ValidatingAdmissionPolicy.
|
||||
spec?: #ValidatingAdmissionPolicySpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy
|
||||
// behaves in the expected way.
|
||||
// Populated by the system.
|
||||
// Read-only.
|
||||
// +optional
|
||||
status?: #ValidatingAdmissionPolicyStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy.
|
||||
#ValidatingAdmissionPolicyStatus: {
|
||||
// The generation observed by the controller.
|
||||
// +optional
|
||||
observedGeneration?: int64 @go(ObservedGeneration) @protobuf(1,varint,opt)
|
||||
|
||||
// The results of type checking for each expression.
|
||||
// Presence of this field indicates the completion of the type checking.
|
||||
// +optional
|
||||
typeChecking?: null | #TypeChecking @go(TypeChecking,*TypeChecking) @protobuf(2,bytes,opt)
|
||||
|
||||
// The conditions represent the latest available observations of a policy's current state.
|
||||
// +optional
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
conditions?: [...metav1.#Condition] @go(Conditions,[]metav1.Condition) @protobuf(3,bytes,rep)
|
||||
}
|
||||
|
||||
// TypeChecking contains results of type checking the expressions in the
|
||||
// ValidatingAdmissionPolicy
|
||||
#TypeChecking: {
|
||||
// The type checking warnings for each expression.
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
expressionWarnings?: [...#ExpressionWarning] @go(ExpressionWarnings,[]ExpressionWarning) @protobuf(1,bytes,rep)
|
||||
}
|
||||
|
||||
// ExpressionWarning is a warning information that targets a specific expression.
|
||||
#ExpressionWarning: {
|
||||
// The path to the field that refers the expression.
|
||||
// For example, the reference to the expression of the first item of
|
||||
// validations is "spec.validations[0].expression"
|
||||
fieldRef: string @go(FieldRef) @protobuf(2,bytes,opt)
|
||||
|
||||
// The content of type checking information in a human-readable form.
|
||||
// Each line of the warning contains the type that the expression is checked
|
||||
// against, followed by the type check error from the compiler.
|
||||
warning: string @go(Warning) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.
|
||||
#ValidatingAdmissionPolicyList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// List of ValidatingAdmissionPolicy.
|
||||
items?: [...#ValidatingAdmissionPolicy] @go(Items,[]ValidatingAdmissionPolicy) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
|
||||
#ValidatingAdmissionPolicySpec: {
|
||||
// ParamKind specifies the kind of resources used to parameterize this policy.
|
||||
// If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions.
|
||||
// If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied.
|
||||
// If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.
|
||||
// +optional
|
||||
paramKind?: null | #ParamKind @go(ParamKind,*ParamKind) @protobuf(1,bytes,rep)
|
||||
|
||||
// MatchConstraints specifies what resources this policy is designed to validate.
|
||||
// The AdmissionPolicy cares about a request if it matches _all_ Constraints.
|
||||
// However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API
|
||||
// ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding.
|
||||
// Required.
|
||||
matchConstraints?: null | #MatchResources @go(MatchConstraints,*MatchResources) @protobuf(2,bytes,rep)
|
||||
|
||||
// Validations contain CEL expressions which is used to apply the validation.
|
||||
// Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is
|
||||
// required.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
validations?: [...#Validation] @go(Validations,[]Validation) @protobuf(3,bytes,rep)
|
||||
|
||||
// failurePolicy defines how to handle failures for the admission policy. Failures can
|
||||
// occur from CEL expression parse errors, type check errors, runtime errors and invalid
|
||||
// or mis-configured policy definitions or bindings.
|
||||
//
|
||||
// A policy is invalid if spec.paramKind refers to a non-existent Kind.
|
||||
// A binding is invalid if spec.paramRef.name refers to a non-existent resource.
|
||||
//
|
||||
// failurePolicy does not define how validations that evaluate to false are handled.
|
||||
//
|
||||
// When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions
|
||||
// define how failures are enforced.
|
||||
//
|
||||
// Allowed values are Ignore or Fail. Defaults to Fail.
|
||||
// +optional
|
||||
failurePolicy?: null | #FailurePolicyType @go(FailurePolicy,*FailurePolicyType) @protobuf(4,bytes,opt,casttype=FailurePolicyType)
|
||||
|
||||
// auditAnnotations contains CEL expressions which are used to produce audit
|
||||
// annotations for the audit event of the API request.
|
||||
// validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is
|
||||
// required.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
auditAnnotations?: [...#AuditAnnotation] @go(AuditAnnotations,[]AuditAnnotation) @protobuf(5,bytes,rep)
|
||||
|
||||
// MatchConditions is a list of conditions that must be met for a request to be validated.
|
||||
// Match conditions filter requests that have already been matched by the rules,
|
||||
// namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests.
|
||||
// There are a maximum of 64 match conditions allowed.
|
||||
//
|
||||
// If a parameter object is provided, it can be accessed via the `params` handle in the same
|
||||
// manner as validation expressions.
|
||||
//
|
||||
// The exact matching logic is (in order):
|
||||
// 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
|
||||
// 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
|
||||
// 3. If any matchCondition evaluates to an error (but none are FALSE):
|
||||
// - If failurePolicy=Fail, reject the request
|
||||
// - If failurePolicy=Ignore, the policy is skipped
|
||||
//
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +optional
|
||||
matchConditions?: [...#MatchCondition] @go(MatchConditions,[]MatchCondition) @protobuf(6,bytes,rep)
|
||||
|
||||
// Variables contain definitions of variables that can be used in composition of other expressions.
|
||||
// Each variable is defined as a named CEL expression.
|
||||
// The variables defined here will be available under `variables` in other expressions of the policy
|
||||
// except MatchConditions because MatchConditions are evaluated before the rest of the policy.
|
||||
//
|
||||
// The expression of a variable can refer to other variables defined earlier in the list but not those after.
|
||||
// Thus, Variables must be sorted by the order of first appearance and acyclic.
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +optional
|
||||
variables?: [...#Variable] @go(Variables,[]Variable) @protobuf(7,bytes,rep)
|
||||
}
|
||||
|
||||
#MatchCondition: v1.#MatchCondition
|
||||
|
||||
// ParamKind is a tuple of Group Kind and Version.
|
||||
// +structType=atomic
|
||||
#ParamKind: {
|
||||
// APIVersion is the API group version the resources belong to.
|
||||
// In format of "group/version".
|
||||
// Required.
|
||||
apiVersion?: string @go(APIVersion) @protobuf(1,bytes,rep)
|
||||
|
||||
// Kind is the API kind the resources belong to.
|
||||
// Required.
|
||||
kind?: string @go(Kind) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// Validation specifies the CEL expression which is used to apply the validation.
|
||||
#Validation: {
|
||||
// Expression represents the expression which will be evaluated by CEL.
|
||||
// ref: https://github.com/google/cel-spec
|
||||
// CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
|
||||
//
|
||||
// - 'object' - The object from the incoming request. The value is null for DELETE requests.
|
||||
// - 'oldObject' - The existing object. The value is null for CREATE requests.
|
||||
// - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).
|
||||
// - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.
|
||||
// - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.
|
||||
// - 'variables' - Map of composited variables, from its name to its lazily evaluated value.
|
||||
// For example, a variable named 'foo' can be accessed as 'variables.foo'.
|
||||
// - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.
|
||||
// See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
|
||||
// - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the
|
||||
// request resource.
|
||||
//
|
||||
// The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the
|
||||
// object. No other metadata properties are accessible.
|
||||
//
|
||||
// Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.
|
||||
// Accessible property names are escaped according to the following rules when accessed in the expression:
|
||||
// - '__' escapes to '__underscores__'
|
||||
// - '.' escapes to '__dot__'
|
||||
// - '-' escapes to '__dash__'
|
||||
// - '/' escapes to '__slash__'
|
||||
// - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:
|
||||
// "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if",
|
||||
// "import", "let", "loop", "package", "namespace", "return".
|
||||
// Examples:
|
||||
// - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"}
|
||||
// - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"}
|
||||
// - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"}
|
||||
//
|
||||
// Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].
|
||||
// Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:
|
||||
// - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and
|
||||
// non-intersecting elements in `Y` are appended, retaining their partial order.
|
||||
// - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values
|
||||
// are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with
|
||||
// non-intersecting keys are appended, retaining their partial order.
|
||||
// Required.
|
||||
expression: string @go(Expression) @protobuf(1,bytes,opt,name=Expression)
|
||||
|
||||
// Message represents the message displayed when validation fails. The message is required if the Expression contains
|
||||
// line breaks. The message must not contain line breaks.
|
||||
// If unset, the message is "failed rule: {Rule}".
|
||||
// e.g. "must be a URL with the host matching spec.host"
|
||||
// If the Expression contains line breaks. Message is required.
|
||||
// The message must not contain line breaks.
|
||||
// If unset, the message is "failed Expression: {Expression}".
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(2,bytes,opt)
|
||||
|
||||
// Reason represents a machine-readable description of why this validation failed.
|
||||
// If this is the first validation in the list to fail, this reason, as well as the
|
||||
// corresponding HTTP response code, are used in the
|
||||
// HTTP response to the client.
|
||||
// The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge".
|
||||
// If not set, StatusReasonInvalid is used in the response to the client.
|
||||
// +optional
|
||||
reason?: null | metav1.#StatusReason @go(Reason,*metav1.StatusReason) @protobuf(3,bytes,opt)
|
||||
|
||||
// messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.
|
||||
// Since messageExpression is used as a failure message, it must evaluate to a string.
|
||||
// If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails.
|
||||
// If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced
|
||||
// as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string
|
||||
// that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and
|
||||
// the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.
|
||||
// messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'.
|
||||
// Example:
|
||||
// "object.x must be less than max ("+string(params.max)+")"
|
||||
// +optional
|
||||
messageExpression?: string @go(MessageExpression) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// Variable is the definition of a variable that is used for composition.
|
||||
#Variable: {
|
||||
// Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.
|
||||
// The variable can be accessed in other expressions through `variables`
|
||||
// For example, if name is "foo", the variable will be available as `variables.foo`
|
||||
name: string @go(Name) @protobuf(1,bytes,opt,name=Name)
|
||||
|
||||
// Expression is the expression that will be evaluated as the value of the variable.
|
||||
// The CEL expression has access to the same identifiers as the CEL expressions in Validation.
|
||||
expression: string @go(Expression) @protobuf(2,bytes,opt,name=Expression)
|
||||
}
|
||||
|
||||
// AuditAnnotation describes how to produce an audit annotation for an API request.
|
||||
#AuditAnnotation: {
|
||||
// key specifies the audit annotation key. The audit annotation keys of
|
||||
// a ValidatingAdmissionPolicy must be unique. The key must be a qualified
|
||||
// name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.
|
||||
//
|
||||
// The key is combined with the resource name of the
|
||||
// ValidatingAdmissionPolicy to construct an audit annotation key:
|
||||
// "{ValidatingAdmissionPolicy name}/{key}".
|
||||
//
|
||||
// If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy
|
||||
// and the same audit annotation key, the annotation key will be identical.
|
||||
// In this case, the first annotation written with the key will be included
|
||||
// in the audit event and all subsequent annotations with the same key
|
||||
// will be discarded.
|
||||
//
|
||||
// Required.
|
||||
key: string @go(Key) @protobuf(1,bytes,opt)
|
||||
|
||||
// valueExpression represents the expression which is evaluated by CEL to
|
||||
// produce an audit annotation value. The expression must evaluate to either
|
||||
// a string or null value. If the expression evaluates to a string, the
|
||||
// audit annotation is included with the string value. If the expression
|
||||
// evaluates to null or empty string the audit annotation will be omitted.
|
||||
// The valueExpression may be no longer than 5kb in length.
|
||||
// If the result of the valueExpression is more than 10kb in length, it
|
||||
// will be truncated to 10kb.
|
||||
//
|
||||
// If multiple ValidatingAdmissionPolicyBinding resources match an
|
||||
// API request, then the valueExpression will be evaluated for
|
||||
// each binding. All unique values produced by the valueExpressions
|
||||
// will be joined together in a comma-separated list.
|
||||
//
|
||||
// Required.
|
||||
valueExpression: string @go(ValueExpression) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources.
|
||||
// ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.
|
||||
//
|
||||
// For a given admission request, each binding will cause its policy to be
|
||||
// evaluated N times, where N is 1 for policies/bindings that don't use
|
||||
// params, otherwise N is the number of parameters selected by the binding.
|
||||
//
|
||||
// The CEL expressions of a policy must have a computed CEL cost below the maximum
|
||||
// CEL budget. Each evaluation of the policy is given an independent CEL cost budget.
|
||||
// Adding/removing policies, bindings, or params can not affect whether a
|
||||
// given (policy, binding, param) combination is within its own CEL budget.
|
||||
#ValidatingAdmissionPolicyBinding: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
|
||||
spec?: #ValidatingAdmissionPolicyBindingSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.
|
||||
#ValidatingAdmissionPolicyBindingList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// List of PolicyBinding.
|
||||
items?: [...#ValidatingAdmissionPolicyBinding] @go(Items,[]ValidatingAdmissionPolicyBinding) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
|
||||
#ValidatingAdmissionPolicyBindingSpec: {
|
||||
// PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
|
||||
// If the referenced resource does not exist, this binding is considered invalid and will be ignored
|
||||
// Required.
|
||||
policyName?: string @go(PolicyName) @protobuf(1,bytes,rep)
|
||||
|
||||
// paramRef specifies the parameter resource used to configure the admission control policy.
|
||||
// It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy.
|
||||
// If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied.
|
||||
// If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
|
||||
// +optional
|
||||
paramRef?: null | #ParamRef @go(ParamRef,*ParamRef) @protobuf(2,bytes,rep)
|
||||
|
||||
// MatchResources declares what resources match this binding and will be validated by it.
|
||||
// Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this.
|
||||
// If this is unset, all resources matched by the policy are validated by this binding
|
||||
// When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated.
|
||||
// Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.
|
||||
// +optional
|
||||
matchResources?: null | #MatchResources @go(MatchResources,*MatchResources) @protobuf(3,bytes,rep)
|
||||
|
||||
// validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced.
|
||||
// If a validation evaluates to false it is always enforced according to these actions.
|
||||
//
|
||||
// Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according
|
||||
// to these actions only if the FailurePolicy is set to Fail, otherwise the failures are
|
||||
// ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.
|
||||
//
|
||||
// validationActions is declared as a set of action values. Order does
|
||||
// not matter. validationActions may not contain duplicates of the same action.
|
||||
//
|
||||
// The supported actions values are:
|
||||
//
|
||||
// "Deny" specifies that a validation failure results in a denied request.
|
||||
//
|
||||
// "Warn" specifies that a validation failure is reported to the request client
|
||||
// in HTTP Warning headers, with a warning code of 299. Warnings can be sent
|
||||
// both for allowed or denied admission responses.
|
||||
//
|
||||
// "Audit" specifies that a validation failure is included in the published
|
||||
// audit event for the request. The audit event will contain a
|
||||
// `validation.policy.admission.k8s.io/validation_failure` audit annotation
|
||||
// with a value containing the details of the validation failures, formatted as
|
||||
// a JSON list of objects, each with the following fields:
|
||||
// - message: The validation failure message string
|
||||
// - policy: The resource name of the ValidatingAdmissionPolicy
|
||||
// - binding: The resource name of the ValidatingAdmissionPolicyBinding
|
||||
// - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy
|
||||
// - validationActions: The enforcement actions enacted for the validation failure
|
||||
// Example audit annotation:
|
||||
// `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"`
|
||||
//
|
||||
// Clients should expect to handle additional values by ignoring
|
||||
// any values not recognized.
|
||||
//
|
||||
// "Deny" and "Warn" may not be used together since this combination
|
||||
// needlessly duplicates the validation failure both in the
|
||||
// API response body and the HTTP warning headers.
|
||||
//
|
||||
// Required.
|
||||
// +listType=set
|
||||
validationActions?: [...#ValidationAction] @go(ValidationActions,[]ValidationAction) @protobuf(4,bytes,rep)
|
||||
}
|
||||
|
||||
// ParamRef describes how to locate the params to be used as input to
|
||||
// expressions of rules applied by a policy binding.
|
||||
// +structType=atomic
|
||||
#ParamRef: {
|
||||
// `name` is the name of the resource being referenced.
|
||||
//
|
||||
// `name` and `selector` are mutually exclusive properties. If one is set,
|
||||
// the other must be unset.
|
||||
//
|
||||
// +optional
|
||||
name?: string @go(Name) @protobuf(1,bytes,rep)
|
||||
|
||||
// namespace is the namespace of the referenced resource. Allows limiting
|
||||
// the search for params to a specific namespace. Applies to both `name` and
|
||||
// `selector` fields.
|
||||
//
|
||||
// A per-namespace parameter may be used by specifying a namespace-scoped
|
||||
// `paramKind` in the policy and leaving this field empty.
|
||||
//
|
||||
// - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this
|
||||
// field results in a configuration error.
|
||||
//
|
||||
// - If `paramKind` is namespace-scoped, the namespace of the object being
|
||||
// evaluated for admission will be used when this field is left unset. Take
|
||||
// care that if this is left empty the binding must not match any cluster-scoped
|
||||
// resources, which will result in an error.
|
||||
//
|
||||
// +optional
|
||||
namespace?: string @go(Namespace) @protobuf(2,bytes,rep)
|
||||
|
||||
// selector can be used to match multiple param objects based on their labels.
|
||||
// Supply selector: {} to match all resources of the ParamKind.
|
||||
//
|
||||
// If multiple params are found, they are all evaluated with the policy expressions
|
||||
// and the results are ANDed together.
|
||||
//
|
||||
// One of `name` or `selector` must be set, but `name` and `selector` are
|
||||
// mutually exclusive properties. If one is set, the other must be unset.
|
||||
//
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(3,bytes,rep)
|
||||
|
||||
// `parameterNotFoundAction` controls the behavior of the binding when the resource
|
||||
// exists, and name or selector is valid, but there are no parameters
|
||||
// matched by the binding. If the value is set to `Allow`, then no
|
||||
// matched parameters will be treated as successful validation by the binding.
|
||||
// If set to `Deny`, then no matched parameters will be subject to the
|
||||
// `failurePolicy` of the policy.
|
||||
//
|
||||
// Allowed values are `Allow` or `Deny`
|
||||
// Default to `Deny`
|
||||
// +optional
|
||||
parameterNotFoundAction?: null | #ParameterNotFoundActionType @go(ParameterNotFoundAction,*ParameterNotFoundActionType) @protobuf(4,bytes,rep)
|
||||
}
|
||||
|
||||
// MatchResources decides whether to run the admission control policy on an object based
|
||||
// on whether it meets the match criteria.
|
||||
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
||||
// +structType=atomic
|
||||
#MatchResources: {
|
||||
// NamespaceSelector decides whether to run the admission control policy on an object based
|
||||
// on whether the namespace for that object matches the selector. If the
|
||||
// object itself is a namespace, the matching is performed on
|
||||
// object.metadata.labels. If the object is another cluster scoped resource,
|
||||
// it never skips the policy.
|
||||
//
|
||||
// For example, to run the webhook on any objects whose namespace is not
|
||||
// associated with "runlevel" of "0" or "1"; you will set the selector as
|
||||
// follows:
|
||||
// "namespaceSelector": {
|
||||
// "matchExpressions": [
|
||||
// {
|
||||
// "key": "runlevel",
|
||||
// "operator": "NotIn",
|
||||
// "values": [
|
||||
// "0",
|
||||
// "1"
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// If instead you want to only run the policy on any objects whose
|
||||
// namespace is associated with the "environment" of "prod" or "staging";
|
||||
// you will set the selector as follows:
|
||||
// "namespaceSelector": {
|
||||
// "matchExpressions": [
|
||||
// {
|
||||
// "key": "environment",
|
||||
// "operator": "In",
|
||||
// "values": [
|
||||
// "prod",
|
||||
// "staging"
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
//
|
||||
// See
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
// for more examples of label selectors.
|
||||
//
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
// +optional
|
||||
namespaceSelector?: null | metav1.#LabelSelector @go(NamespaceSelector,*metav1.LabelSelector) @protobuf(1,bytes,opt)
|
||||
|
||||
// ObjectSelector decides whether to run the validation based on if the
|
||||
// object has matching labels. objectSelector is evaluated against both
|
||||
// the oldObject and newObject that would be sent to the cel validation, and
|
||||
// is considered to match if either object matches the selector. A null
|
||||
// object (oldObject in the case of create, or newObject in the case of
|
||||
// delete) or an object that cannot have labels (like a
|
||||
// DeploymentRollback or a PodProxyOptions object) is not considered to
|
||||
// match.
|
||||
// Use the object selector only if the webhook is opt-in, because end
|
||||
// users may skip the admission webhook by setting the labels.
|
||||
// Default to the empty LabelSelector, which matches everything.
|
||||
// +optional
|
||||
objectSelector?: null | metav1.#LabelSelector @go(ObjectSelector,*metav1.LabelSelector) @protobuf(2,bytes,opt)
|
||||
|
||||
// ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
|
||||
// The policy cares about an operation if it matches _any_ Rule.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
resourceRules?: [...#NamedRuleWithOperations] @go(ResourceRules,[]NamedRuleWithOperations) @protobuf(3,bytes,rep)
|
||||
|
||||
// ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
|
||||
// The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
excludeResourceRules?: [...#NamedRuleWithOperations] @go(ExcludeResourceRules,[]NamedRuleWithOperations) @protobuf(4,bytes,rep)
|
||||
|
||||
// matchPolicy defines how the "MatchResources" list is used to match incoming requests.
|
||||
// Allowed values are "Exact" or "Equivalent".
|
||||
//
|
||||
// - Exact: match a request only if it exactly matches a specified rule.
|
||||
// For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
|
||||
// but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
|
||||
// a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.
|
||||
//
|
||||
// - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version.
|
||||
// For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
|
||||
// and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
|
||||
// a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.
|
||||
//
|
||||
// Defaults to "Equivalent"
|
||||
// +optional
|
||||
matchPolicy?: null | #MatchPolicyType @go(MatchPolicy,*MatchPolicyType) @protobuf(7,bytes,opt,casttype=MatchPolicyType)
|
||||
}
|
||||
|
||||
// ValidationAction specifies a policy enforcement action.
|
||||
// +enum
|
||||
#ValidationAction: string // #enumValidationAction
|
||||
|
||||
#enumValidationAction:
|
||||
#Deny |
|
||||
#Warn |
|
||||
#Audit
|
||||
|
||||
// Deny specifies that a validation failure results in a denied request.
|
||||
#Deny: #ValidationAction & "Deny"
|
||||
|
||||
// Warn specifies that a validation failure is reported to the request client
|
||||
// in HTTP Warning headers, with a warning code of 299. Warnings can be sent
|
||||
// both for allowed or denied admission responses.
|
||||
#Warn: #ValidationAction & "Warn"
|
||||
|
||||
// Audit specifies that a validation failure is included in the published
|
||||
// audit event for the request. The audit event will contain a
|
||||
// `validation.policy.admission.k8s.io/validation_failure` audit annotation
|
||||
// with a value containing the details of the validation failure.
|
||||
#Audit: #ValidationAction & "Audit"
|
||||
|
||||
// NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
|
||||
// +structType=atomic
|
||||
#NamedRuleWithOperations: {
|
||||
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
resourceNames?: [...string] @go(ResourceNames,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
v1.#RuleWithOperations
|
||||
}
|
||||
|
||||
// RuleWithOperations is a tuple of Operations and Resources. It is recommended to make
|
||||
// sure that all the tuple expansions are valid.
|
||||
#RuleWithOperations: v1.#RuleWithOperations
|
||||
|
||||
// OperationType specifies an operation for a request.
|
||||
// +enum
|
||||
#OperationType: v1.#OperationType // #enumOperationType
|
||||
|
||||
#enumOperationType:
|
||||
#OperationAll |
|
||||
#Create |
|
||||
#Update |
|
||||
#Delete |
|
||||
#Connect
|
||||
|
||||
#OperationAll: v1.#OperationType & "*"
|
||||
#Create: v1.#OperationType & "CREATE"
|
||||
#Update: v1.#OperationType & "UPDATE"
|
||||
#Delete: v1.#OperationType & "DELETE"
|
||||
#Connect: v1.#OperationType & "CONNECT"
|
||||
@@ -0,0 +1,9 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admissionregistration/v1beta1
|
||||
|
||||
// Package v1beta1 is the v1beta1 version of the API.
|
||||
// AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration
|
||||
// MutatingWebhookConfiguration and ValidatingWebhookConfiguration are for the
|
||||
// new dynamic admission controller configuration.
|
||||
package v1beta1
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/admissionregistration/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "admissionregistration.k8s.io"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/apidiscovery/v2beta1
|
||||
|
||||
package v2beta1
|
||||
|
||||
#GroupName: "apidiscovery.k8s.io"
|
||||
@@ -0,0 +1,157 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/apidiscovery/v2beta1
|
||||
|
||||
package v2beta1
|
||||
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery.
|
||||
// This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated
|
||||
// list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers)
|
||||
// that a cluster supports.
|
||||
#APIGroupDiscoveryList: {
|
||||
v1.#TypeMeta
|
||||
|
||||
// ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: v1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is the list of groups for discovery. The groups are listed in priority order.
|
||||
items: [...#APIGroupDiscovery] @go(Items,[]APIGroupDiscovery) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// APIGroupDiscovery holds information about which resources are being served for all version of the API Group.
|
||||
// It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version.
|
||||
// Versions are in descending order of preference, with the first version being the preferred entry.
|
||||
#APIGroupDiscovery: {
|
||||
v1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// The only field completed will be name. For instance, resourceVersion will be empty.
|
||||
// name is the name of the API group whose discovery information is presented here.
|
||||
// name is allowed to be "" to represent the legacy, ungroupified resources.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: v1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// versions are the versions supported in this group. They are sorted in descending order of preference,
|
||||
// with the preferred version being the first entry.
|
||||
// +listType=map
|
||||
// +listMapKey=version
|
||||
versions?: [...#APIVersionDiscovery] @go(Versions,[]APIVersionDiscovery) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group.
|
||||
#APIVersionDiscovery: {
|
||||
// version is the name of the version within a group version.
|
||||
version: string @go(Version) @protobuf(1,bytes,opt)
|
||||
|
||||
// resources is a list of APIResourceDiscovery objects for the corresponding group version.
|
||||
// +listType=map
|
||||
// +listMapKey=resource
|
||||
resources?: [...#APIResourceDiscovery] @go(Resources,[]APIResourceDiscovery) @protobuf(2,bytes,rep)
|
||||
|
||||
// freshness marks whether a group version's discovery document is up to date.
|
||||
// "Current" indicates the discovery document was recently
|
||||
// refreshed. "Stale" indicates the discovery document could not
|
||||
// be retrieved and the returned discovery document may be
|
||||
// significantly out of date. Clients that require the latest
|
||||
// version of the discovery information be retrieved before
|
||||
// performing an operation should not use the aggregated document
|
||||
freshness?: #DiscoveryFreshness @go(Freshness) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// APIResourceDiscovery provides information about an API resource for discovery.
|
||||
#APIResourceDiscovery: {
|
||||
// resource is the plural name of the resource. This is used in the URL path and is the unique identifier
|
||||
// for this resource across all versions in the API group.
|
||||
// Resources with non-empty groups are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>
|
||||
// Resources with empty groups are located at /api/v1/<APIResourceDiscovery.Resource>
|
||||
resource: string @go(Resource) @protobuf(1,bytes,opt)
|
||||
|
||||
// responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns.
|
||||
// APIs may return other objects types at their discretion, such as error conditions, requests for alternate representations, or other operation specific behavior.
|
||||
// This value will be null or empty if an APIService reports subresources but supports no operations on the parent resource
|
||||
responseKind?: null | v1.#GroupVersionKind @go(ResponseKind,*v1.GroupVersionKind) @protobuf(2,bytes,opt)
|
||||
|
||||
// scope indicates the scope of a resource, either Cluster or Namespaced
|
||||
scope: #ResourceScope @go(Scope) @protobuf(3,bytes,opt)
|
||||
|
||||
// singularResource is the singular name of the resource. This allows clients to handle plural and singular opaquely.
|
||||
// For many clients the singular form of the resource will be more understandable to users reading messages and should be used when integrating the name of the resource into a sentence.
|
||||
// The command line tool kubectl, for example, allows use of the singular resource name in place of plurals.
|
||||
// The singular form of a resource should always be an optional element - when in doubt use the canonical resource name.
|
||||
singularResource: string @go(SingularResource) @protobuf(4,bytes,opt)
|
||||
|
||||
// verbs is a list of supported API operation types (this includes
|
||||
// but is not limited to get, list, watch, create, update, patch,
|
||||
// delete, deletecollection, and proxy).
|
||||
// +listType=set
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(5,bytes,opt)
|
||||
|
||||
// shortNames is a list of suggested short names of the resource.
|
||||
// +listType=set
|
||||
shortNames?: [...string] @go(ShortNames,[]string) @protobuf(6,bytes,rep)
|
||||
|
||||
// categories is a list of the grouped resources this resource belongs to (e.g. 'all').
|
||||
// Clients may use this to simplify acting on multiple resource types at once.
|
||||
// +listType=set
|
||||
categories?: [...string] @go(Categories,[]string) @protobuf(7,bytes,rep)
|
||||
|
||||
// subresources is a list of subresources provided by this resource. Subresources are located at /apis/<APIGroupDiscovery.objectMeta.name>/<APIVersionDiscovery.version>/<APIResourceDiscovery.Resource>/name-of-instance/<APIResourceDiscovery.subresources[i].subresource>
|
||||
// +listType=map
|
||||
// +listMapKey=subresource
|
||||
subresources?: [...#APISubresourceDiscovery] @go(Subresources,[]APISubresourceDiscovery) @protobuf(8,bytes,rep)
|
||||
}
|
||||
|
||||
// ResourceScope is an enum defining the different scopes available to a resource.
|
||||
#ResourceScope: string // #enumResourceScope
|
||||
|
||||
#enumResourceScope:
|
||||
#ScopeCluster |
|
||||
#ScopeNamespace
|
||||
|
||||
#ScopeCluster: #ResourceScope & "Cluster"
|
||||
#ScopeNamespace: #ResourceScope & "Namespaced"
|
||||
|
||||
// DiscoveryFreshness is an enum defining whether the Discovery document published by an apiservice is up to date (fresh).
|
||||
#DiscoveryFreshness: string // #enumDiscoveryFreshness
|
||||
|
||||
#enumDiscoveryFreshness:
|
||||
#DiscoveryFreshnessCurrent |
|
||||
#DiscoveryFreshnessStale
|
||||
|
||||
#DiscoveryFreshnessCurrent: #DiscoveryFreshness & "Current"
|
||||
#DiscoveryFreshnessStale: #DiscoveryFreshness & "Stale"
|
||||
|
||||
// APISubresourceDiscovery provides information about an API subresource for discovery.
|
||||
#APISubresourceDiscovery: {
|
||||
// subresource is the name of the subresource. This is used in the URL path and is the unique identifier
|
||||
// for this resource across all versions.
|
||||
subresource: string @go(Subresource) @protobuf(1,bytes,opt)
|
||||
|
||||
// responseKind describes the group, version, and kind of the serialization schema for the object type this endpoint typically returns.
|
||||
// Some subresources do not return normal resources, these will have null or empty return types.
|
||||
responseKind?: null | v1.#GroupVersionKind @go(ResponseKind,*v1.GroupVersionKind) @protobuf(2,bytes,opt)
|
||||
|
||||
// acceptedTypes describes the kinds that this endpoint accepts.
|
||||
// Subresources may accept the standard content types or define
|
||||
// custom negotiation schemes. The list may not be exhaustive for
|
||||
// all operations.
|
||||
// +listType=map
|
||||
// +listMapKey=group
|
||||
// +listMapKey=version
|
||||
// +listMapKey=kind
|
||||
acceptedTypes?: [...v1.#GroupVersionKind] @go(AcceptedTypes,[]v1.GroupVersionKind) @protobuf(3,bytes,rep)
|
||||
|
||||
// verbs is a list of supported API operation types (this includes
|
||||
// but is not limited to get, list, watch, create, update, patch,
|
||||
// delete, deletecollection, and proxy). Subresources may define
|
||||
// custom verbs outside the standard Kubernetes verb set. Clients
|
||||
// should expect the behavior of standard verbs to align with
|
||||
// Kubernetes interaction conventions.
|
||||
// +listType=set
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(4,bytes,opt)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/apiserverinternal/v1alpha1
|
||||
|
||||
// Package v1alpha1 contains the v1alpha1 version of the API used by the
|
||||
// apiservers themselves.
|
||||
package v1alpha1
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/apiserverinternal/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
#GroupName: "internal.apiserver.k8s.io"
|
||||
@@ -0,0 +1,129 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/apiserverinternal/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// Storage version of a specific resource.
|
||||
#StorageVersion: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// The name is <group>.<resource>.
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec is an empty spec. It is here to comply with Kubernetes API style.
|
||||
spec: #StorageVersionSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// API server instances report the version they can decode and the version they
|
||||
// encode objects to when persisting objects in the backend.
|
||||
status: #StorageVersionStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// StorageVersionSpec is an empty spec.
|
||||
#StorageVersionSpec: {
|
||||
}
|
||||
|
||||
// API server instances report the versions they can decode and the version they
|
||||
// encode objects to when persisting objects in the backend.
|
||||
#StorageVersionStatus: {
|
||||
// The reported versions per API server instance.
|
||||
// +optional
|
||||
// +listType=map
|
||||
// +listMapKey=apiServerID
|
||||
storageVersions?: [...#ServerStorageVersion] @go(StorageVersions,[]ServerStorageVersion) @protobuf(1,bytes,opt)
|
||||
|
||||
// If all API server instances agree on the same encoding storage version,
|
||||
// then this field is set to that version. Otherwise this field is left empty.
|
||||
// API servers should finish updating its storageVersionStatus entry before
|
||||
// serving write operations, so that this field will be in sync with the reality.
|
||||
// +optional
|
||||
commonEncodingVersion?: null | string @go(CommonEncodingVersion,*string) @protobuf(2,bytes,opt)
|
||||
|
||||
// The latest available observations of the storageVersion's state.
|
||||
// +optional
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
conditions?: [...#StorageVersionCondition] @go(Conditions,[]StorageVersionCondition) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// An API server instance reports the version it can decode and the version it
|
||||
// encodes objects to when persisting objects in the backend.
|
||||
#ServerStorageVersion: {
|
||||
// The ID of the reporting API server.
|
||||
apiServerID?: string @go(APIServerID) @protobuf(1,bytes,opt)
|
||||
|
||||
// The API server encodes the object to this version when persisting it in
|
||||
// the backend (e.g., etcd).
|
||||
encodingVersion?: string @go(EncodingVersion) @protobuf(2,bytes,opt)
|
||||
|
||||
// The API server can decode objects encoded in these versions.
|
||||
// The encodingVersion must be included in the decodableVersions.
|
||||
// +listType=set
|
||||
decodableVersions?: [...string] @go(DecodableVersions,[]string) @protobuf(3,bytes,opt)
|
||||
|
||||
// The API server can serve these versions.
|
||||
// DecodableVersions must include all ServedVersions.
|
||||
// +listType=set
|
||||
servedVersions?: [...string] @go(ServedVersions,[]string) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
#StorageVersionConditionType: string // #enumStorageVersionConditionType
|
||||
|
||||
#enumStorageVersionConditionType:
|
||||
#AllEncodingVersionsEqual
|
||||
|
||||
// Indicates that encoding storage versions reported by all servers are equal.
|
||||
#AllEncodingVersionsEqual: #StorageVersionConditionType & "AllEncodingVersionsEqual"
|
||||
|
||||
#ConditionStatus: string // #enumConditionStatus
|
||||
|
||||
#enumConditionStatus:
|
||||
#ConditionTrue |
|
||||
#ConditionFalse |
|
||||
#ConditionUnknown
|
||||
|
||||
#ConditionTrue: #ConditionStatus & "True"
|
||||
#ConditionFalse: #ConditionStatus & "False"
|
||||
#ConditionUnknown: #ConditionStatus & "Unknown"
|
||||
|
||||
// Describes the state of the storageVersion at a certain point.
|
||||
#StorageVersionCondition: {
|
||||
// Type of the condition.
|
||||
// +required
|
||||
type: #StorageVersionConditionType @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
// +required
|
||||
status: #ConditionStatus @go(Status) @protobuf(2,bytes,opt)
|
||||
|
||||
// If set, this represents the .metadata.generation that the condition was set based upon.
|
||||
// +optional
|
||||
observedGeneration?: int64 @go(ObservedGeneration) @protobuf(3,varint,opt)
|
||||
|
||||
// Last time the condition transitioned from one status to another.
|
||||
// +required
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(4,bytes,opt)
|
||||
|
||||
// The reason for the condition's last transition.
|
||||
// +required
|
||||
reason: string @go(Reason) @protobuf(5,bytes,opt)
|
||||
|
||||
// A human readable message indicating details about the transition.
|
||||
// +required
|
||||
message?: string @go(Message) @protobuf(6,bytes,opt)
|
||||
}
|
||||
|
||||
// A list of StorageVersions.
|
||||
#StorageVersionList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Items holds a list of StorageVersion
|
||||
items: [...#StorageVersion] @go(Items,[]StorageVersion) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/apps/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "apps"
|
||||
@@ -0,0 +1,656 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/apps/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
#ControllerRevisionHashLabelKey: "controller-revision-hash"
|
||||
#StatefulSetRevisionLabel: "controller-revision-hash"
|
||||
#StatefulSetPodNameLabel: "statefulset.kubernetes.io/pod-name"
|
||||
|
||||
// ScaleSpec describes the attributes of a scale subresource
|
||||
#ScaleSpec: {
|
||||
// replicas is the number of observed instances of the scaled object.
|
||||
// +optional
|
||||
replicas?: int32 @go(Replicas) @protobuf(1,varint,opt)
|
||||
}
|
||||
|
||||
// ScaleStatus represents the current status of a scale subresource.
|
||||
#ScaleStatus: {
|
||||
// replias is the actual number of observed instances of the scaled object.
|
||||
replicas: int32 @go(Replicas) @protobuf(1,varint,opt)
|
||||
|
||||
// selector is a label query over pods that should match the replicas count. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
// +optional
|
||||
selector?: {[string]: string} @go(Selector,map[string]string) @protobuf(2,bytes,rep)
|
||||
|
||||
// targetSelector is the label selector for pods that should match the replicas count. This is a serializated
|
||||
// version of both map-based and more expressive set-based selectors. This is done to
|
||||
// avoid introspection in the clients. The string will be in the same format as the
|
||||
// query-param syntax. If the target type only supports map-based selectors, both this
|
||||
// field and map-based selector field are populated.
|
||||
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
|
||||
// +optional
|
||||
targetSelector?: string @go(TargetSelector) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// Scale represents a scaling request for a resource.
|
||||
#Scale: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||
// +optional
|
||||
spec?: #ScaleSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// status defines current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
|
||||
// +optional
|
||||
status?: #ScaleStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for
|
||||
// more information.
|
||||
// StatefulSet represents a set of pods with consistent identities.
|
||||
// Identities are defined as:
|
||||
// - Network: A single stable DNS and hostname.
|
||||
// - Storage: As many VolumeClaims as requested.
|
||||
//
|
||||
// The StatefulSet guarantees that a given network identity will always
|
||||
// map to the same storage identity.
|
||||
#StatefulSet: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec defines the desired identities of pods in this set.
|
||||
// +optional
|
||||
spec?: #StatefulSetSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is the current status of Pods in this StatefulSet. This data
|
||||
// may be out of date by some window of time.
|
||||
// +optional
|
||||
status?: #StatefulSetStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// PodManagementPolicyType defines the policy for creating pods under a stateful set.
|
||||
#PodManagementPolicyType: string // #enumPodManagementPolicyType
|
||||
|
||||
#enumPodManagementPolicyType:
|
||||
#OrderedReadyPodManagement |
|
||||
#ParallelPodManagement
|
||||
|
||||
// OrderedReadyPodManagement will create pods in strictly increasing order on
|
||||
// scale up and strictly decreasing order on scale down, progressing only when
|
||||
// the previous pod is ready or terminated. At most one pod will be changed
|
||||
// at any time.
|
||||
#OrderedReadyPodManagement: #PodManagementPolicyType & "OrderedReady"
|
||||
|
||||
// ParallelPodManagement will create and delete pods as soon as the stateful set
|
||||
// replica count is changed, and will not wait for pods to be ready or complete
|
||||
// termination.
|
||||
#ParallelPodManagement: #PodManagementPolicyType & "Parallel"
|
||||
|
||||
// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
|
||||
// controller will use to perform updates. It includes any additional parameters
|
||||
// necessary to perform the update for the indicated strategy.
|
||||
#StatefulSetUpdateStrategy: {
|
||||
// Type indicates the type of the StatefulSetUpdateStrategy.
|
||||
type?: #StatefulSetUpdateStrategyType @go(Type) @protobuf(1,bytes,opt,casttype=StatefulSetStrategyType)
|
||||
|
||||
// RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
|
||||
rollingUpdate?: null | #RollingUpdateStatefulSetStrategy @go(RollingUpdate,*RollingUpdateStatefulSetStrategy) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// StatefulSetUpdateStrategyType is a string enumeration type that enumerates
|
||||
// all possible update strategies for the StatefulSet controller.
|
||||
#StatefulSetUpdateStrategyType: string // #enumStatefulSetUpdateStrategyType
|
||||
|
||||
#enumStatefulSetUpdateStrategyType:
|
||||
#RollingUpdateStatefulSetStrategyType |
|
||||
#OnDeleteStatefulSetStrategyType
|
||||
|
||||
// RollingUpdateStatefulSetStrategyType indicates that update will be
|
||||
// applied to all Pods in the StatefulSet with respect to the StatefulSet
|
||||
// ordering constraints. When a scale operation is performed with this
|
||||
// strategy, new Pods will be created from the specification version indicated
|
||||
// by the StatefulSet's updateRevision.
|
||||
#RollingUpdateStatefulSetStrategyType: #StatefulSetUpdateStrategyType & "RollingUpdate"
|
||||
|
||||
// OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version
|
||||
// tracking and ordered rolling restarts are disabled. Pods are recreated
|
||||
// from the StatefulSetSpec when they are manually deleted. When a scale
|
||||
// operation is performed with this strategy,specification version indicated
|
||||
// by the StatefulSet's currentRevision.
|
||||
#OnDeleteStatefulSetStrategyType: #StatefulSetUpdateStrategyType & "OnDelete"
|
||||
|
||||
// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
|
||||
#RollingUpdateStatefulSetStrategy: {
|
||||
// Partition indicates the ordinal at which the StatefulSet should be partitioned
|
||||
// for updates. During a rolling update, all pods from ordinal Replicas-1 to
|
||||
// Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched.
|
||||
// This is helpful in being able to do a canary based deployment. The default value is 0.
|
||||
partition?: null | int32 @go(Partition,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// maxUnavailable is the maximum number of pods that can be unavailable during the update.
|
||||
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
|
||||
// Absolute number is calculated from percentage by rounding up. This can not be 0.
|
||||
// Defaults to 1. This field is alpha-level and is only honored by servers that enable the
|
||||
// MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to
|
||||
// Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it
|
||||
// will be counted towards MaxUnavailable.
|
||||
// +optional
|
||||
maxUnavailable?: null | intstr.#IntOrString @go(MaxUnavailable,*intstr.IntOrString) @protobuf(2,varint,opt)
|
||||
}
|
||||
|
||||
// PersistentVolumeClaimRetentionPolicyType is a string enumeration of the policies that will determine
|
||||
// when volumes from the VolumeClaimTemplates will be deleted when the controlling StatefulSet is
|
||||
// deleted or scaled down.
|
||||
#PersistentVolumeClaimRetentionPolicyType: string // #enumPersistentVolumeClaimRetentionPolicyType
|
||||
|
||||
#enumPersistentVolumeClaimRetentionPolicyType:
|
||||
#RetainPersistentVolumeClaimRetentionPolicyType |
|
||||
#RetentionPersistentVolumeClaimRetentionPolicyType
|
||||
|
||||
// RetainPersistentVolumeClaimRetentionPolicyType is the default
|
||||
// PersistentVolumeClaimRetentionPolicy and specifies that
|
||||
// PersistentVolumeClaims associated with StatefulSet VolumeClaimTemplates
|
||||
// will not be deleted.
|
||||
#RetainPersistentVolumeClaimRetentionPolicyType: #PersistentVolumeClaimRetentionPolicyType & "Retain"
|
||||
|
||||
// RetentionPersistentVolumeClaimRetentionPolicyType specifies that
|
||||
// PersistentVolumeClaims associated with StatefulSet VolumeClaimTemplates
|
||||
// will be deleted in the scenario specified in
|
||||
// StatefulSetPersistentVolumeClaimRetentionPolicy.
|
||||
#RetentionPersistentVolumeClaimRetentionPolicyType: #PersistentVolumeClaimRetentionPolicyType & "Delete"
|
||||
|
||||
// StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs
|
||||
// created from the StatefulSet VolumeClaimTemplates.
|
||||
#StatefulSetPersistentVolumeClaimRetentionPolicy: {
|
||||
// whenDeleted specifies what happens to PVCs created from StatefulSet
|
||||
// VolumeClaimTemplates when the StatefulSet is deleted. The default policy
|
||||
// of `Retain` causes PVCs to not be affected by StatefulSet deletion. The
|
||||
// `Delete` policy causes those PVCs to be deleted.
|
||||
whenDeleted?: #PersistentVolumeClaimRetentionPolicyType @go(WhenDeleted) @protobuf(1,bytes,opt,casttype=PersistentVolumeClaimRetentionPolicyType)
|
||||
|
||||
// whenScaled specifies what happens to PVCs created from StatefulSet
|
||||
// VolumeClaimTemplates when the StatefulSet is scaled down. The default
|
||||
// policy of `Retain` causes PVCs to not be affected by a scaledown. The
|
||||
// `Delete` policy causes the associated PVCs for any excess pods above
|
||||
// the replica count to be deleted.
|
||||
whenScaled?: #PersistentVolumeClaimRetentionPolicyType @go(WhenScaled) @protobuf(2,bytes,opt,casttype=PersistentVolumeClaimRetentionPolicyType)
|
||||
}
|
||||
|
||||
// StatefulSetOrdinals describes the policy used for replica ordinal assignment
|
||||
// in this StatefulSet.
|
||||
#StatefulSetOrdinals: {
|
||||
// start is the number representing the first replica's index. It may be used
|
||||
// to number replicas from an alternate index (eg: 1-indexed) over the default
|
||||
// 0-indexed names, or to orchestrate progressive movement of replicas from
|
||||
// one StatefulSet to another.
|
||||
// If set, replica indices will be in the range:
|
||||
// [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas).
|
||||
// If unset, defaults to 0. Replica indices will be in the range:
|
||||
// [0, .spec.replicas).
|
||||
// +optional
|
||||
start?: int32 @go(Start) @protobuf(1,varint,opt)
|
||||
}
|
||||
|
||||
// A StatefulSetSpec is the specification of a StatefulSet.
|
||||
#StatefulSetSpec: {
|
||||
// replicas is the desired number of replicas of the given Template.
|
||||
// These are replicas in the sense that they are instantiations of the
|
||||
// same Template, but individual replicas also have a consistent identity.
|
||||
// If unspecified, defaults to 1.
|
||||
// TODO: Consider a rename of this field.
|
||||
// +optional
|
||||
replicas?: null | int32 @go(Replicas,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// selector is a label query over pods that should match the replica count.
|
||||
// If empty, defaulted to labels on the pod template.
|
||||
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(2,bytes,opt)
|
||||
|
||||
// template is the object that describes the pod that will be created if
|
||||
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
|
||||
// will fulfill this Template, but have a unique identity from the rest
|
||||
// of the StatefulSet. Each pod will be named with the format
|
||||
// <statefulsetname>-<podindex>. For example, a pod in a StatefulSet named
|
||||
// "web" with index number "3" would be named "web-3".
|
||||
template: v1.#PodTemplateSpec @go(Template) @protobuf(3,bytes,opt)
|
||||
|
||||
// volumeClaimTemplates is a list of claims that pods are allowed to reference.
|
||||
// The StatefulSet controller is responsible for mapping network identities to
|
||||
// claims in a way that maintains the identity of a pod. Every claim in
|
||||
// this list must have at least one matching (by name) volumeMount in one
|
||||
// container in the template. A claim in this list takes precedence over
|
||||
// any volumes in the template, with the same name.
|
||||
// TODO: Define the behavior if a claim already exists with the same name.
|
||||
// +optional
|
||||
volumeClaimTemplates?: [...v1.#PersistentVolumeClaim] @go(VolumeClaimTemplates,[]v1.PersistentVolumeClaim) @protobuf(4,bytes,rep)
|
||||
|
||||
// serviceName is the name of the service that governs this StatefulSet.
|
||||
// This service must exist before the StatefulSet, and is responsible for
|
||||
// the network identity of the set. Pods get DNS/hostnames that follow the
|
||||
// pattern: pod-specific-string.serviceName.default.svc.cluster.local
|
||||
// where "pod-specific-string" is managed by the StatefulSet controller.
|
||||
serviceName: string @go(ServiceName) @protobuf(5,bytes,opt)
|
||||
|
||||
// podManagementPolicy controls how pods are created during initial scale up,
|
||||
// when replacing pods on nodes, or when scaling down. The default policy is
|
||||
// `OrderedReady`, where pods are created in increasing order (pod-0, then
|
||||
// pod-1, etc) and the controller will wait until each pod is ready before
|
||||
// continuing. When scaling down, the pods are removed in the opposite order.
|
||||
// The alternative policy is `Parallel` which will create pods in parallel
|
||||
// to match the desired scale without waiting, and on scale down will delete
|
||||
// all pods at once.
|
||||
// +optional
|
||||
podManagementPolicy?: #PodManagementPolicyType @go(PodManagementPolicy) @protobuf(6,bytes,opt,casttype=PodManagementPolicyType)
|
||||
|
||||
// updateStrategy indicates the StatefulSetUpdateStrategy that will be
|
||||
// employed to update Pods in the StatefulSet when a revision is made to
|
||||
// Template.
|
||||
updateStrategy?: #StatefulSetUpdateStrategy @go(UpdateStrategy) @protobuf(7,bytes,opt)
|
||||
|
||||
// revisionHistoryLimit is the maximum number of revisions that will
|
||||
// be maintained in the StatefulSet's revision history. The revision history
|
||||
// consists of all revisions not represented by a currently applied
|
||||
// StatefulSetSpec version. The default value is 10.
|
||||
revisionHistoryLimit?: null | int32 @go(RevisionHistoryLimit,*int32) @protobuf(8,varint,opt)
|
||||
|
||||
// minReadySeconds is the minimum number of seconds for which a newly created pod should be ready
|
||||
// without any of its container crashing for it to be considered available.
|
||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||
// +optional
|
||||
minReadySeconds?: int32 @go(MinReadySeconds) @protobuf(9,varint,opt)
|
||||
|
||||
// PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from
|
||||
// the StatefulSet VolumeClaimTemplates. This requires the
|
||||
// StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha.
|
||||
// +optional
|
||||
persistentVolumeClaimRetentionPolicy?: null | #StatefulSetPersistentVolumeClaimRetentionPolicy @go(PersistentVolumeClaimRetentionPolicy,*StatefulSetPersistentVolumeClaimRetentionPolicy) @protobuf(10,bytes,opt)
|
||||
|
||||
// ordinals controls the numbering of replica indices in a StatefulSet. The
|
||||
// default ordinals behavior assigns a "0" index to the first replica and
|
||||
// increments the index by one for each additional replica requested. Using
|
||||
// the ordinals field requires the StatefulSetStartOrdinal feature gate to be
|
||||
// enabled, which is beta.
|
||||
// +optional
|
||||
ordinals?: null | #StatefulSetOrdinals @go(Ordinals,*StatefulSetOrdinals) @protobuf(11,bytes,opt)
|
||||
}
|
||||
|
||||
// StatefulSetStatus represents the current state of a StatefulSet.
|
||||
#StatefulSetStatus: {
|
||||
// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
|
||||
// StatefulSet's generation, which is updated on mutation by the API Server.
|
||||
// +optional
|
||||
observedGeneration?: null | int64 @go(ObservedGeneration,*int64) @protobuf(1,varint,opt)
|
||||
|
||||
// replicas is the number of Pods created by the StatefulSet controller.
|
||||
replicas: int32 @go(Replicas) @protobuf(2,varint,opt)
|
||||
|
||||
// readyReplicas is the number of pods created by this StatefulSet controller with a Ready Condition.
|
||||
readyReplicas?: int32 @go(ReadyReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
|
||||
// indicated by currentRevision.
|
||||
currentReplicas?: int32 @go(CurrentReplicas) @protobuf(4,varint,opt)
|
||||
|
||||
// updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
|
||||
// indicated by updateRevision.
|
||||
updatedReplicas?: int32 @go(UpdatedReplicas) @protobuf(5,varint,opt)
|
||||
|
||||
// currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
|
||||
// sequence [0,currentReplicas).
|
||||
currentRevision?: string @go(CurrentRevision) @protobuf(6,bytes,opt)
|
||||
|
||||
// updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
|
||||
// [replicas-updatedReplicas,replicas)
|
||||
updateRevision?: string @go(UpdateRevision) @protobuf(7,bytes,opt)
|
||||
|
||||
// collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
|
||||
// uses this field as a collision avoidance mechanism when it needs to create the name for the
|
||||
// newest ControllerRevision.
|
||||
// +optional
|
||||
collisionCount?: null | int32 @go(CollisionCount,*int32) @protobuf(9,varint,opt)
|
||||
|
||||
// conditions represent the latest available observations of a statefulset's current state.
|
||||
// +optional
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
conditions?: [...#StatefulSetCondition] @go(Conditions,[]StatefulSetCondition) @protobuf(10,bytes,rep)
|
||||
|
||||
// availableReplicas is the total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet.
|
||||
// +optional
|
||||
availableReplicas?: int32 @go(AvailableReplicas) @protobuf(11,varint,opt)
|
||||
}
|
||||
|
||||
#StatefulSetConditionType: string
|
||||
|
||||
// StatefulSetCondition describes the state of a statefulset at a certain point.
|
||||
#StatefulSetCondition: {
|
||||
// Type of statefulset condition.
|
||||
type: #StatefulSetConditionType @go(Type) @protobuf(1,bytes,opt,casttype=StatefulSetConditionType)
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
status: v1.#ConditionStatus @go(Status) @protobuf(2,bytes,opt,casttype=k8s.io/api/core/v1.ConditionStatus)
|
||||
|
||||
// Last time the condition transitioned from one status to another.
|
||||
// +optional
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// The reason for the condition's last transition.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// A human readable message indicating details about the transition.
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// StatefulSetList is a collection of StatefulSets.
|
||||
#StatefulSetList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
items: [...#StatefulSet] @go(Items,[]StatefulSet) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for
|
||||
// more information.
|
||||
// Deployment enables declarative updates for Pods and ReplicaSets.
|
||||
#Deployment: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Specification of the desired behavior of the Deployment.
|
||||
// +optional
|
||||
spec?: #DeploymentSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Most recently observed status of the Deployment.
|
||||
// +optional
|
||||
status?: #DeploymentStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// DeploymentSpec is the specification of the desired behavior of the Deployment.
|
||||
#DeploymentSpec: {
|
||||
// replicas is the number of desired pods. This is a pointer to distinguish between explicit
|
||||
// zero and not specified. Defaults to 1.
|
||||
// +optional
|
||||
replicas?: null | int32 @go(Replicas,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// selector is the label selector for pods. Existing ReplicaSets whose pods are
|
||||
// selected by this will be the ones affected by this deployment.
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(2,bytes,opt)
|
||||
|
||||
// Template describes the pods that will be created.
|
||||
// The only allowed template.spec.restartPolicy value is "Always".
|
||||
template: v1.#PodTemplateSpec @go(Template) @protobuf(3,bytes,opt)
|
||||
|
||||
// The deployment strategy to use to replace existing pods with new ones.
|
||||
// +optional
|
||||
// +patchStrategy=retainKeys
|
||||
strategy?: #DeploymentStrategy @go(Strategy) @protobuf(4,bytes,opt)
|
||||
|
||||
// minReadySeconds is the minimum number of seconds for which a newly created pod should be ready
|
||||
// without any of its container crashing, for it to be considered available.
|
||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||
// +optional
|
||||
minReadySeconds?: int32 @go(MinReadySeconds) @protobuf(5,varint,opt)
|
||||
|
||||
// revisionHistoryLimit is the number of old ReplicaSets to retain to allow rollback.
|
||||
// This is a pointer to distinguish between explicit zero and not specified.
|
||||
// Defaults to 2.
|
||||
// +optional
|
||||
revisionHistoryLimit?: null | int32 @go(RevisionHistoryLimit,*int32) @protobuf(6,varint,opt)
|
||||
|
||||
// paused indicates that the deployment is paused.
|
||||
// +optional
|
||||
paused?: bool @go(Paused) @protobuf(7,varint,opt)
|
||||
|
||||
// DEPRECATED.
|
||||
// rollbackTo is the config this deployment is rolling back to. Will be cleared after rollback is done.
|
||||
// +optional
|
||||
rollbackTo?: null | #RollbackConfig @go(RollbackTo,*RollbackConfig) @protobuf(8,bytes,opt)
|
||||
|
||||
// progressDeadlineSeconds is the maximum time in seconds for a deployment to make progress before it
|
||||
// is considered to be failed. The deployment controller will continue to
|
||||
// process failed deployments and a condition with a ProgressDeadlineExceeded
|
||||
// reason will be surfaced in the deployment status. Note that progress will
|
||||
// not be estimated during the time a deployment is paused. Defaults to 600s.
|
||||
// +optional
|
||||
progressDeadlineSeconds?: null | int32 @go(ProgressDeadlineSeconds,*int32) @protobuf(9,varint,opt)
|
||||
}
|
||||
|
||||
// DEPRECATED.
|
||||
// DeploymentRollback stores the information required to rollback a deployment.
|
||||
#DeploymentRollback: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Required: This must match the Name of a deployment.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
|
||||
// The annotations to be updated to a deployment
|
||||
// +optional
|
||||
updatedAnnotations?: {[string]: string} @go(UpdatedAnnotations,map[string]string) @protobuf(2,bytes,rep)
|
||||
|
||||
// The config of this deployment rollback.
|
||||
rollbackTo: #RollbackConfig @go(RollbackTo) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// DEPRECATED.
|
||||
#RollbackConfig: {
|
||||
// The revision to rollback to. If set to 0, rollback to the last revision.
|
||||
// +optional
|
||||
revision?: int64 @go(Revision) @protobuf(1,varint,opt)
|
||||
}
|
||||
|
||||
// DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
|
||||
// to existing ReplicaSets (and label key that is added to its pods) to prevent the existing ReplicaSets
|
||||
// to select new pods (and old pods being select by new ReplicaSet).
|
||||
#DefaultDeploymentUniqueLabelKey: "pod-template-hash"
|
||||
|
||||
// DeploymentStrategy describes how to replace existing pods with new ones.
|
||||
#DeploymentStrategy: {
|
||||
// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
|
||||
// +optional
|
||||
type?: #DeploymentStrategyType @go(Type) @protobuf(1,bytes,opt,casttype=DeploymentStrategyType)
|
||||
|
||||
// Rolling update config params. Present only if DeploymentStrategyType =
|
||||
// RollingUpdate.
|
||||
//---
|
||||
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
||||
// to be.
|
||||
// +optional
|
||||
rollingUpdate?: null | #RollingUpdateDeployment @go(RollingUpdate,*RollingUpdateDeployment) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
#DeploymentStrategyType: string // #enumDeploymentStrategyType
|
||||
|
||||
#enumDeploymentStrategyType:
|
||||
#RecreateDeploymentStrategyType |
|
||||
#RollingUpdateDeploymentStrategyType
|
||||
|
||||
// Kill all existing pods before creating new ones.
|
||||
#RecreateDeploymentStrategyType: #DeploymentStrategyType & "Recreate"
|
||||
|
||||
// Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one.
|
||||
#RollingUpdateDeploymentStrategyType: #DeploymentStrategyType & "RollingUpdate"
|
||||
|
||||
// Spec to control the desired behavior of rolling update.
|
||||
#RollingUpdateDeployment: {
|
||||
// The maximum number of pods that can be unavailable during the update.
|
||||
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
|
||||
// Absolute number is calculated from percentage by rounding down.
|
||||
// This can not be 0 if MaxSurge is 0.
|
||||
// Defaults to 25%.
|
||||
// Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
|
||||
// immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
|
||||
// can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
|
||||
// that the total number of pods available at all times during the update is at
|
||||
// least 70% of desired pods.
|
||||
// +optional
|
||||
maxUnavailable?: null | intstr.#IntOrString @go(MaxUnavailable,*intstr.IntOrString) @protobuf(1,bytes,opt)
|
||||
|
||||
// The maximum number of pods that can be scheduled above the desired number of
|
||||
// pods.
|
||||
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
|
||||
// This can not be 0 if MaxUnavailable is 0.
|
||||
// Absolute number is calculated from percentage by rounding up.
|
||||
// Defaults to 25%.
|
||||
// Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
|
||||
// the rolling update starts, such that the total number of old and new pods do not exceed
|
||||
// 130% of desired pods. Once old pods have been killed,
|
||||
// new ReplicaSet can be scaled up further, ensuring that total number of pods running
|
||||
// at any time during the update is at most 130% of desired pods.
|
||||
// +optional
|
||||
maxSurge?: null | intstr.#IntOrString @go(MaxSurge,*intstr.IntOrString) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// DeploymentStatus is the most recently observed status of the Deployment.
|
||||
#DeploymentStatus: {
|
||||
// observedGeneration is the generation observed by the deployment controller.
|
||||
// +optional
|
||||
observedGeneration?: int64 @go(ObservedGeneration) @protobuf(1,varint,opt)
|
||||
|
||||
// replicas is the total number of non-terminated pods targeted by this deployment (their labels match the selector).
|
||||
// +optional
|
||||
replicas?: int32 @go(Replicas) @protobuf(2,varint,opt)
|
||||
|
||||
// updatedReplicas is the total number of non-terminated pods targeted by this deployment that have the desired template spec.
|
||||
// +optional
|
||||
updatedReplicas?: int32 @go(UpdatedReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition.
|
||||
// +optional
|
||||
readyReplicas?: int32 @go(ReadyReplicas) @protobuf(7,varint,opt)
|
||||
|
||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
|
||||
// +optional
|
||||
availableReplicas?: int32 @go(AvailableReplicas) @protobuf(4,varint,opt)
|
||||
|
||||
// unavailableReplicas is the total number of unavailable pods targeted by this deployment. This is the total number of
|
||||
// pods that are still required for the deployment to have 100% available capacity. They may
|
||||
// either be pods that are running but not yet available or pods that still have not been created.
|
||||
// +optional
|
||||
unavailableReplicas?: int32 @go(UnavailableReplicas) @protobuf(5,varint,opt)
|
||||
|
||||
// Conditions represent the latest available observations of a deployment's current state.
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
conditions?: [...#DeploymentCondition] @go(Conditions,[]DeploymentCondition) @protobuf(6,bytes,rep)
|
||||
|
||||
// collisionCount is the count of hash collisions for the Deployment. The Deployment controller uses this
|
||||
// field as a collision avoidance mechanism when it needs to create the name for the
|
||||
// newest ReplicaSet.
|
||||
// +optional
|
||||
collisionCount?: null | int32 @go(CollisionCount,*int32) @protobuf(8,varint,opt)
|
||||
}
|
||||
|
||||
#DeploymentConditionType: string // #enumDeploymentConditionType
|
||||
|
||||
#enumDeploymentConditionType:
|
||||
#DeploymentAvailable |
|
||||
#DeploymentProgressing |
|
||||
#DeploymentReplicaFailure
|
||||
|
||||
// Available means the deployment is available, ie. at least the minimum available
|
||||
// replicas required are up and running for at least minReadySeconds.
|
||||
#DeploymentAvailable: #DeploymentConditionType & "Available"
|
||||
|
||||
// Progressing means the deployment is progressing. Progress for a deployment is
|
||||
// considered when a new replica set is created or adopted, and when new pods scale
|
||||
// up or old pods scale down. Progress is not estimated for paused deployments or
|
||||
// when progressDeadlineSeconds is not specified.
|
||||
#DeploymentProgressing: #DeploymentConditionType & "Progressing"
|
||||
|
||||
// ReplicaFailure is added in a deployment when one of its pods fails to be created
|
||||
// or deleted.
|
||||
#DeploymentReplicaFailure: #DeploymentConditionType & "ReplicaFailure"
|
||||
|
||||
// DeploymentCondition describes the state of a deployment at a certain point.
|
||||
#DeploymentCondition: {
|
||||
// Type of deployment condition.
|
||||
type: #DeploymentConditionType @go(Type) @protobuf(1,bytes,opt,casttype=DeploymentConditionType)
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
status: v1.#ConditionStatus @go(Status) @protobuf(2,bytes,opt,casttype=k8s.io/api/core/v1.ConditionStatus)
|
||||
|
||||
// The last time this condition was updated.
|
||||
lastUpdateTime?: metav1.#Time @go(LastUpdateTime) @protobuf(6,bytes,opt)
|
||||
|
||||
// Last time the condition transitioned from one status to another.
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(7,bytes,opt)
|
||||
|
||||
// The reason for the condition's last transition.
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// A human readable message indicating details about the transition.
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// DeploymentList is a list of Deployments.
|
||||
#DeploymentList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Items is the list of Deployments.
|
||||
items: [...#Deployment] @go(Items,[]Deployment) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the
|
||||
// release notes for more information.
|
||||
// ControllerRevision implements an immutable snapshot of state data. Clients
|
||||
// are responsible for serializing and deserializing the objects that contain
|
||||
// their internal state.
|
||||
// Once a ControllerRevision has been successfully created, it can not be updated.
|
||||
// The API Server will fail validation of all requests that attempt to mutate
|
||||
// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
|
||||
// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
|
||||
// it may be subject to name and representation changes in future releases, and clients should not
|
||||
// depend on its stability. It is primarily for internal use by controllers.
|
||||
#ControllerRevision: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// data is the serialized representation of the state.
|
||||
data?: runtime.#RawExtension @go(Data) @protobuf(2,bytes,opt)
|
||||
|
||||
// revision indicates the revision of the state represented by Data.
|
||||
revision: int64 @go(Revision) @protobuf(3,varint,opt)
|
||||
}
|
||||
|
||||
// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
|
||||
#ControllerRevisionList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Items is the list of ControllerRevisions
|
||||
items: [...#ControllerRevision] @go(Items,[]ControllerRevision) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/apps/v1beta2
|
||||
|
||||
package v1beta2
|
||||
|
||||
#GroupName: "apps"
|
||||
@@ -0,0 +1,984 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/apps/v1beta2
|
||||
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
#ControllerRevisionHashLabelKey: "controller-revision-hash"
|
||||
#StatefulSetRevisionLabel: "controller-revision-hash"
|
||||
#DeprecatedRollbackTo: "deprecated.deployment.rollback.to"
|
||||
#DeprecatedTemplateGeneration: "deprecated.daemonset.template.generation"
|
||||
#StatefulSetPodNameLabel: "statefulset.kubernetes.io/pod-name"
|
||||
|
||||
// ScaleSpec describes the attributes of a scale subresource
|
||||
#ScaleSpec: {
|
||||
// desired number of instances for the scaled object.
|
||||
// +optional
|
||||
replicas?: int32 @go(Replicas) @protobuf(1,varint,opt)
|
||||
}
|
||||
|
||||
// ScaleStatus represents the current status of a scale subresource.
|
||||
#ScaleStatus: {
|
||||
// actual number of observed instances of the scaled object.
|
||||
replicas: int32 @go(Replicas) @protobuf(1,varint,opt)
|
||||
|
||||
// selector is a label query over pods that should match the replicas count. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
// +optional
|
||||
// +mapType=atomic
|
||||
selector?: {[string]: string} @go(Selector,map[string]string) @protobuf(2,bytes,rep)
|
||||
|
||||
// label selector for pods that should match the replicas count. This is a serializated
|
||||
// version of both map-based and more expressive set-based selectors. This is done to
|
||||
// avoid introspection in the clients. The string will be in the same format as the
|
||||
// query-param syntax. If the target type only supports map-based selectors, both this
|
||||
// field and map-based selector field are populated.
|
||||
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
|
||||
// +optional
|
||||
targetSelector?: string @go(TargetSelector) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// Scale represents a scaling request for a resource.
|
||||
#Scale: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||
// +optional
|
||||
spec?: #ScaleSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
|
||||
// +optional
|
||||
status?: #ScaleStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for
|
||||
// more information.
|
||||
// StatefulSet represents a set of pods with consistent identities.
|
||||
// Identities are defined as:
|
||||
// - Network: A single stable DNS and hostname.
|
||||
// - Storage: As many VolumeClaims as requested.
|
||||
//
|
||||
// The StatefulSet guarantees that a given network identity will always
|
||||
// map to the same storage identity.
|
||||
#StatefulSet: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec defines the desired identities of pods in this set.
|
||||
// +optional
|
||||
spec?: #StatefulSetSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is the current status of Pods in this StatefulSet. This data
|
||||
// may be out of date by some window of time.
|
||||
// +optional
|
||||
status?: #StatefulSetStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// PodManagementPolicyType defines the policy for creating pods under a stateful set.
|
||||
#PodManagementPolicyType: string // #enumPodManagementPolicyType
|
||||
|
||||
#enumPodManagementPolicyType:
|
||||
#OrderedReadyPodManagement |
|
||||
#ParallelPodManagement
|
||||
|
||||
// OrderedReadyPodManagement will create pods in strictly increasing order on
|
||||
// scale up and strictly decreasing order on scale down, progressing only when
|
||||
// the previous pod is ready or terminated. At most one pod will be changed
|
||||
// at any time.
|
||||
#OrderedReadyPodManagement: #PodManagementPolicyType & "OrderedReady"
|
||||
|
||||
// ParallelPodManagement will create and delete pods as soon as the stateful set
|
||||
// replica count is changed, and will not wait for pods to be ready or complete
|
||||
// termination.
|
||||
#ParallelPodManagement: #PodManagementPolicyType & "Parallel"
|
||||
|
||||
// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
|
||||
// controller will use to perform updates. It includes any additional parameters
|
||||
// necessary to perform the update for the indicated strategy.
|
||||
#StatefulSetUpdateStrategy: {
|
||||
// Type indicates the type of the StatefulSetUpdateStrategy.
|
||||
// Default is RollingUpdate.
|
||||
// +optional
|
||||
type?: #StatefulSetUpdateStrategyType @go(Type) @protobuf(1,bytes,opt,casttype=StatefulSetStrategyType)
|
||||
|
||||
// RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
|
||||
// +optional
|
||||
rollingUpdate?: null | #RollingUpdateStatefulSetStrategy @go(RollingUpdate,*RollingUpdateStatefulSetStrategy) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// StatefulSetUpdateStrategyType is a string enumeration type that enumerates
|
||||
// all possible update strategies for the StatefulSet controller.
|
||||
#StatefulSetUpdateStrategyType: string // #enumStatefulSetUpdateStrategyType
|
||||
|
||||
#enumStatefulSetUpdateStrategyType:
|
||||
#RollingUpdateStatefulSetStrategyType |
|
||||
#OnDeleteStatefulSetStrategyType
|
||||
|
||||
// RollingUpdateStatefulSetStrategyType indicates that update will be
|
||||
// applied to all Pods in the StatefulSet with respect to the StatefulSet
|
||||
// ordering constraints. When a scale operation is performed with this
|
||||
// strategy, new Pods will be created from the specification version indicated
|
||||
// by the StatefulSet's updateRevision.
|
||||
#RollingUpdateStatefulSetStrategyType: #StatefulSetUpdateStrategyType & "RollingUpdate"
|
||||
|
||||
// OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version
|
||||
// tracking and ordered rolling restarts are disabled. Pods are recreated
|
||||
// from the StatefulSetSpec when they are manually deleted. When a scale
|
||||
// operation is performed with this strategy,specification version indicated
|
||||
// by the StatefulSet's currentRevision.
|
||||
#OnDeleteStatefulSetStrategyType: #StatefulSetUpdateStrategyType & "OnDelete"
|
||||
|
||||
// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
|
||||
#RollingUpdateStatefulSetStrategy: {
|
||||
// Partition indicates the ordinal at which the StatefulSet should be partitioned
|
||||
// for updates. During a rolling update, all pods from ordinal Replicas-1 to
|
||||
// Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched.
|
||||
// This is helpful in being able to do a canary based deployment. The default value is 0.
|
||||
// +optional
|
||||
partition?: null | int32 @go(Partition,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// The maximum number of pods that can be unavailable during the update.
|
||||
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
|
||||
// Absolute number is calculated from percentage by rounding up. This can not be 0.
|
||||
// Defaults to 1. This field is alpha-level and is only honored by servers that enable the
|
||||
// MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to
|
||||
// Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it
|
||||
// will be counted towards MaxUnavailable.
|
||||
// +optional
|
||||
maxUnavailable?: null | intstr.#IntOrString @go(MaxUnavailable,*intstr.IntOrString) @protobuf(2,varint,opt)
|
||||
}
|
||||
|
||||
// PersistentVolumeClaimRetentionPolicyType is a string enumeration of the policies that will determine
|
||||
// when volumes from the VolumeClaimTemplates will be deleted when the controlling StatefulSet is
|
||||
// deleted or scaled down.
|
||||
#PersistentVolumeClaimRetentionPolicyType: string // #enumPersistentVolumeClaimRetentionPolicyType
|
||||
|
||||
#enumPersistentVolumeClaimRetentionPolicyType:
|
||||
#RetainPersistentVolumeClaimRetentionPolicyType |
|
||||
#RetentionPersistentVolumeClaimRetentionPolicyType
|
||||
|
||||
// RetainPersistentVolumeClaimRetentionPolicyType is the default
|
||||
// PersistentVolumeClaimRetentionPolicy and specifies that
|
||||
// PersistentVolumeClaims associated with StatefulSet VolumeClaimTemplates
|
||||
// will not be deleted.
|
||||
#RetainPersistentVolumeClaimRetentionPolicyType: #PersistentVolumeClaimRetentionPolicyType & "Retain"
|
||||
|
||||
// RetentionPersistentVolumeClaimRetentionPolicyType specifies that
|
||||
// PersistentVolumeClaims associated with StatefulSet VolumeClaimTemplates
|
||||
// will be deleted in the scenario specified in
|
||||
// StatefulSetPersistentVolumeClaimRetentionPolicy.
|
||||
#RetentionPersistentVolumeClaimRetentionPolicyType: #PersistentVolumeClaimRetentionPolicyType & "Delete"
|
||||
|
||||
// StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs
|
||||
// created from the StatefulSet VolumeClaimTemplates.
|
||||
#StatefulSetPersistentVolumeClaimRetentionPolicy: {
|
||||
// WhenDeleted specifies what happens to PVCs created from StatefulSet
|
||||
// VolumeClaimTemplates when the StatefulSet is deleted. The default policy
|
||||
// of `Retain` causes PVCs to not be affected by StatefulSet deletion. The
|
||||
// `Delete` policy causes those PVCs to be deleted.
|
||||
whenDeleted?: #PersistentVolumeClaimRetentionPolicyType @go(WhenDeleted) @protobuf(1,bytes,opt,casttype=PersistentVolumeClaimRetentionPolicyType)
|
||||
|
||||
// WhenScaled specifies what happens to PVCs created from StatefulSet
|
||||
// VolumeClaimTemplates when the StatefulSet is scaled down. The default
|
||||
// policy of `Retain` causes PVCs to not be affected by a scaledown. The
|
||||
// `Delete` policy causes the associated PVCs for any excess pods above
|
||||
// the replica count to be deleted.
|
||||
whenScaled?: #PersistentVolumeClaimRetentionPolicyType @go(WhenScaled) @protobuf(2,bytes,opt,casttype=PersistentVolumeClaimRetentionPolicyType)
|
||||
}
|
||||
|
||||
// StatefulSetOrdinals describes the policy used for replica ordinal assignment
|
||||
// in this StatefulSet.
|
||||
#StatefulSetOrdinals: {
|
||||
// start is the number representing the first replica's index. It may be used
|
||||
// to number replicas from an alternate index (eg: 1-indexed) over the default
|
||||
// 0-indexed names, or to orchestrate progressive movement of replicas from
|
||||
// one StatefulSet to another.
|
||||
// If set, replica indices will be in the range:
|
||||
// [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas).
|
||||
// If unset, defaults to 0. Replica indices will be in the range:
|
||||
// [0, .spec.replicas).
|
||||
// +optional
|
||||
start?: int32 @go(Start) @protobuf(1,varint,opt)
|
||||
}
|
||||
|
||||
// A StatefulSetSpec is the specification of a StatefulSet.
|
||||
#StatefulSetSpec: {
|
||||
// replicas is the desired number of replicas of the given Template.
|
||||
// These are replicas in the sense that they are instantiations of the
|
||||
// same Template, but individual replicas also have a consistent identity.
|
||||
// If unspecified, defaults to 1.
|
||||
// TODO: Consider a rename of this field.
|
||||
// +optional
|
||||
replicas?: null | int32 @go(Replicas,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// selector is a label query over pods that should match the replica count.
|
||||
// It must match the pod template's labels.
|
||||
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(2,bytes,opt)
|
||||
|
||||
// template is the object that describes the pod that will be created if
|
||||
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
|
||||
// will fulfill this Template, but have a unique identity from the rest
|
||||
// of the StatefulSet. Each pod will be named with the format
|
||||
// <statefulsetname>-<podindex>. For example, a pod in a StatefulSet named
|
||||
// "web" with index number "3" would be named "web-3".
|
||||
// The only allowed template.spec.restartPolicy value is "Always".
|
||||
template: v1.#PodTemplateSpec @go(Template) @protobuf(3,bytes,opt)
|
||||
|
||||
// volumeClaimTemplates is a list of claims that pods are allowed to reference.
|
||||
// The StatefulSet controller is responsible for mapping network identities to
|
||||
// claims in a way that maintains the identity of a pod. Every claim in
|
||||
// this list must have at least one matching (by name) volumeMount in one
|
||||
// container in the template. A claim in this list takes precedence over
|
||||
// any volumes in the template, with the same name.
|
||||
// TODO: Define the behavior if a claim already exists with the same name.
|
||||
// +optional
|
||||
volumeClaimTemplates?: [...v1.#PersistentVolumeClaim] @go(VolumeClaimTemplates,[]v1.PersistentVolumeClaim) @protobuf(4,bytes,rep)
|
||||
|
||||
// serviceName is the name of the service that governs this StatefulSet.
|
||||
// This service must exist before the StatefulSet, and is responsible for
|
||||
// the network identity of the set. Pods get DNS/hostnames that follow the
|
||||
// pattern: pod-specific-string.serviceName.default.svc.cluster.local
|
||||
// where "pod-specific-string" is managed by the StatefulSet controller.
|
||||
serviceName: string @go(ServiceName) @protobuf(5,bytes,opt)
|
||||
|
||||
// podManagementPolicy controls how pods are created during initial scale up,
|
||||
// when replacing pods on nodes, or when scaling down. The default policy is
|
||||
// `OrderedReady`, where pods are created in increasing order (pod-0, then
|
||||
// pod-1, etc) and the controller will wait until each pod is ready before
|
||||
// continuing. When scaling down, the pods are removed in the opposite order.
|
||||
// The alternative policy is `Parallel` which will create pods in parallel
|
||||
// to match the desired scale without waiting, and on scale down will delete
|
||||
// all pods at once.
|
||||
// +optional
|
||||
podManagementPolicy?: #PodManagementPolicyType @go(PodManagementPolicy) @protobuf(6,bytes,opt,casttype=PodManagementPolicyType)
|
||||
|
||||
// updateStrategy indicates the StatefulSetUpdateStrategy that will be
|
||||
// employed to update Pods in the StatefulSet when a revision is made to
|
||||
// Template.
|
||||
updateStrategy?: #StatefulSetUpdateStrategy @go(UpdateStrategy) @protobuf(7,bytes,opt)
|
||||
|
||||
// revisionHistoryLimit is the maximum number of revisions that will
|
||||
// be maintained in the StatefulSet's revision history. The revision history
|
||||
// consists of all revisions not represented by a currently applied
|
||||
// StatefulSetSpec version. The default value is 10.
|
||||
revisionHistoryLimit?: null | int32 @go(RevisionHistoryLimit,*int32) @protobuf(8,varint,opt)
|
||||
|
||||
// Minimum number of seconds for which a newly created pod should be ready
|
||||
// without any of its container crashing for it to be considered available.
|
||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||
// +optional
|
||||
minReadySeconds?: int32 @go(MinReadySeconds) @protobuf(9,varint,opt)
|
||||
|
||||
// PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from
|
||||
// the StatefulSet VolumeClaimTemplates. This requires the
|
||||
// StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha.
|
||||
// +optional
|
||||
persistentVolumeClaimRetentionPolicy?: null | #StatefulSetPersistentVolumeClaimRetentionPolicy @go(PersistentVolumeClaimRetentionPolicy,*StatefulSetPersistentVolumeClaimRetentionPolicy) @protobuf(10,bytes,opt)
|
||||
|
||||
// ordinals controls the numbering of replica indices in a StatefulSet. The
|
||||
// default ordinals behavior assigns a "0" index to the first replica and
|
||||
// increments the index by one for each additional replica requested. Using
|
||||
// the ordinals field requires the StatefulSetStartOrdinal feature gate to be
|
||||
// enabled, which is beta.
|
||||
// +optional
|
||||
ordinals?: null | #StatefulSetOrdinals @go(Ordinals,*StatefulSetOrdinals) @protobuf(11,bytes,opt)
|
||||
}
|
||||
|
||||
// StatefulSetStatus represents the current state of a StatefulSet.
|
||||
#StatefulSetStatus: {
|
||||
// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
|
||||
// StatefulSet's generation, which is updated on mutation by the API Server.
|
||||
// +optional
|
||||
observedGeneration?: int64 @go(ObservedGeneration) @protobuf(1,varint,opt)
|
||||
|
||||
// replicas is the number of Pods created by the StatefulSet controller.
|
||||
replicas: int32 @go(Replicas) @protobuf(2,varint,opt)
|
||||
|
||||
// readyReplicas is the number of pods created by this StatefulSet controller with a Ready Condition.
|
||||
readyReplicas?: int32 @go(ReadyReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
|
||||
// indicated by currentRevision.
|
||||
currentReplicas?: int32 @go(CurrentReplicas) @protobuf(4,varint,opt)
|
||||
|
||||
// updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version
|
||||
// indicated by updateRevision.
|
||||
updatedReplicas?: int32 @go(UpdatedReplicas) @protobuf(5,varint,opt)
|
||||
|
||||
// currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
|
||||
// sequence [0,currentReplicas).
|
||||
currentRevision?: string @go(CurrentRevision) @protobuf(6,bytes,opt)
|
||||
|
||||
// updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence
|
||||
// [replicas-updatedReplicas,replicas)
|
||||
updateRevision?: string @go(UpdateRevision) @protobuf(7,bytes,opt)
|
||||
|
||||
// collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller
|
||||
// uses this field as a collision avoidance mechanism when it needs to create the name for the
|
||||
// newest ControllerRevision.
|
||||
// +optional
|
||||
collisionCount?: null | int32 @go(CollisionCount,*int32) @protobuf(9,varint,opt)
|
||||
|
||||
// Represents the latest available observations of a statefulset's current state.
|
||||
// +optional
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
conditions?: [...#StatefulSetCondition] @go(Conditions,[]StatefulSetCondition) @protobuf(10,bytes,rep)
|
||||
|
||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet.
|
||||
// +optional
|
||||
availableReplicas?: int32 @go(AvailableReplicas) @protobuf(11,varint,opt)
|
||||
}
|
||||
|
||||
#StatefulSetConditionType: string
|
||||
|
||||
// StatefulSetCondition describes the state of a statefulset at a certain point.
|
||||
#StatefulSetCondition: {
|
||||
// Type of statefulset condition.
|
||||
type: #StatefulSetConditionType @go(Type) @protobuf(1,bytes,opt,casttype=StatefulSetConditionType)
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
status: v1.#ConditionStatus @go(Status) @protobuf(2,bytes,opt,casttype=k8s.io/api/core/v1.ConditionStatus)
|
||||
|
||||
// Last time the condition transitioned from one status to another.
|
||||
// +optional
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// The reason for the condition's last transition.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// A human readable message indicating details about the transition.
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// StatefulSetList is a collection of StatefulSets.
|
||||
#StatefulSetList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
items: [...#StatefulSet] @go(Items,[]StatefulSet) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for
|
||||
// more information.
|
||||
// Deployment enables declarative updates for Pods and ReplicaSets.
|
||||
#Deployment: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Specification of the desired behavior of the Deployment.
|
||||
// +optional
|
||||
spec?: #DeploymentSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Most recently observed status of the Deployment.
|
||||
// +optional
|
||||
status?: #DeploymentStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// DeploymentSpec is the specification of the desired behavior of the Deployment.
|
||||
#DeploymentSpec: {
|
||||
// Number of desired pods. This is a pointer to distinguish between explicit
|
||||
// zero and not specified. Defaults to 1.
|
||||
// +optional
|
||||
replicas?: null | int32 @go(Replicas,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// Label selector for pods. Existing ReplicaSets whose pods are
|
||||
// selected by this will be the ones affected by this deployment.
|
||||
// It must match the pod template's labels.
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(2,bytes,opt)
|
||||
|
||||
// Template describes the pods that will be created.
|
||||
// The only allowed template.spec.restartPolicy value is "Always".
|
||||
template: v1.#PodTemplateSpec @go(Template) @protobuf(3,bytes,opt)
|
||||
|
||||
// The deployment strategy to use to replace existing pods with new ones.
|
||||
// +optional
|
||||
// +patchStrategy=retainKeys
|
||||
strategy?: #DeploymentStrategy @go(Strategy) @protobuf(4,bytes,opt)
|
||||
|
||||
// Minimum number of seconds for which a newly created pod should be ready
|
||||
// without any of its container crashing, for it to be considered available.
|
||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||
// +optional
|
||||
minReadySeconds?: int32 @go(MinReadySeconds) @protobuf(5,varint,opt)
|
||||
|
||||
// The number of old ReplicaSets to retain to allow rollback.
|
||||
// This is a pointer to distinguish between explicit zero and not specified.
|
||||
// Defaults to 10.
|
||||
// +optional
|
||||
revisionHistoryLimit?: null | int32 @go(RevisionHistoryLimit,*int32) @protobuf(6,varint,opt)
|
||||
|
||||
// Indicates that the deployment is paused.
|
||||
// +optional
|
||||
paused?: bool @go(Paused) @protobuf(7,varint,opt)
|
||||
|
||||
// The maximum time in seconds for a deployment to make progress before it
|
||||
// is considered to be failed. The deployment controller will continue to
|
||||
// process failed deployments and a condition with a ProgressDeadlineExceeded
|
||||
// reason will be surfaced in the deployment status. Note that progress will
|
||||
// not be estimated during the time a deployment is paused. Defaults to 600s.
|
||||
progressDeadlineSeconds?: null | int32 @go(ProgressDeadlineSeconds,*int32) @protobuf(9,varint,opt)
|
||||
}
|
||||
|
||||
// DefaultDeploymentUniqueLabelKey is the default key of the selector that is added
|
||||
// to existing ReplicaSets (and label key that is added to its pods) to prevent the existing ReplicaSets
|
||||
// to select new pods (and old pods being select by new ReplicaSet).
|
||||
#DefaultDeploymentUniqueLabelKey: "pod-template-hash"
|
||||
|
||||
// DeploymentStrategy describes how to replace existing pods with new ones.
|
||||
#DeploymentStrategy: {
|
||||
// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
|
||||
// +optional
|
||||
type?: #DeploymentStrategyType @go(Type) @protobuf(1,bytes,opt,casttype=DeploymentStrategyType)
|
||||
|
||||
// Rolling update config params. Present only if DeploymentStrategyType =
|
||||
// RollingUpdate.
|
||||
//---
|
||||
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
||||
// to be.
|
||||
// +optional
|
||||
rollingUpdate?: null | #RollingUpdateDeployment @go(RollingUpdate,*RollingUpdateDeployment) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
#DeploymentStrategyType: string // #enumDeploymentStrategyType
|
||||
|
||||
#enumDeploymentStrategyType:
|
||||
#RecreateDeploymentStrategyType |
|
||||
#RollingUpdateDeploymentStrategyType
|
||||
|
||||
// Kill all existing pods before creating new ones.
|
||||
#RecreateDeploymentStrategyType: #DeploymentStrategyType & "Recreate"
|
||||
|
||||
// Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one.
|
||||
#RollingUpdateDeploymentStrategyType: #DeploymentStrategyType & "RollingUpdate"
|
||||
|
||||
// Spec to control the desired behavior of rolling update.
|
||||
#RollingUpdateDeployment: {
|
||||
// The maximum number of pods that can be unavailable during the update.
|
||||
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
|
||||
// Absolute number is calculated from percentage by rounding down.
|
||||
// This can not be 0 if MaxSurge is 0.
|
||||
// Defaults to 25%.
|
||||
// Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
|
||||
// immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
|
||||
// can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
|
||||
// that the total number of pods available at all times during the update is at
|
||||
// least 70% of desired pods.
|
||||
// +optional
|
||||
maxUnavailable?: null | intstr.#IntOrString @go(MaxUnavailable,*intstr.IntOrString) @protobuf(1,bytes,opt)
|
||||
|
||||
// The maximum number of pods that can be scheduled above the desired number of
|
||||
// pods.
|
||||
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
|
||||
// This can not be 0 if MaxUnavailable is 0.
|
||||
// Absolute number is calculated from percentage by rounding up.
|
||||
// Defaults to 25%.
|
||||
// Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
|
||||
// the rolling update starts, such that the total number of old and new pods do not exceed
|
||||
// 130% of desired pods. Once old pods have been killed,
|
||||
// new ReplicaSet can be scaled up further, ensuring that total number of pods running
|
||||
// at any time during the update is at most 130% of desired pods.
|
||||
// +optional
|
||||
maxSurge?: null | intstr.#IntOrString @go(MaxSurge,*intstr.IntOrString) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// DeploymentStatus is the most recently observed status of the Deployment.
|
||||
#DeploymentStatus: {
|
||||
// The generation observed by the deployment controller.
|
||||
// +optional
|
||||
observedGeneration?: int64 @go(ObservedGeneration) @protobuf(1,varint,opt)
|
||||
|
||||
// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
|
||||
// +optional
|
||||
replicas?: int32 @go(Replicas) @protobuf(2,varint,opt)
|
||||
|
||||
// Total number of non-terminated pods targeted by this deployment that have the desired template spec.
|
||||
// +optional
|
||||
updatedReplicas?: int32 @go(UpdatedReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// readyReplicas is the number of pods targeted by this Deployment controller with a Ready Condition.
|
||||
// +optional
|
||||
readyReplicas?: int32 @go(ReadyReplicas) @protobuf(7,varint,opt)
|
||||
|
||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
|
||||
// +optional
|
||||
availableReplicas?: int32 @go(AvailableReplicas) @protobuf(4,varint,opt)
|
||||
|
||||
// Total number of unavailable pods targeted by this deployment. This is the total number of
|
||||
// pods that are still required for the deployment to have 100% available capacity. They may
|
||||
// either be pods that are running but not yet available or pods that still have not been created.
|
||||
// +optional
|
||||
unavailableReplicas?: int32 @go(UnavailableReplicas) @protobuf(5,varint,opt)
|
||||
|
||||
// Represents the latest available observations of a deployment's current state.
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
conditions?: [...#DeploymentCondition] @go(Conditions,[]DeploymentCondition) @protobuf(6,bytes,rep)
|
||||
|
||||
// Count of hash collisions for the Deployment. The Deployment controller uses this
|
||||
// field as a collision avoidance mechanism when it needs to create the name for the
|
||||
// newest ReplicaSet.
|
||||
// +optional
|
||||
collisionCount?: null | int32 @go(CollisionCount,*int32) @protobuf(8,varint,opt)
|
||||
}
|
||||
|
||||
#DeploymentConditionType: string // #enumDeploymentConditionType
|
||||
|
||||
#enumDeploymentConditionType:
|
||||
#DeploymentAvailable |
|
||||
#DeploymentProgressing |
|
||||
#DeploymentReplicaFailure
|
||||
|
||||
// Available means the deployment is available, ie. at least the minimum available
|
||||
// replicas required are up and running for at least minReadySeconds.
|
||||
#DeploymentAvailable: #DeploymentConditionType & "Available"
|
||||
|
||||
// Progressing means the deployment is progressing. Progress for a deployment is
|
||||
// considered when a new replica set is created or adopted, and when new pods scale
|
||||
// up or old pods scale down. Progress is not estimated for paused deployments or
|
||||
// when progressDeadlineSeconds is not specified.
|
||||
#DeploymentProgressing: #DeploymentConditionType & "Progressing"
|
||||
|
||||
// ReplicaFailure is added in a deployment when one of its pods fails to be created
|
||||
// or deleted.
|
||||
#DeploymentReplicaFailure: #DeploymentConditionType & "ReplicaFailure"
|
||||
|
||||
// DeploymentCondition describes the state of a deployment at a certain point.
|
||||
#DeploymentCondition: {
|
||||
// Type of deployment condition.
|
||||
type: #DeploymentConditionType @go(Type) @protobuf(1,bytes,opt,casttype=DeploymentConditionType)
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
status: v1.#ConditionStatus @go(Status) @protobuf(2,bytes,opt,casttype=k8s.io/api/core/v1.ConditionStatus)
|
||||
|
||||
// The last time this condition was updated.
|
||||
lastUpdateTime?: metav1.#Time @go(LastUpdateTime) @protobuf(6,bytes,opt)
|
||||
|
||||
// Last time the condition transitioned from one status to another.
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(7,bytes,opt)
|
||||
|
||||
// The reason for the condition's last transition.
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// A human readable message indicating details about the transition.
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// DeploymentList is a list of Deployments.
|
||||
#DeploymentList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Items is the list of Deployments.
|
||||
items: [...#Deployment] @go(Items,[]Deployment) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
|
||||
#DaemonSetUpdateStrategy: {
|
||||
// Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
|
||||
// +optional
|
||||
type?: #DaemonSetUpdateStrategyType @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// Rolling update config params. Present only if type = "RollingUpdate".
|
||||
//---
|
||||
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
||||
// to be. Same as Deployment `strategy.rollingUpdate`.
|
||||
// See https://github.com/kubernetes/kubernetes/issues/35345
|
||||
// +optional
|
||||
rollingUpdate?: null | #RollingUpdateDaemonSet @go(RollingUpdate,*RollingUpdateDaemonSet) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
#DaemonSetUpdateStrategyType: string // #enumDaemonSetUpdateStrategyType
|
||||
|
||||
#enumDaemonSetUpdateStrategyType:
|
||||
#RollingUpdateDaemonSetStrategyType |
|
||||
#OnDeleteDaemonSetStrategyType
|
||||
|
||||
// Replace the old daemons by new ones using rolling update i.e replace them on each node one after the other.
|
||||
#RollingUpdateDaemonSetStrategyType: #DaemonSetUpdateStrategyType & "RollingUpdate"
|
||||
|
||||
// Replace the old daemons only when it's killed
|
||||
#OnDeleteDaemonSetStrategyType: #DaemonSetUpdateStrategyType & "OnDelete"
|
||||
|
||||
// Spec to control the desired behavior of daemon set rolling update.
|
||||
#RollingUpdateDaemonSet: {
|
||||
// The maximum number of DaemonSet pods that can be unavailable during the
|
||||
// update. Value can be an absolute number (ex: 5) or a percentage of total
|
||||
// number of DaemonSet pods at the start of the update (ex: 10%). Absolute
|
||||
// number is calculated from percentage by rounding up.
|
||||
// This cannot be 0 if MaxSurge is 0
|
||||
// Default value is 1.
|
||||
// Example: when this is set to 30%, at most 30% of the total number of nodes
|
||||
// that should be running the daemon pod (i.e. status.desiredNumberScheduled)
|
||||
// can have their pods stopped for an update at any given time. The update
|
||||
// starts by stopping at most 30% of those DaemonSet pods and then brings
|
||||
// up new DaemonSet pods in their place. Once the new pods are available,
|
||||
// it then proceeds onto other DaemonSet pods, thus ensuring that at least
|
||||
// 70% of original number of DaemonSet pods are available at all times during
|
||||
// the update.
|
||||
// +optional
|
||||
maxUnavailable?: null | intstr.#IntOrString @go(MaxUnavailable,*intstr.IntOrString) @protobuf(1,bytes,opt)
|
||||
|
||||
// The maximum number of nodes with an existing available DaemonSet pod that
|
||||
// can have an updated DaemonSet pod during during an update.
|
||||
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
|
||||
// This can not be 0 if MaxUnavailable is 0.
|
||||
// Absolute number is calculated from percentage by rounding up to a minimum of 1.
|
||||
// Default value is 0.
|
||||
// Example: when this is set to 30%, at most 30% of the total number of nodes
|
||||
// that should be running the daemon pod (i.e. status.desiredNumberScheduled)
|
||||
// can have their a new pod created before the old pod is marked as deleted.
|
||||
// The update starts by launching new pods on 30% of nodes. Once an updated
|
||||
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
|
||||
// on that node is marked deleted. If the old pod becomes unavailable for any
|
||||
// reason (Ready transitions to false, is evicted, or is drained) an updated
|
||||
// pod is immediatedly created on that node without considering surge limits.
|
||||
// Allowing surge implies the possibility that the resources consumed by the
|
||||
// daemonset on any given node can double if the readiness check fails, and
|
||||
// so resource intensive daemonsets should take into account that they may
|
||||
// cause evictions during disruption.
|
||||
// +optional
|
||||
maxSurge?: null | intstr.#IntOrString @go(MaxSurge,*intstr.IntOrString) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// DaemonSetSpec is the specification of a daemon set.
|
||||
#DaemonSetSpec: {
|
||||
// A label query over pods that are managed by the daemon set.
|
||||
// Must match in order to be controlled.
|
||||
// It must match the pod template's labels.
|
||||
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(1,bytes,opt)
|
||||
|
||||
// An object that describes the pod that will be created.
|
||||
// The DaemonSet will create exactly one copy of this pod on every node
|
||||
// that matches the template's node selector (or on every node if no node
|
||||
// selector is specified).
|
||||
// The only allowed template.spec.restartPolicy value is "Always".
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
|
||||
template: v1.#PodTemplateSpec @go(Template) @protobuf(2,bytes,opt)
|
||||
|
||||
// An update strategy to replace existing DaemonSet pods with new pods.
|
||||
// +optional
|
||||
updateStrategy?: #DaemonSetUpdateStrategy @go(UpdateStrategy) @protobuf(3,bytes,opt)
|
||||
|
||||
// The minimum number of seconds for which a newly created DaemonSet pod should
|
||||
// be ready without any of its container crashing, for it to be considered
|
||||
// available. Defaults to 0 (pod will be considered available as soon as it
|
||||
// is ready).
|
||||
// +optional
|
||||
minReadySeconds?: int32 @go(MinReadySeconds) @protobuf(4,varint,opt)
|
||||
|
||||
// The number of old history to retain to allow rollback.
|
||||
// This is a pointer to distinguish between explicit zero and not specified.
|
||||
// Defaults to 10.
|
||||
// +optional
|
||||
revisionHistoryLimit?: null | int32 @go(RevisionHistoryLimit,*int32) @protobuf(6,varint,opt)
|
||||
}
|
||||
|
||||
// DaemonSetStatus represents the current status of a daemon set.
|
||||
#DaemonSetStatus: {
|
||||
// The number of nodes that are running at least 1
|
||||
// daemon pod and are supposed to run the daemon pod.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
|
||||
currentNumberScheduled: int32 @go(CurrentNumberScheduled) @protobuf(1,varint,opt)
|
||||
|
||||
// The number of nodes that are running the daemon pod, but are
|
||||
// not supposed to run the daemon pod.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
|
||||
numberMisscheduled: int32 @go(NumberMisscheduled) @protobuf(2,varint,opt)
|
||||
|
||||
// The total number of nodes that should be running the daemon
|
||||
// pod (including nodes correctly running the daemon pod).
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
|
||||
desiredNumberScheduled: int32 @go(DesiredNumberScheduled) @protobuf(3,varint,opt)
|
||||
|
||||
// Total number of nodes that should be running the daemon pod and have one
|
||||
// or more of the daemon pod running with a Ready Condition by passing the readinessProbe.
|
||||
numberReady: int32 @go(NumberReady) @protobuf(4,varint,opt)
|
||||
|
||||
// The most recent generation observed by the daemon set controller.
|
||||
// +optional
|
||||
observedGeneration?: int64 @go(ObservedGeneration) @protobuf(5,varint,opt)
|
||||
|
||||
// The total number of nodes that are running updated daemon pod
|
||||
// +optional
|
||||
updatedNumberScheduled?: int32 @go(UpdatedNumberScheduled) @protobuf(6,varint,opt)
|
||||
|
||||
// The number of nodes that should be running the
|
||||
// daemon pod and have one or more of the daemon pod running and
|
||||
// available (ready for at least spec.minReadySeconds)
|
||||
// +optional
|
||||
numberAvailable?: int32 @go(NumberAvailable) @protobuf(7,varint,opt)
|
||||
|
||||
// The number of nodes that should be running the
|
||||
// daemon pod and have none of the daemon pod running and available
|
||||
// (ready for at least spec.minReadySeconds)
|
||||
// +optional
|
||||
numberUnavailable?: int32 @go(NumberUnavailable) @protobuf(8,varint,opt)
|
||||
|
||||
// Count of hash collisions for the DaemonSet. The DaemonSet controller
|
||||
// uses this field as a collision avoidance mechanism when it needs to
|
||||
// create the name for the newest ControllerRevision.
|
||||
// +optional
|
||||
collisionCount?: null | int32 @go(CollisionCount,*int32) @protobuf(9,varint,opt)
|
||||
|
||||
// Represents the latest available observations of a DaemonSet's current state.
|
||||
// +optional
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
conditions?: [...#DaemonSetCondition] @go(Conditions,[]DaemonSetCondition) @protobuf(10,bytes,rep)
|
||||
}
|
||||
|
||||
#DaemonSetConditionType: string
|
||||
|
||||
// DaemonSetCondition describes the state of a DaemonSet at a certain point.
|
||||
#DaemonSetCondition: {
|
||||
// Type of DaemonSet condition.
|
||||
type: #DaemonSetConditionType @go(Type) @protobuf(1,bytes,opt,casttype=DaemonSetConditionType)
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
status: v1.#ConditionStatus @go(Status) @protobuf(2,bytes,opt,casttype=k8s.io/api/core/v1.ConditionStatus)
|
||||
|
||||
// Last time the condition transitioned from one status to another.
|
||||
// +optional
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// The reason for the condition's last transition.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// A human readable message indicating details about the transition.
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for
|
||||
// more information.
|
||||
// DaemonSet represents the configuration of a daemon set.
|
||||
#DaemonSet: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// The desired behavior of this daemon set.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #DaemonSetSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// The current status of this daemon set. This data may be
|
||||
// out of date by some window of time.
|
||||
// Populated by the system.
|
||||
// Read-only.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
status?: #DaemonSetStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// DefaultDaemonSetUniqueLabelKey is the default label key that is added
|
||||
// to existing DaemonSet pods to distinguish between old and new
|
||||
// DaemonSet pods during DaemonSet template updates.
|
||||
#DefaultDaemonSetUniqueLabelKey: "controller-revision-hash"
|
||||
|
||||
// DaemonSetList is a collection of daemon sets.
|
||||
#DaemonSetList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// A list of daemon sets.
|
||||
items: [...#DaemonSet] @go(Items,[]DaemonSet) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for
|
||||
// more information.
|
||||
// ReplicaSet ensures that a specified number of pod replicas are running at any given time.
|
||||
#ReplicaSet: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// If the Labels of a ReplicaSet are empty, they are defaulted to
|
||||
// be the same as the Pod(s) that the ReplicaSet manages.
|
||||
// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec defines the specification of the desired behavior of the ReplicaSet.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #ReplicaSetSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is the most recently observed status of the ReplicaSet.
|
||||
// This data may be out of date by some window of time.
|
||||
// Populated by the system.
|
||||
// Read-only.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
status?: #ReplicaSetStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ReplicaSetList is a collection of ReplicaSets.
|
||||
#ReplicaSetList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// List of ReplicaSets.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
|
||||
items: [...#ReplicaSet] @go(Items,[]ReplicaSet) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// ReplicaSetSpec is the specification of a ReplicaSet.
|
||||
#ReplicaSetSpec: {
|
||||
// Replicas is the number of desired replicas.
|
||||
// This is a pointer to distinguish between explicit zero and unspecified.
|
||||
// Defaults to 1.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
|
||||
// +optional
|
||||
replicas?: null | int32 @go(Replicas,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// Minimum number of seconds for which a newly created pod should be ready
|
||||
// without any of its container crashing, for it to be considered available.
|
||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||
// +optional
|
||||
minReadySeconds?: int32 @go(MinReadySeconds) @protobuf(4,varint,opt)
|
||||
|
||||
// Selector is a label query over pods that should match the replica count.
|
||||
// Label keys and values that must match in order to be controlled by this replica set.
|
||||
// It must match the pod template's labels.
|
||||
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(2,bytes,opt)
|
||||
|
||||
// Template is the object that describes the pod that will be created if
|
||||
// insufficient replicas are detected.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
|
||||
// +optional
|
||||
template?: v1.#PodTemplateSpec @go(Template) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ReplicaSetStatus represents the current status of a ReplicaSet.
|
||||
#ReplicaSetStatus: {
|
||||
// Replicas is the most recently observed number of replicas.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
|
||||
replicas: int32 @go(Replicas) @protobuf(1,varint,opt)
|
||||
|
||||
// The number of pods that have labels matching the labels of the pod template of the replicaset.
|
||||
// +optional
|
||||
fullyLabeledReplicas?: int32 @go(FullyLabeledReplicas) @protobuf(2,varint,opt)
|
||||
|
||||
// readyReplicas is the number of pods targeted by this ReplicaSet controller with a Ready Condition.
|
||||
// +optional
|
||||
readyReplicas?: int32 @go(ReadyReplicas) @protobuf(4,varint,opt)
|
||||
|
||||
// The number of available replicas (ready for at least minReadySeconds) for this replica set.
|
||||
// +optional
|
||||
availableReplicas?: int32 @go(AvailableReplicas) @protobuf(5,varint,opt)
|
||||
|
||||
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
|
||||
// +optional
|
||||
observedGeneration?: int64 @go(ObservedGeneration) @protobuf(3,varint,opt)
|
||||
|
||||
// Represents the latest available observations of a replica set's current state.
|
||||
// +optional
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
conditions?: [...#ReplicaSetCondition] @go(Conditions,[]ReplicaSetCondition) @protobuf(6,bytes,rep)
|
||||
}
|
||||
|
||||
#ReplicaSetConditionType: string // #enumReplicaSetConditionType
|
||||
|
||||
#enumReplicaSetConditionType:
|
||||
#ReplicaSetReplicaFailure
|
||||
|
||||
// ReplicaSetReplicaFailure is added in a replica set when one of its pods fails to be created
|
||||
// due to insufficient quota, limit ranges, pod security policy, node selectors, etc. or deleted
|
||||
// due to kubelet being down or finalizers are failing.
|
||||
#ReplicaSetReplicaFailure: #ReplicaSetConditionType & "ReplicaFailure"
|
||||
|
||||
// ReplicaSetCondition describes the state of a replica set at a certain point.
|
||||
#ReplicaSetCondition: {
|
||||
// Type of replica set condition.
|
||||
type: #ReplicaSetConditionType @go(Type) @protobuf(1,bytes,opt,casttype=ReplicaSetConditionType)
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
status: v1.#ConditionStatus @go(Status) @protobuf(2,bytes,opt,casttype=k8s.io/api/core/v1.ConditionStatus)
|
||||
|
||||
// The last time the condition transitioned from one status to another.
|
||||
// +optional
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// The reason for the condition's last transition.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// A human readable message indicating details about the transition.
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the
|
||||
// release notes for more information.
|
||||
// ControllerRevision implements an immutable snapshot of state data. Clients
|
||||
// are responsible for serializing and deserializing the objects that contain
|
||||
// their internal state.
|
||||
// Once a ControllerRevision has been successfully created, it can not be updated.
|
||||
// The API Server will fail validation of all requests that attempt to mutate
|
||||
// the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both
|
||||
// the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However,
|
||||
// it may be subject to name and representation changes in future releases, and clients should not
|
||||
// depend on its stability. It is primarily for internal use by controllers.
|
||||
#ControllerRevision: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Data is the serialized representation of the state.
|
||||
data?: runtime.#RawExtension @go(Data) @protobuf(2,bytes,opt)
|
||||
|
||||
// Revision indicates the revision of the state represented by Data.
|
||||
revision: int64 @go(Revision) @protobuf(3,varint,opt)
|
||||
}
|
||||
|
||||
// ControllerRevisionList is a resource containing a list of ControllerRevision objects.
|
||||
#ControllerRevisionList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Items is the list of ControllerRevisions
|
||||
items: [...#ControllerRevision] @go(Items,[]ControllerRevision) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/authentication/v1
|
||||
|
||||
package v1
|
||||
|
||||
#GroupName: "authentication.k8s.io"
|
||||
@@ -0,0 +1,206 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/authentication/v1
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
)
|
||||
|
||||
// ImpersonateUserHeader is used to impersonate a particular user during an API server request
|
||||
#ImpersonateUserHeader: "Impersonate-User"
|
||||
|
||||
// ImpersonateGroupHeader is used to impersonate a particular group during an API server request.
|
||||
// It can be repeated multiplied times for multiple groups.
|
||||
#ImpersonateGroupHeader: "Impersonate-Group"
|
||||
|
||||
// ImpersonateUIDHeader is used to impersonate a particular UID during an API server request
|
||||
#ImpersonateUIDHeader: "Impersonate-Uid"
|
||||
|
||||
// ImpersonateUserExtraHeaderPrefix is a prefix for any header used to impersonate an entry in the
|
||||
// extra map[string][]string for user.Info. The key will be every after the prefix.
|
||||
// It can be repeated multiplied times for multiple map keys and the same key can be repeated multiple
|
||||
// times to have multiple elements in the slice under a single key
|
||||
#ImpersonateUserExtraHeaderPrefix: "Impersonate-Extra-"
|
||||
|
||||
// TokenReview attempts to authenticate a token to a known user.
|
||||
// Note: TokenReview requests may be cached by the webhook token authenticator
|
||||
// plugin in the kube-apiserver.
|
||||
#TokenReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec holds information about the request being evaluated
|
||||
spec: #TokenReviewSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is filled in by the server and indicates whether the request can be authenticated.
|
||||
// +optional
|
||||
status?: #TokenReviewStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// TokenReviewSpec is a description of the token authentication request.
|
||||
#TokenReviewSpec: {
|
||||
// Token is the opaque bearer token.
|
||||
// +optional
|
||||
token?: string @go(Token) @protobuf(1,bytes,opt)
|
||||
|
||||
// Audiences is a list of the identifiers that the resource server presented
|
||||
// with the token identifies as. Audience-aware token authenticators will
|
||||
// verify that the token was intended for at least one of the audiences in
|
||||
// this list. If no audiences are provided, the audience will default to the
|
||||
// audience of the Kubernetes apiserver.
|
||||
// +optional
|
||||
audiences?: [...string] @go(Audiences,[]string) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// TokenReviewStatus is the result of the token authentication request.
|
||||
#TokenReviewStatus: {
|
||||
// Authenticated indicates that the token was associated with a known user.
|
||||
// +optional
|
||||
authenticated?: bool @go(Authenticated) @protobuf(1,varint,opt)
|
||||
|
||||
// User is the UserInfo associated with the provided token.
|
||||
// +optional
|
||||
user?: #UserInfo @go(User) @protobuf(2,bytes,opt)
|
||||
|
||||
// Audiences are audience identifiers chosen by the authenticator that are
|
||||
// compatible with both the TokenReview and token. An identifier is any
|
||||
// identifier in the intersection of the TokenReviewSpec audiences and the
|
||||
// token's audiences. A client of the TokenReview API that sets the
|
||||
// spec.audiences field should validate that a compatible audience identifier
|
||||
// is returned in the status.audiences field to ensure that the TokenReview
|
||||
// server is audience aware. If a TokenReview returns an empty
|
||||
// status.audience field where status.authenticated is "true", the token is
|
||||
// valid against the audience of the Kubernetes API server.
|
||||
// +optional
|
||||
audiences?: [...string] @go(Audiences,[]string) @protobuf(4,bytes,rep)
|
||||
|
||||
// Error indicates that the token couldn't be checked
|
||||
// +optional
|
||||
error?: string @go(Error) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// UserInfo holds the information about the user needed to implement the
|
||||
// user.Info interface.
|
||||
#UserInfo: {
|
||||
// The name that uniquely identifies this user among all active users.
|
||||
// +optional
|
||||
username?: string @go(Username) @protobuf(1,bytes,opt)
|
||||
|
||||
// A unique value that identifies this user across time. If this user is
|
||||
// deleted and another user by the same name is added, they will have
|
||||
// different UIDs.
|
||||
// +optional
|
||||
uid?: string @go(UID) @protobuf(2,bytes,opt)
|
||||
|
||||
// The names of groups this user is a part of.
|
||||
// +optional
|
||||
groups?: [...string] @go(Groups,[]string) @protobuf(3,bytes,rep)
|
||||
|
||||
// Any additional information provided by the authenticator.
|
||||
// +optional
|
||||
extra?: {[string]: #ExtraValue} @go(Extra,map[string]ExtraValue) @protobuf(4,bytes,rep)
|
||||
}
|
||||
|
||||
// ExtraValue masks the value so protobuf can generate
|
||||
// +protobuf.nullable=true
|
||||
// +protobuf.options.(gogoproto.goproto_stringer)=false
|
||||
#ExtraValue: [...string]
|
||||
|
||||
// TokenRequest requests a token for a given service account.
|
||||
#TokenRequest: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec holds information about the request being evaluated
|
||||
spec: #TokenRequestSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is filled in by the server and indicates whether the token can be authenticated.
|
||||
// +optional
|
||||
status?: #TokenRequestStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// TokenRequestSpec contains client provided parameters of a token request.
|
||||
#TokenRequestSpec: {
|
||||
// Audiences are the intendend audiences of the token. A recipient of a
|
||||
// token must identify themself with an identifier in the list of
|
||||
// audiences of the token, and otherwise should reject the token. A
|
||||
// token issued for multiple audiences may be used to authenticate
|
||||
// against any of the audiences listed but implies a high degree of
|
||||
// trust between the target audiences.
|
||||
audiences: [...string] @go(Audiences,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// ExpirationSeconds is the requested duration of validity of the request. The
|
||||
// token issuer may return a token with a different validity duration so a
|
||||
// client needs to check the 'expiration' field in a response.
|
||||
// +optional
|
||||
expirationSeconds?: null | int64 @go(ExpirationSeconds,*int64) @protobuf(4,varint,opt)
|
||||
|
||||
// BoundObjectRef is a reference to an object that the token will be bound to.
|
||||
// The token will only be valid for as long as the bound object exists.
|
||||
// NOTE: The API server's TokenReview endpoint will validate the
|
||||
// BoundObjectRef, but other audiences may not. Keep ExpirationSeconds
|
||||
// small if you want prompt revocation.
|
||||
// +optional
|
||||
boundObjectRef?: null | #BoundObjectReference @go(BoundObjectRef,*BoundObjectReference) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// TokenRequestStatus is the result of a token request.
|
||||
#TokenRequestStatus: {
|
||||
// Token is the opaque bearer token.
|
||||
token: string @go(Token) @protobuf(1,bytes,opt)
|
||||
|
||||
// ExpirationTimestamp is the time of expiration of the returned token.
|
||||
expirationTimestamp: metav1.#Time @go(ExpirationTimestamp) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// BoundObjectReference is a reference to an object that a token is bound to.
|
||||
#BoundObjectReference: {
|
||||
// Kind of the referent. Valid kinds are 'Pod' and 'Secret'.
|
||||
// +optional
|
||||
kind?: string @go(Kind) @protobuf(1,bytes,opt)
|
||||
|
||||
// API version of the referent.
|
||||
// +optional
|
||||
apiVersion?: string @go(APIVersion) @protobuf(2,bytes,opt)
|
||||
|
||||
// Name of the referent.
|
||||
// +optional
|
||||
name?: string @go(Name) @protobuf(3,bytes,opt)
|
||||
|
||||
// UID of the referent.
|
||||
// +optional
|
||||
uid?: types.#UID @go(UID) @protobuf(4,bytes,opt,name=uID,casttype=k8s.io/apimachinery/pkg/types.UID)
|
||||
}
|
||||
|
||||
// SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request.
|
||||
// When using impersonation, users will receive the user info of the user being impersonated. If impersonation or
|
||||
// request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
|
||||
#SelfSubjectReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Status is filled in by the server with the user attributes.
|
||||
status?: #SelfSubjectReviewStatus @go(Status) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.
|
||||
#SelfSubjectReviewStatus: {
|
||||
// User attributes of the user making this request.
|
||||
// +optional
|
||||
userInfo?: #UserInfo @go(UserInfo) @protobuf(1,bytes,opt)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/authentication/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
#GroupName: "authentication.k8s.io"
|
||||
@@ -0,0 +1,32 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/authentication/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/api/authentication/v1"
|
||||
)
|
||||
|
||||
// SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request.
|
||||
// When using impersonation, users will receive the user info of the user being impersonated. If impersonation or
|
||||
// request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
|
||||
#SelfSubjectReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Status is filled in by the server with the user attributes.
|
||||
status?: #SelfSubjectReviewStatus @go(Status) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.
|
||||
#SelfSubjectReviewStatus: {
|
||||
// User attributes of the user making this request.
|
||||
// +optional
|
||||
userInfo?: v1.#UserInfo @go(UserInfo) @protobuf(1,bytes,opt)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/authentication/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "authentication.k8s.io"
|
||||
@@ -0,0 +1,120 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/authentication/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/api/authentication/v1"
|
||||
)
|
||||
|
||||
// TokenReview attempts to authenticate a token to a known user.
|
||||
// Note: TokenReview requests may be cached by the webhook token authenticator
|
||||
// plugin in the kube-apiserver.
|
||||
#TokenReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec holds information about the request being evaluated
|
||||
spec: #TokenReviewSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is filled in by the server and indicates whether the token can be authenticated.
|
||||
// +optional
|
||||
status?: #TokenReviewStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// TokenReviewSpec is a description of the token authentication request.
|
||||
#TokenReviewSpec: {
|
||||
// Token is the opaque bearer token.
|
||||
// +optional
|
||||
token?: string @go(Token) @protobuf(1,bytes,opt)
|
||||
|
||||
// Audiences is a list of the identifiers that the resource server presented
|
||||
// with the token identifies as. Audience-aware token authenticators will
|
||||
// verify that the token was intended for at least one of the audiences in
|
||||
// this list. If no audiences are provided, the audience will default to the
|
||||
// audience of the Kubernetes apiserver.
|
||||
// +optional
|
||||
audiences?: [...string] @go(Audiences,[]string) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// TokenReviewStatus is the result of the token authentication request.
|
||||
#TokenReviewStatus: {
|
||||
// Authenticated indicates that the token was associated with a known user.
|
||||
// +optional
|
||||
authenticated?: bool @go(Authenticated) @protobuf(1,varint,opt)
|
||||
|
||||
// User is the UserInfo associated with the provided token.
|
||||
// +optional
|
||||
user?: #UserInfo @go(User) @protobuf(2,bytes,opt)
|
||||
|
||||
// Audiences are audience identifiers chosen by the authenticator that are
|
||||
// compatible with both the TokenReview and token. An identifier is any
|
||||
// identifier in the intersection of the TokenReviewSpec audiences and the
|
||||
// token's audiences. A client of the TokenReview API that sets the
|
||||
// spec.audiences field should validate that a compatible audience identifier
|
||||
// is returned in the status.audiences field to ensure that the TokenReview
|
||||
// server is audience aware. If a TokenReview returns an empty
|
||||
// status.audience field where status.authenticated is "true", the token is
|
||||
// valid against the audience of the Kubernetes API server.
|
||||
// +optional
|
||||
audiences?: [...string] @go(Audiences,[]string) @protobuf(4,bytes,rep)
|
||||
|
||||
// Error indicates that the token couldn't be checked
|
||||
// +optional
|
||||
error?: string @go(Error) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// UserInfo holds the information about the user needed to implement the
|
||||
// user.Info interface.
|
||||
#UserInfo: {
|
||||
// The name that uniquely identifies this user among all active users.
|
||||
// +optional
|
||||
username?: string @go(Username) @protobuf(1,bytes,opt)
|
||||
|
||||
// A unique value that identifies this user across time. If this user is
|
||||
// deleted and another user by the same name is added, they will have
|
||||
// different UIDs.
|
||||
// +optional
|
||||
uid?: string @go(UID) @protobuf(2,bytes,opt)
|
||||
|
||||
// The names of groups this user is a part of.
|
||||
// +optional
|
||||
groups?: [...string] @go(Groups,[]string) @protobuf(3,bytes,rep)
|
||||
|
||||
// Any additional information provided by the authenticator.
|
||||
// +optional
|
||||
extra?: {[string]: #ExtraValue} @go(Extra,map[string]ExtraValue) @protobuf(4,bytes,rep)
|
||||
}
|
||||
|
||||
// ExtraValue masks the value so protobuf can generate
|
||||
// +protobuf.nullable=true
|
||||
// +protobuf.options.(gogoproto.goproto_stringer)=false
|
||||
#ExtraValue: [...string]
|
||||
|
||||
// SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request.
|
||||
// When using impersonation, users will receive the user info of the user being impersonated. If impersonation or
|
||||
// request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
|
||||
#SelfSubjectReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Status is filled in by the server with the user attributes.
|
||||
status?: #SelfSubjectReviewStatus @go(Status) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.
|
||||
#SelfSubjectReviewStatus: {
|
||||
// User attributes of the user making this request.
|
||||
// +optional
|
||||
userInfo?: v1.#UserInfo @go(UserInfo) @protobuf(1,bytes,opt)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/authorization/v1
|
||||
|
||||
package v1
|
||||
|
||||
#GroupName: "authorization.k8s.io"
|
||||
@@ -0,0 +1,262 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/authorization/v1
|
||||
|
||||
package v1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// SubjectAccessReview checks whether or not a user or group can perform an action.
|
||||
#SubjectAccessReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec holds information about the request being evaluated
|
||||
spec: #SubjectAccessReviewSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||
// +optional
|
||||
status?: #SubjectAccessReviewStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
|
||||
// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
|
||||
// to check whether they can perform an action
|
||||
#SelfSubjectAccessReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec holds information about the request being evaluated. user and groups must be empty
|
||||
spec: #SelfSubjectAccessReviewSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||
// +optional
|
||||
status?: #SubjectAccessReviewStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
|
||||
// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
|
||||
// checking.
|
||||
#LocalSubjectAccessReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
|
||||
// you made the request against. If empty, it is defaulted.
|
||||
spec: #SubjectAccessReviewSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||
// +optional
|
||||
status?: #SubjectAccessReviewStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
|
||||
#ResourceAttributes: {
|
||||
// Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
|
||||
// "" (empty) is defaulted for LocalSubjectAccessReviews
|
||||
// "" (empty) is empty for cluster-scoped resources
|
||||
// "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
|
||||
// +optional
|
||||
namespace?: string @go(Namespace) @protobuf(1,bytes,opt)
|
||||
|
||||
// Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
|
||||
// +optional
|
||||
verb?: string @go(Verb) @protobuf(2,bytes,opt)
|
||||
|
||||
// Group is the API Group of the Resource. "*" means all.
|
||||
// +optional
|
||||
group?: string @go(Group) @protobuf(3,bytes,opt)
|
||||
|
||||
// Version is the API Version of the Resource. "*" means all.
|
||||
// +optional
|
||||
version?: string @go(Version) @protobuf(4,bytes,opt)
|
||||
|
||||
// Resource is one of the existing resource types. "*" means all.
|
||||
// +optional
|
||||
resource?: string @go(Resource) @protobuf(5,bytes,opt)
|
||||
|
||||
// Subresource is one of the existing resource types. "" means none.
|
||||
// +optional
|
||||
subresource?: string @go(Subresource) @protobuf(6,bytes,opt)
|
||||
|
||||
// Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
|
||||
// +optional
|
||||
name?: string @go(Name) @protobuf(7,bytes,opt)
|
||||
}
|
||||
|
||||
// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
|
||||
#NonResourceAttributes: {
|
||||
// Path is the URL path of the request
|
||||
// +optional
|
||||
path?: string @go(Path) @protobuf(1,bytes,opt)
|
||||
|
||||
// Verb is the standard HTTP verb
|
||||
// +optional
|
||||
verb?: string @go(Verb) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
|
||||
// and NonResourceAuthorizationAttributes must be set
|
||||
#SubjectAccessReviewSpec: {
|
||||
// ResourceAuthorizationAttributes describes information for a resource access request
|
||||
// +optional
|
||||
resourceAttributes?: null | #ResourceAttributes @go(ResourceAttributes,*ResourceAttributes) @protobuf(1,bytes,opt)
|
||||
|
||||
// NonResourceAttributes describes information for a non-resource access request
|
||||
// +optional
|
||||
nonResourceAttributes?: null | #NonResourceAttributes @go(NonResourceAttributes,*NonResourceAttributes) @protobuf(2,bytes,opt)
|
||||
|
||||
// User is the user you're testing for.
|
||||
// If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups
|
||||
// +optional
|
||||
user?: string @go(User) @protobuf(3,bytes,opt)
|
||||
|
||||
// Groups is the groups you're testing for.
|
||||
// +optional
|
||||
groups?: [...string] @go(Groups,[]string) @protobuf(4,bytes,rep)
|
||||
|
||||
// Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
|
||||
// it needs a reflection here.
|
||||
// +optional
|
||||
extra?: {[string]: #ExtraValue} @go(Extra,map[string]ExtraValue) @protobuf(5,bytes,rep)
|
||||
|
||||
// UID information about the requesting user.
|
||||
// +optional
|
||||
uid?: string @go(UID) @protobuf(6,bytes,opt)
|
||||
}
|
||||
|
||||
// ExtraValue masks the value so protobuf can generate
|
||||
// +protobuf.nullable=true
|
||||
// +protobuf.options.(gogoproto.goproto_stringer)=false
|
||||
#ExtraValue: [...string]
|
||||
|
||||
// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
|
||||
// and NonResourceAuthorizationAttributes must be set
|
||||
#SelfSubjectAccessReviewSpec: {
|
||||
// ResourceAuthorizationAttributes describes information for a resource access request
|
||||
// +optional
|
||||
resourceAttributes?: null | #ResourceAttributes @go(ResourceAttributes,*ResourceAttributes) @protobuf(1,bytes,opt)
|
||||
|
||||
// NonResourceAttributes describes information for a non-resource access request
|
||||
// +optional
|
||||
nonResourceAttributes?: null | #NonResourceAttributes @go(NonResourceAttributes,*NonResourceAttributes) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// SubjectAccessReviewStatus
|
||||
#SubjectAccessReviewStatus: {
|
||||
// Allowed is required. True if the action would be allowed, false otherwise.
|
||||
allowed: bool @go(Allowed) @protobuf(1,varint,opt)
|
||||
|
||||
// Denied is optional. True if the action would be denied, otherwise
|
||||
// false. If both allowed is false and denied is false, then the
|
||||
// authorizer has no opinion on whether to authorize the action. Denied
|
||||
// may not be true if Allowed is true.
|
||||
// +optional
|
||||
denied?: bool @go(Denied) @protobuf(4,varint,opt)
|
||||
|
||||
// Reason is optional. It indicates why a request was allowed or denied.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(2,bytes,opt)
|
||||
|
||||
// EvaluationError is an indication that some error occurred during the authorization check.
|
||||
// It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
|
||||
// For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
|
||||
// +optional
|
||||
evaluationError?: string @go(EvaluationError) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace.
|
||||
// The returned list of actions may be incomplete depending on the server's authorization mode,
|
||||
// and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions,
|
||||
// or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to
|
||||
// drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns.
|
||||
// SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.
|
||||
#SelfSubjectRulesReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec holds information about the request being evaluated.
|
||||
spec: #SelfSubjectRulesReviewSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is filled in by the server and indicates the set of actions a user can perform.
|
||||
// +optional
|
||||
status?: #SubjectRulesReviewStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.
|
||||
#SelfSubjectRulesReviewSpec: {
|
||||
// Namespace to evaluate rules for. Required.
|
||||
namespace?: string @go(Namespace) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on
|
||||
// the set of authorizers the server is configured with and any errors experienced during evaluation.
|
||||
// Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission,
|
||||
// even if that list is incomplete.
|
||||
#SubjectRulesReviewStatus: {
|
||||
// ResourceRules is the list of actions the subject is allowed to perform on resources.
|
||||
// The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
|
||||
resourceRules: [...#ResourceRule] @go(ResourceRules,[]ResourceRule) @protobuf(1,bytes,rep)
|
||||
|
||||
// NonResourceRules is the list of actions the subject is allowed to perform on non-resources.
|
||||
// The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
|
||||
nonResourceRules: [...#NonResourceRule] @go(NonResourceRules,[]NonResourceRule) @protobuf(2,bytes,rep)
|
||||
|
||||
// Incomplete is true when the rules returned by this call are incomplete. This is most commonly
|
||||
// encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.
|
||||
incomplete: bool @go(Incomplete) @protobuf(3,bytes,rep)
|
||||
|
||||
// EvaluationError can appear in combination with Rules. It indicates an error occurred during
|
||||
// rule evaluation, such as an authorizer that doesn't support rule evaluation, and that
|
||||
// ResourceRules and/or NonResourceRules may be incomplete.
|
||||
// +optional
|
||||
evaluationError?: string @go(EvaluationError) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant,
|
||||
// may contain duplicates, and possibly be incomplete.
|
||||
#ResourceRule: {
|
||||
// Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all.
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
|
||||
// the enumerated resources in any API group will be allowed. "*" means all.
|
||||
// +optional
|
||||
apiGroups?: [...string] @go(APIGroups,[]string) @protobuf(2,bytes,rep)
|
||||
|
||||
// Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups.
|
||||
// "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups.
|
||||
// +optional
|
||||
resources?: [...string] @go(Resources,[]string) @protobuf(3,bytes,rep)
|
||||
|
||||
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all.
|
||||
// +optional
|
||||
resourceNames?: [...string] @go(ResourceNames,[]string) @protobuf(4,bytes,rep)
|
||||
}
|
||||
|
||||
// NonResourceRule holds information that describes a rule for the non-resource
|
||||
#NonResourceRule: {
|
||||
// Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all.
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full,
|
||||
// final step in the path. "*" means all.
|
||||
// +optional
|
||||
nonResourceURLs?: [...string] @go(NonResourceURLs,[]string) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/authorization/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "authorization.k8s.io"
|
||||
@@ -0,0 +1,262 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/authorization/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// SubjectAccessReview checks whether or not a user or group can perform an action.
|
||||
#SubjectAccessReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec holds information about the request being evaluated
|
||||
spec: #SubjectAccessReviewSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||
// +optional
|
||||
status?: #SubjectAccessReviewStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a
|
||||
// spec.namespace means "in all namespaces". Self is a special case, because users should always be able
|
||||
// to check whether they can perform an action
|
||||
#SelfSubjectAccessReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec holds information about the request being evaluated. user and groups must be empty
|
||||
spec: #SelfSubjectAccessReviewSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||
// +optional
|
||||
status?: #SubjectAccessReviewStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
|
||||
// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions
|
||||
// checking.
|
||||
#LocalSubjectAccessReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
|
||||
// you made the request against. If empty, it is defaulted.
|
||||
spec: #SubjectAccessReviewSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||
// +optional
|
||||
status?: #SubjectAccessReviewStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface
|
||||
#ResourceAttributes: {
|
||||
// Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces
|
||||
// "" (empty) is defaulted for LocalSubjectAccessReviews
|
||||
// "" (empty) is empty for cluster-scoped resources
|
||||
// "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
|
||||
// +optional
|
||||
namespace?: string @go(Namespace) @protobuf(1,bytes,opt)
|
||||
|
||||
// Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
|
||||
// +optional
|
||||
verb?: string @go(Verb) @protobuf(2,bytes,opt)
|
||||
|
||||
// Group is the API Group of the Resource. "*" means all.
|
||||
// +optional
|
||||
group?: string @go(Group) @protobuf(3,bytes,opt)
|
||||
|
||||
// Version is the API Version of the Resource. "*" means all.
|
||||
// +optional
|
||||
version?: string @go(Version) @protobuf(4,bytes,opt)
|
||||
|
||||
// Resource is one of the existing resource types. "*" means all.
|
||||
// +optional
|
||||
resource?: string @go(Resource) @protobuf(5,bytes,opt)
|
||||
|
||||
// Subresource is one of the existing resource types. "" means none.
|
||||
// +optional
|
||||
subresource?: string @go(Subresource) @protobuf(6,bytes,opt)
|
||||
|
||||
// Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
|
||||
// +optional
|
||||
name?: string @go(Name) @protobuf(7,bytes,opt)
|
||||
}
|
||||
|
||||
// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
|
||||
#NonResourceAttributes: {
|
||||
// Path is the URL path of the request
|
||||
// +optional
|
||||
path?: string @go(Path) @protobuf(1,bytes,opt)
|
||||
|
||||
// Verb is the standard HTTP verb
|
||||
// +optional
|
||||
verb?: string @go(Verb) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
|
||||
// and NonResourceAuthorizationAttributes must be set
|
||||
#SubjectAccessReviewSpec: {
|
||||
// ResourceAuthorizationAttributes describes information for a resource access request
|
||||
// +optional
|
||||
resourceAttributes?: null | #ResourceAttributes @go(ResourceAttributes,*ResourceAttributes) @protobuf(1,bytes,opt)
|
||||
|
||||
// NonResourceAttributes describes information for a non-resource access request
|
||||
// +optional
|
||||
nonResourceAttributes?: null | #NonResourceAttributes @go(NonResourceAttributes,*NonResourceAttributes) @protobuf(2,bytes,opt)
|
||||
|
||||
// User is the user you're testing for.
|
||||
// If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
|
||||
// +optional
|
||||
user?: string @go(User) @protobuf(3,bytes,opt)
|
||||
|
||||
// Groups is the groups you're testing for.
|
||||
// +optional
|
||||
group?: [...string] @go(Groups,[]string) @protobuf(4,bytes,rep)
|
||||
|
||||
// Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
|
||||
// it needs a reflection here.
|
||||
// +optional
|
||||
extra?: {[string]: #ExtraValue} @go(Extra,map[string]ExtraValue) @protobuf(5,bytes,rep)
|
||||
|
||||
// UID information about the requesting user.
|
||||
// +optional
|
||||
uid?: string @go(UID) @protobuf(6,bytes,opt)
|
||||
}
|
||||
|
||||
// ExtraValue masks the value so protobuf can generate
|
||||
// +protobuf.nullable=true
|
||||
// +protobuf.options.(gogoproto.goproto_stringer)=false
|
||||
#ExtraValue: [...string]
|
||||
|
||||
// SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes
|
||||
// and NonResourceAuthorizationAttributes must be set
|
||||
#SelfSubjectAccessReviewSpec: {
|
||||
// ResourceAuthorizationAttributes describes information for a resource access request
|
||||
// +optional
|
||||
resourceAttributes?: null | #ResourceAttributes @go(ResourceAttributes,*ResourceAttributes) @protobuf(1,bytes,opt)
|
||||
|
||||
// NonResourceAttributes describes information for a non-resource access request
|
||||
// +optional
|
||||
nonResourceAttributes?: null | #NonResourceAttributes @go(NonResourceAttributes,*NonResourceAttributes) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// SubjectAccessReviewStatus
|
||||
#SubjectAccessReviewStatus: {
|
||||
// Allowed is required. True if the action would be allowed, false otherwise.
|
||||
allowed: bool @go(Allowed) @protobuf(1,varint,opt)
|
||||
|
||||
// Denied is optional. True if the action would be denied, otherwise
|
||||
// false. If both allowed is false and denied is false, then the
|
||||
// authorizer has no opinion on whether to authorize the action. Denied
|
||||
// may not be true if Allowed is true.
|
||||
// +optional
|
||||
denied?: bool @go(Denied) @protobuf(4,varint,opt)
|
||||
|
||||
// Reason is optional. It indicates why a request was allowed or denied.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(2,bytes,opt)
|
||||
|
||||
// EvaluationError is an indication that some error occurred during the authorization check.
|
||||
// It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
|
||||
// For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
|
||||
// +optional
|
||||
evaluationError?: string @go(EvaluationError) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace.
|
||||
// The returned list of actions may be incomplete depending on the server's authorization mode,
|
||||
// and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions,
|
||||
// or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to
|
||||
// drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns.
|
||||
// SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.
|
||||
#SelfSubjectRulesReview: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Spec holds information about the request being evaluated.
|
||||
spec: #SelfSubjectRulesReviewSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Status is filled in by the server and indicates the set of actions a user can perform.
|
||||
// +optional
|
||||
status?: #SubjectRulesReviewStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.
|
||||
#SelfSubjectRulesReviewSpec: {
|
||||
// Namespace to evaluate rules for. Required.
|
||||
namespace?: string @go(Namespace) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on
|
||||
// the set of authorizers the server is configured with and any errors experienced during evaluation.
|
||||
// Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission,
|
||||
// even if that list is incomplete.
|
||||
#SubjectRulesReviewStatus: {
|
||||
// ResourceRules is the list of actions the subject is allowed to perform on resources.
|
||||
// The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
|
||||
resourceRules: [...#ResourceRule] @go(ResourceRules,[]ResourceRule) @protobuf(1,bytes,rep)
|
||||
|
||||
// NonResourceRules is the list of actions the subject is allowed to perform on non-resources.
|
||||
// The list ordering isn't significant, may contain duplicates, and possibly be incomplete.
|
||||
nonResourceRules: [...#NonResourceRule] @go(NonResourceRules,[]NonResourceRule) @protobuf(2,bytes,rep)
|
||||
|
||||
// Incomplete is true when the rules returned by this call are incomplete. This is most commonly
|
||||
// encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.
|
||||
incomplete: bool @go(Incomplete) @protobuf(3,bytes,rep)
|
||||
|
||||
// EvaluationError can appear in combination with Rules. It indicates an error occurred during
|
||||
// rule evaluation, such as an authorizer that doesn't support rule evaluation, and that
|
||||
// ResourceRules and/or NonResourceRules may be incomplete.
|
||||
// +optional
|
||||
evaluationError?: string @go(EvaluationError) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant,
|
||||
// may contain duplicates, and possibly be incomplete.
|
||||
#ResourceRule: {
|
||||
// Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all.
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
|
||||
// the enumerated resources in any API group will be allowed. "*" means all.
|
||||
// +optional
|
||||
apiGroups?: [...string] @go(APIGroups,[]string) @protobuf(2,bytes,rep)
|
||||
|
||||
// Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups.
|
||||
// "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups.
|
||||
// +optional
|
||||
resources?: [...string] @go(Resources,[]string) @protobuf(3,bytes,rep)
|
||||
|
||||
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all.
|
||||
// +optional
|
||||
resourceNames?: [...string] @go(ResourceNames,[]string) @protobuf(4,bytes,rep)
|
||||
}
|
||||
|
||||
// NonResourceRule holds information that describes a rule for the non-resource
|
||||
#NonResourceRule: {
|
||||
// Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all.
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full,
|
||||
// final step in the path. "*" means all.
|
||||
// +optional
|
||||
nonResourceURLs?: [...string] @go(NonResourceURLs,[]string) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/autoscaling/v1
|
||||
|
||||
package v1
|
||||
|
||||
#GroupName: "autoscaling"
|
||||
@@ -0,0 +1,542 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/autoscaling/v1
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
"k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||
// +structType=atomic
|
||||
#CrossVersionObjectReference: {
|
||||
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: string @go(Kind) @protobuf(1,bytes,opt)
|
||||
|
||||
// name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
name: string @go(Name) @protobuf(2,bytes,opt)
|
||||
|
||||
// apiVersion is the API version of the referent
|
||||
// +optional
|
||||
apiVersion?: string @go(APIVersion) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// specification of a horizontal pod autoscaler.
|
||||
#HorizontalPodAutoscalerSpec: {
|
||||
// reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
|
||||
// and will set the desired number of pods by using its Scale subresource.
|
||||
scaleTargetRef: #CrossVersionObjectReference @go(ScaleTargetRef) @protobuf(1,bytes,opt)
|
||||
|
||||
// minReplicas is the lower limit for the number of replicas to which the autoscaler
|
||||
// can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
|
||||
// alpha feature gate HPAScaleToZero is enabled and at least one Object or External
|
||||
// metric is configured. Scaling is active as long as at least one metric value is
|
||||
// available.
|
||||
// +optional
|
||||
minReplicas?: null | int32 @go(MinReplicas,*int32) @protobuf(2,varint,opt)
|
||||
|
||||
// maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
|
||||
maxReplicas: int32 @go(MaxReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
|
||||
// if not specified the default autoscaling policy will be used.
|
||||
// +optional
|
||||
targetCPUUtilizationPercentage?: null | int32 @go(TargetCPUUtilizationPercentage,*int32) @protobuf(4,varint,opt)
|
||||
}
|
||||
|
||||
// current status of a horizontal pod autoscaler
|
||||
#HorizontalPodAutoscalerStatus: {
|
||||
// observedGeneration is the most recent generation observed by this autoscaler.
|
||||
// +optional
|
||||
observedGeneration?: null | int64 @go(ObservedGeneration,*int64) @protobuf(1,varint,opt)
|
||||
|
||||
// lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods;
|
||||
// used by the autoscaler to control how often the number of pods is changed.
|
||||
// +optional
|
||||
lastScaleTime?: null | metav1.#Time @go(LastScaleTime,*metav1.Time) @protobuf(2,bytes,opt)
|
||||
|
||||
// currentReplicas is the current number of replicas of pods managed by this autoscaler.
|
||||
currentReplicas: int32 @go(CurrentReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// desiredReplicas is the desired number of replicas of pods managed by this autoscaler.
|
||||
desiredReplicas: int32 @go(DesiredReplicas) @protobuf(4,varint,opt)
|
||||
|
||||
// currentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU,
|
||||
// e.g. 70 means that an average pod is using now 70% of its requested CPU.
|
||||
// +optional
|
||||
currentCPUUtilizationPercentage?: null | int32 @go(CurrentCPUUtilizationPercentage,*int32) @protobuf(5,varint,opt)
|
||||
}
|
||||
|
||||
// configuration of a horizontal pod autoscaler.
|
||||
#HorizontalPodAutoscaler: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||
// +optional
|
||||
spec?: #HorizontalPodAutoscalerSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// status is the current information about the autoscaler.
|
||||
// +optional
|
||||
status?: #HorizontalPodAutoscalerStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// list of horizontal pod autoscaler objects.
|
||||
#HorizontalPodAutoscalerList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is the list of horizontal pod autoscaler objects.
|
||||
items: [...#HorizontalPodAutoscaler] @go(Items,[]HorizontalPodAutoscaler) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// Scale represents a scaling request for a resource.
|
||||
#Scale: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||
// +optional
|
||||
spec?: #ScaleSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
|
||||
// +optional
|
||||
status?: #ScaleStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ScaleSpec describes the attributes of a scale subresource.
|
||||
#ScaleSpec: {
|
||||
// replicas is the desired number of instances for the scaled object.
|
||||
// +optional
|
||||
replicas?: int32 @go(Replicas) @protobuf(1,varint,opt)
|
||||
}
|
||||
|
||||
// ScaleStatus represents the current status of a scale subresource.
|
||||
#ScaleStatus: {
|
||||
// replicas is the actual number of observed instances of the scaled object.
|
||||
replicas: int32 @go(Replicas) @protobuf(1,varint,opt)
|
||||
|
||||
// selector is the label query over pods that should match the replicas count. This is same
|
||||
// as the label selector but in the string format to avoid introspection
|
||||
// by clients. The string will be in the same format as the query-param syntax.
|
||||
// More info about label selectors: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
// +optional
|
||||
selector?: string @go(Selector) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// MetricSourceType indicates the type of metric.
|
||||
// +enum
|
||||
#MetricSourceType: string // #enumMetricSourceType
|
||||
|
||||
#enumMetricSourceType:
|
||||
#ObjectMetricSourceType |
|
||||
#PodsMetricSourceType |
|
||||
#ResourceMetricSourceType |
|
||||
#ContainerResourceMetricSourceType |
|
||||
#ExternalMetricSourceType
|
||||
|
||||
// ObjectMetricSourceType is a metric describing a kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricSourceType: #MetricSourceType & "Object"
|
||||
|
||||
// PodsMetricSourceType is a metric describing each pod in the current scale
|
||||
// target (for example, transactions-processed-per-second). The values
|
||||
// will be averaged together before being compared to the target value.
|
||||
#PodsMetricSourceType: #MetricSourceType & "Pods"
|
||||
|
||||
// ResourceMetricSourceType is a resource metric known to Kubernetes, as
|
||||
// specified in requests and limits, describing each pod in the current
|
||||
// scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics (the "pods" source).
|
||||
#ResourceMetricSourceType: #MetricSourceType & "Resource"
|
||||
|
||||
// ContainerResourceMetricSourceType is a resource metric known to Kubernetes, as
|
||||
// specified in requests and limits, describing a single container in each pod in the current
|
||||
// scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics (the "pods" source).
|
||||
#ContainerResourceMetricSourceType: #MetricSourceType & "ContainerResource"
|
||||
|
||||
// ExternalMetricSourceType is a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
#ExternalMetricSourceType: #MetricSourceType & "External"
|
||||
|
||||
// MetricSpec specifies how to scale based on a single metric
|
||||
// (only `type` and one other matching field should be set at once).
|
||||
#MetricSpec: {
|
||||
// type is the type of metric source. It should be one of "ContainerResource",
|
||||
// "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
|
||||
// Note: "ContainerResource" type is available on when the feature-gate
|
||||
// HPAContainerMetrics is enabled
|
||||
type: #MetricSourceType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// object refers to a metric describing a single kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
// +optional
|
||||
object?: null | #ObjectMetricSource @go(Object,*ObjectMetricSource) @protobuf(2,bytes,opt)
|
||||
|
||||
// pods refers to a metric describing each pod in the current scale target
|
||||
// (for example, transactions-processed-per-second). The values will be
|
||||
// averaged together before being compared to the target value.
|
||||
// +optional
|
||||
pods?: null | #PodsMetricSource @go(Pods,*PodsMetricSource) @protobuf(3,bytes,opt)
|
||||
|
||||
// resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
resource?: null | #ResourceMetricSource @go(Resource,*ResourceMetricSource) @protobuf(4,bytes,opt)
|
||||
|
||||
// containerResource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing a single container in each pod of the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
|
||||
// +optional
|
||||
containerResource?: null | #ContainerResourceMetricSource @go(ContainerResource,*ContainerResourceMetricSource) @protobuf(7,bytes,opt)
|
||||
|
||||
// external refers to a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
// +optional
|
||||
external?: null | #ExternalMetricSource @go(External,*ExternalMetricSource) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// ObjectMetricSource indicates how to scale on a metric describing a
|
||||
// kubernetes object (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricSource: {
|
||||
// target is the described Kubernetes object.
|
||||
target: #CrossVersionObjectReference @go(Target) @protobuf(1,bytes)
|
||||
|
||||
// metricName is the name of the metric in question.
|
||||
metricName: string @go(MetricName) @protobuf(2,bytes)
|
||||
|
||||
// targetValue is the target value of the metric (as a quantity).
|
||||
targetValue: resource.#Quantity @go(TargetValue) @protobuf(3,bytes)
|
||||
|
||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric.
|
||||
// When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
|
||||
// When unset, just the metricName will be used to gather metrics.
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(4,bytes)
|
||||
|
||||
// averageValue is the target value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
// +optional
|
||||
averageValue?: null | resource.#Quantity @go(AverageValue,*resource.Quantity) @protobuf(5,bytes)
|
||||
}
|
||||
|
||||
// PodsMetricSource indicates how to scale on a metric describing each pod in
|
||||
// the current scale target (for example, transactions-processed-per-second).
|
||||
// The values will be averaged together before being compared to the target
|
||||
// value.
|
||||
#PodsMetricSource: {
|
||||
// metricName is the name of the metric in question
|
||||
metricName: string @go(MetricName) @protobuf(1,bytes)
|
||||
|
||||
// targetAverageValue is the target value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
targetAverageValue: resource.#Quantity @go(TargetAverageValue) @protobuf(2,bytes)
|
||||
|
||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
|
||||
// When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
|
||||
// When unset, just the metricName will be used to gather metrics.
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// ResourceMetricSource indicates how to scale on a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). The values will be averaged
|
||||
// together before being compared to the target. Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source. Only one "target" type
|
||||
// should be set.
|
||||
#ResourceMetricSource: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// targetAverageUtilization is the target value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods.
|
||||
// +optional
|
||||
targetAverageUtilization?: null | int32 @go(TargetAverageUtilization,*int32) @protobuf(2,varint,opt)
|
||||
|
||||
// targetAverageValue is the target value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
// +optional
|
||||
targetAverageValue?: null | resource.#Quantity @go(TargetAverageValue,*resource.Quantity) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ContainerResourceMetricSource indicates how to scale on a resource metric known to
|
||||
// Kubernetes, as specified in the requests and limits, describing a single container in
|
||||
// each of the pods of the current scale target(e.g. CPU or memory). The values will be
|
||||
// averaged together before being compared to the target. Such metrics are built into
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source. Only one "target" type
|
||||
// should be set.
|
||||
#ContainerResourceMetricSource: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// targetAverageUtilization is the target value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods.
|
||||
// +optional
|
||||
targetAverageUtilization?: null | int32 @go(TargetAverageUtilization,*int32) @protobuf(2,varint,opt)
|
||||
|
||||
// targetAverageValue is the target value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
// +optional
|
||||
targetAverageValue?: null | resource.#Quantity @go(TargetAverageValue,*resource.Quantity) @protobuf(3,bytes,opt)
|
||||
|
||||
// container is the name of the container in the pods of the scaling target.
|
||||
container: string @go(Container) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// ExternalMetricSource indicates how to scale on a metric not associated with
|
||||
// any Kubernetes object (for example length of queue in cloud
|
||||
// messaging service, or QPS from loadbalancer running outside of cluster).
|
||||
#ExternalMetricSource: {
|
||||
// metricName is the name of the metric in question.
|
||||
metricName: string @go(MetricName) @protobuf(1,bytes)
|
||||
|
||||
// metricSelector is used to identify a specific time series
|
||||
// within a given metric.
|
||||
// +optional
|
||||
metricSelector?: null | metav1.#LabelSelector @go(MetricSelector,*metav1.LabelSelector) @protobuf(2,bytes,opt)
|
||||
|
||||
// targetValue is the target value of the metric (as a quantity).
|
||||
// Mutually exclusive with TargetAverageValue.
|
||||
// +optional
|
||||
targetValue?: null | resource.#Quantity @go(TargetValue,*resource.Quantity) @protobuf(3,bytes,opt)
|
||||
|
||||
// targetAverageValue is the target per-pod value of global metric (as a quantity).
|
||||
// Mutually exclusive with TargetValue.
|
||||
// +optional
|
||||
targetAverageValue?: null | resource.#Quantity @go(TargetAverageValue,*resource.Quantity) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// MetricStatus describes the last-read state of a single metric.
|
||||
#MetricStatus: {
|
||||
// type is the type of metric source. It will be one of "ContainerResource",
|
||||
// "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
|
||||
// Note: "ContainerResource" type is available on when the feature-gate
|
||||
// HPAContainerMetrics is enabled
|
||||
type: #MetricSourceType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// object refers to a metric describing a single kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
// +optional
|
||||
object?: null | #ObjectMetricStatus @go(Object,*ObjectMetricStatus) @protobuf(2,bytes,opt)
|
||||
|
||||
// pods refers to a metric describing each pod in the current scale target
|
||||
// (for example, transactions-processed-per-second). The values will be
|
||||
// averaged together before being compared to the target value.
|
||||
// +optional
|
||||
pods?: null | #PodsMetricStatus @go(Pods,*PodsMetricStatus) @protobuf(3,bytes,opt)
|
||||
|
||||
// resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
resource?: null | #ResourceMetricStatus @go(Resource,*ResourceMetricStatus) @protobuf(4,bytes,opt)
|
||||
|
||||
// containerResource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
containerResource?: null | #ContainerResourceMetricStatus @go(ContainerResource,*ContainerResourceMetricStatus) @protobuf(7,bytes,opt)
|
||||
|
||||
// external refers to a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
// +optional
|
||||
external?: null | #ExternalMetricStatus @go(External,*ExternalMetricStatus) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerConditionType are the valid conditions of
|
||||
// a HorizontalPodAutoscaler.
|
||||
#HorizontalPodAutoscalerConditionType: string // #enumHorizontalPodAutoscalerConditionType
|
||||
|
||||
#enumHorizontalPodAutoscalerConditionType:
|
||||
#ScalingActive |
|
||||
#AbleToScale |
|
||||
#ScalingLimited
|
||||
|
||||
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
||||
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
||||
#ScalingActive: #HorizontalPodAutoscalerConditionType & "ScalingActive"
|
||||
|
||||
// AbleToScale indicates a lack of transient issues which prevent scaling from occurring,
|
||||
// such as being in a backoff window, or being unable to access/update the target scale.
|
||||
#AbleToScale: #HorizontalPodAutoscalerConditionType & "AbleToScale"
|
||||
|
||||
// ScalingLimited indicates that the calculated scale based on metrics would be above or
|
||||
// below the range for the HPA, and has thus been capped.
|
||||
#ScalingLimited: #HorizontalPodAutoscalerConditionType & "ScalingLimited"
|
||||
|
||||
// HorizontalPodAutoscalerCondition describes the state of
|
||||
// a HorizontalPodAutoscaler at a certain point.
|
||||
#HorizontalPodAutoscalerCondition: {
|
||||
// type describes the current condition
|
||||
type: #HorizontalPodAutoscalerConditionType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// status is the status of the condition (True, False, Unknown)
|
||||
status: v1.#ConditionStatus @go(Status) @protobuf(2,bytes)
|
||||
|
||||
// lastTransitionTime is the last time the condition transitioned from
|
||||
// one status to another
|
||||
// +optional
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// reason is the reason for the condition's last transition.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// message is a human-readable explanation containing details about
|
||||
// the transition
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// ObjectMetricStatus indicates the current value of a metric describing a
|
||||
// kubernetes object (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricStatus: {
|
||||
// target is the described Kubernetes object.
|
||||
target: #CrossVersionObjectReference @go(Target) @protobuf(1,bytes)
|
||||
|
||||
// metricName is the name of the metric in question.
|
||||
metricName: string @go(MetricName) @protobuf(2,bytes)
|
||||
|
||||
// currentValue is the current value of the metric (as a quantity).
|
||||
currentValue: resource.#Quantity @go(CurrentValue) @protobuf(3,bytes)
|
||||
|
||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
|
||||
// When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
|
||||
// When unset, just the metricName will be used to gather metrics.
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(4,bytes)
|
||||
|
||||
// averageValue is the current value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
// +optional
|
||||
averageValue?: null | resource.#Quantity @go(AverageValue,*resource.Quantity) @protobuf(5,bytes)
|
||||
}
|
||||
|
||||
// PodsMetricStatus indicates the current value of a metric describing each pod in
|
||||
// the current scale target (for example, transactions-processed-per-second).
|
||||
#PodsMetricStatus: {
|
||||
// metricName is the name of the metric in question
|
||||
metricName: string @go(MetricName) @protobuf(1,bytes)
|
||||
|
||||
// currentAverageValue is the current value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
currentAverageValue: resource.#Quantity @go(CurrentAverageValue) @protobuf(2,bytes)
|
||||
|
||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
|
||||
// When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
|
||||
// When unset, just the metricName will be used to gather metrics.
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// ResourceMetricStatus indicates the current value of a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source.
|
||||
#ResourceMetricStatus: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// currentAverageUtilization is the current value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods. It will only be
|
||||
// present if `targetAverageValue` was set in the corresponding metric
|
||||
// specification.
|
||||
// +optional
|
||||
currentAverageUtilization?: null | int32 @go(CurrentAverageUtilization,*int32) @protobuf(2,bytes,opt)
|
||||
|
||||
// currentAverageValue is the current value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
// It will always be set, regardless of the corresponding metric specification.
|
||||
currentAverageValue: resource.#Quantity @go(CurrentAverageValue) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// ContainerResourceMetricStatus indicates the current value of a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing a single container in each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source.
|
||||
#ContainerResourceMetricStatus: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// currentAverageUtilization is the current value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods. It will only be
|
||||
// present if `targetAverageValue` was set in the corresponding metric
|
||||
// specification.
|
||||
// +optional
|
||||
currentAverageUtilization?: null | int32 @go(CurrentAverageUtilization,*int32) @protobuf(2,bytes,opt)
|
||||
|
||||
// currentAverageValue is the current value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
// It will always be set, regardless of the corresponding metric specification.
|
||||
currentAverageValue: resource.#Quantity @go(CurrentAverageValue) @protobuf(3,bytes)
|
||||
|
||||
// container is the name of the container in the pods of the scaling taget
|
||||
container: string @go(Container) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// ExternalMetricStatus indicates the current value of a global metric
|
||||
// not associated with any Kubernetes object.
|
||||
#ExternalMetricStatus: {
|
||||
// metricName is the name of a metric used for autoscaling in
|
||||
// metric system.
|
||||
metricName: string @go(MetricName) @protobuf(1,bytes)
|
||||
|
||||
// metricSelector is used to identify a specific time series
|
||||
// within a given metric.
|
||||
// +optional
|
||||
metricSelector?: null | metav1.#LabelSelector @go(MetricSelector,*metav1.LabelSelector) @protobuf(2,bytes,opt)
|
||||
|
||||
// currentValue is the current value of the metric (as a quantity)
|
||||
currentValue: resource.#Quantity @go(CurrentValue) @protobuf(3,bytes)
|
||||
|
||||
// currentAverageValue is the current value of metric averaged over autoscaled pods.
|
||||
// +optional
|
||||
currentAverageValue?: null | resource.#Quantity @go(CurrentAverageValue,*resource.Quantity) @protobuf(4,bytes,opt)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/autoscaling/v2
|
||||
|
||||
package v2
|
||||
|
||||
#GroupName: "autoscaling"
|
||||
@@ -0,0 +1,597 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/autoscaling/v2
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscaler is the configuration for a horizontal pod
|
||||
// autoscaler, which automatically manages the replica count of any resource
|
||||
// implementing the scale subresource based on the metrics specified.
|
||||
#HorizontalPodAutoscaler: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// metadata is the standard object metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// spec is the specification for the behaviour of the autoscaler.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||
// +optional
|
||||
spec?: #HorizontalPodAutoscalerSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// status is the current information about the autoscaler.
|
||||
// +optional
|
||||
status?: #HorizontalPodAutoscalerStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
|
||||
#HorizontalPodAutoscalerSpec: {
|
||||
// scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
|
||||
// should be collected, as well as to actually change the replica count.
|
||||
scaleTargetRef: #CrossVersionObjectReference @go(ScaleTargetRef) @protobuf(1,bytes,opt)
|
||||
|
||||
// minReplicas is the lower limit for the number of replicas to which the autoscaler
|
||||
// can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
|
||||
// alpha feature gate HPAScaleToZero is enabled and at least one Object or External
|
||||
// metric is configured. Scaling is active as long as at least one metric value is
|
||||
// available.
|
||||
// +optional
|
||||
minReplicas?: null | int32 @go(MinReplicas,*int32) @protobuf(2,varint,opt)
|
||||
|
||||
// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
|
||||
// It cannot be less that minReplicas.
|
||||
maxReplicas: int32 @go(MaxReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// metrics contains the specifications for which to use to calculate the
|
||||
// desired replica count (the maximum replica count across all metrics will
|
||||
// be used). The desired replica count is calculated multiplying the
|
||||
// ratio between the target value and the current value by the current
|
||||
// number of pods. Ergo, metrics used must decrease as the pod count is
|
||||
// increased, and vice-versa. See the individual metric source types for
|
||||
// more information about how each type of metric must respond.
|
||||
// If not set, the default metric will be set to 80% average CPU utilization.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
metrics?: [...#MetricSpec] @go(Metrics,[]MetricSpec) @protobuf(4,bytes,rep)
|
||||
|
||||
// behavior configures the scaling behavior of the target
|
||||
// in both Up and Down directions (scaleUp and scaleDown fields respectively).
|
||||
// If not set, the default HPAScalingRules for scale up and scale down are used.
|
||||
// +optional
|
||||
behavior?: null | #HorizontalPodAutoscalerBehavior @go(Behavior,*HorizontalPodAutoscalerBehavior) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||
#CrossVersionObjectReference: {
|
||||
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: string @go(Kind) @protobuf(1,bytes,opt)
|
||||
|
||||
// name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
name: string @go(Name) @protobuf(2,bytes,opt)
|
||||
|
||||
// apiVersion is the API version of the referent
|
||||
// +optional
|
||||
apiVersion?: string @go(APIVersion) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// MetricSpec specifies how to scale based on a single metric
|
||||
// (only `type` and one other matching field should be set at once).
|
||||
#MetricSpec: {
|
||||
// type is the type of metric source. It should be one of "ContainerResource", "External",
|
||||
// "Object", "Pods" or "Resource", each mapping to a matching field in the object.
|
||||
// Note: "ContainerResource" type is available on when the feature-gate
|
||||
// HPAContainerMetrics is enabled
|
||||
type: #MetricSourceType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// object refers to a metric describing a single kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
// +optional
|
||||
object?: null | #ObjectMetricSource @go(Object,*ObjectMetricSource) @protobuf(2,bytes,opt)
|
||||
|
||||
// pods refers to a metric describing each pod in the current scale target
|
||||
// (for example, transactions-processed-per-second). The values will be
|
||||
// averaged together before being compared to the target value.
|
||||
// +optional
|
||||
pods?: null | #PodsMetricSource @go(Pods,*PodsMetricSource) @protobuf(3,bytes,opt)
|
||||
|
||||
// resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
resource?: null | #ResourceMetricSource @go(Resource,*ResourceMetricSource) @protobuf(4,bytes,opt)
|
||||
|
||||
// containerResource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing a single container in
|
||||
// each pod of the current scale target (e.g. CPU or memory). Such metrics are
|
||||
// built in to Kubernetes, and have special scaling options on top of those
|
||||
// available to normal per-pod metrics using the "pods" source.
|
||||
// This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
|
||||
// +optional
|
||||
containerResource?: null | #ContainerResourceMetricSource @go(ContainerResource,*ContainerResourceMetricSource) @protobuf(7,bytes,opt)
|
||||
|
||||
// external refers to a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
// +optional
|
||||
external?: null | #ExternalMetricSource @go(External,*ExternalMetricSource) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerBehavior configures the scaling behavior of the target
|
||||
// in both Up and Down directions (scaleUp and scaleDown fields respectively).
|
||||
#HorizontalPodAutoscalerBehavior: {
|
||||
// scaleUp is scaling policy for scaling Up.
|
||||
// If not set, the default value is the higher of:
|
||||
// * increase no more than 4 pods per 60 seconds
|
||||
// * double the number of pods per 60 seconds
|
||||
// No stabilization is used.
|
||||
// +optional
|
||||
scaleUp?: null | #HPAScalingRules @go(ScaleUp,*HPAScalingRules) @protobuf(1,bytes,opt)
|
||||
|
||||
// scaleDown is scaling policy for scaling Down.
|
||||
// If not set, the default value is to allow to scale down to minReplicas pods, with a
|
||||
// 300 second stabilization window (i.e., the highest recommendation for
|
||||
// the last 300sec is used).
|
||||
// +optional
|
||||
scaleDown?: null | #HPAScalingRules @go(ScaleDown,*HPAScalingRules) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// ScalingPolicySelect is used to specify which policy should be used while scaling in a certain direction
|
||||
#ScalingPolicySelect: string // #enumScalingPolicySelect
|
||||
|
||||
#enumScalingPolicySelect:
|
||||
#MaxChangePolicySelect |
|
||||
#MinChangePolicySelect |
|
||||
#DisabledPolicySelect
|
||||
|
||||
// MaxChangePolicySelect selects the policy with the highest possible change.
|
||||
#MaxChangePolicySelect: #ScalingPolicySelect & "Max"
|
||||
|
||||
// MinChangePolicySelect selects the policy with the lowest possible change.
|
||||
#MinChangePolicySelect: #ScalingPolicySelect & "Min"
|
||||
|
||||
// DisabledPolicySelect disables the scaling in this direction.
|
||||
#DisabledPolicySelect: #ScalingPolicySelect & "Disabled"
|
||||
|
||||
// HPAScalingRules configures the scaling behavior for one direction.
|
||||
// These Rules are applied after calculating DesiredReplicas from metrics for the HPA.
|
||||
// They can limit the scaling velocity by specifying scaling policies.
|
||||
// They can prevent flapping by specifying the stabilization window, so that the
|
||||
// number of replicas is not set instantly, instead, the safest value from the stabilization
|
||||
// window is chosen.
|
||||
#HPAScalingRules: {
|
||||
// stabilizationWindowSeconds is the number of seconds for which past recommendations should be
|
||||
// considered while scaling up or scaling down.
|
||||
// StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour).
|
||||
// If not set, use the default values:
|
||||
// - For scale up: 0 (i.e. no stabilization is done).
|
||||
// - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
|
||||
// +optional
|
||||
stabilizationWindowSeconds?: null | int32 @go(StabilizationWindowSeconds,*int32) @protobuf(3,varint,opt)
|
||||
|
||||
// selectPolicy is used to specify which policy should be used.
|
||||
// If not set, the default value Max is used.
|
||||
// +optional
|
||||
selectPolicy?: null | #ScalingPolicySelect @go(SelectPolicy,*ScalingPolicySelect) @protobuf(1,bytes,opt)
|
||||
|
||||
// policies is a list of potential scaling polices which can be used during scaling.
|
||||
// At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
policies?: [...#HPAScalingPolicy] @go(Policies,[]HPAScalingPolicy) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// HPAScalingPolicyType is the type of the policy which could be used while making scaling decisions.
|
||||
#HPAScalingPolicyType: string // #enumHPAScalingPolicyType
|
||||
|
||||
#enumHPAScalingPolicyType:
|
||||
#PodsScalingPolicy |
|
||||
#PercentScalingPolicy
|
||||
|
||||
// PodsScalingPolicy is a policy used to specify a change in absolute number of pods.
|
||||
#PodsScalingPolicy: #HPAScalingPolicyType & "Pods"
|
||||
|
||||
// PercentScalingPolicy is a policy used to specify a relative amount of change with respect to
|
||||
// the current number of pods.
|
||||
#PercentScalingPolicy: #HPAScalingPolicyType & "Percent"
|
||||
|
||||
// HPAScalingPolicy is a single policy which must hold true for a specified past interval.
|
||||
#HPAScalingPolicy: {
|
||||
// type is used to specify the scaling policy.
|
||||
type: #HPAScalingPolicyType @go(Type) @protobuf(1,bytes,opt,casttype=HPAScalingPolicyType)
|
||||
|
||||
// value contains the amount of change which is permitted by the policy.
|
||||
// It must be greater than zero
|
||||
value: int32 @go(Value) @protobuf(2,varint,opt)
|
||||
|
||||
// periodSeconds specifies the window of time for which the policy should hold true.
|
||||
// PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
|
||||
periodSeconds: int32 @go(PeriodSeconds) @protobuf(3,varint,opt)
|
||||
}
|
||||
|
||||
// MetricSourceType indicates the type of metric.
|
||||
#MetricSourceType: string // #enumMetricSourceType
|
||||
|
||||
#enumMetricSourceType:
|
||||
#ObjectMetricSourceType |
|
||||
#PodsMetricSourceType |
|
||||
#ResourceMetricSourceType |
|
||||
#ContainerResourceMetricSourceType |
|
||||
#ExternalMetricSourceType
|
||||
|
||||
// ObjectMetricSourceType is a metric describing a kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricSourceType: #MetricSourceType & "Object"
|
||||
|
||||
// PodsMetricSourceType is a metric describing each pod in the current scale
|
||||
// target (for example, transactions-processed-per-second). The values
|
||||
// will be averaged together before being compared to the target value.
|
||||
#PodsMetricSourceType: #MetricSourceType & "Pods"
|
||||
|
||||
// ResourceMetricSourceType is a resource metric known to Kubernetes, as
|
||||
// specified in requests and limits, describing each pod in the current
|
||||
// scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics (the "pods" source).
|
||||
#ResourceMetricSourceType: #MetricSourceType & "Resource"
|
||||
|
||||
// ContainerResourceMetricSourceType is a resource metric known to Kubernetes, as
|
||||
// specified in requests and limits, describing a single container in each pod in the current
|
||||
// scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics (the "pods" source).
|
||||
#ContainerResourceMetricSourceType: #MetricSourceType & "ContainerResource"
|
||||
|
||||
// ExternalMetricSourceType is a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
#ExternalMetricSourceType: #MetricSourceType & "External"
|
||||
|
||||
// ObjectMetricSource indicates how to scale on a metric describing a
|
||||
// kubernetes object (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricSource: {
|
||||
// describedObject specifies the descriptions of a object,such as kind,name apiVersion
|
||||
describedObject: #CrossVersionObjectReference @go(DescribedObject) @protobuf(1,bytes)
|
||||
|
||||
// target specifies the target value for the given metric
|
||||
target: #MetricTarget @go(Target) @protobuf(2,bytes)
|
||||
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// PodsMetricSource indicates how to scale on a metric describing each pod in
|
||||
// the current scale target (for example, transactions-processed-per-second).
|
||||
// The values will be averaged together before being compared to the target
|
||||
// value.
|
||||
#PodsMetricSource: {
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(1,bytes)
|
||||
|
||||
// target specifies the target value for the given metric
|
||||
target: #MetricTarget @go(Target) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// ResourceMetricSource indicates how to scale on a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). The values will be averaged
|
||||
// together before being compared to the target. Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source. Only one "target" type
|
||||
// should be set.
|
||||
#ResourceMetricSource: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// target specifies the target value for the given metric
|
||||
target: #MetricTarget @go(Target) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// ContainerResourceMetricSource indicates how to scale on a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). The values will be averaged
|
||||
// together before being compared to the target. Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source. Only one "target" type
|
||||
// should be set.
|
||||
#ContainerResourceMetricSource: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// target specifies the target value for the given metric
|
||||
target: #MetricTarget @go(Target) @protobuf(2,bytes)
|
||||
|
||||
// container is the name of the container in the pods of the scaling target
|
||||
container: string @go(Container) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ExternalMetricSource indicates how to scale on a metric not associated with
|
||||
// any Kubernetes object (for example length of queue in cloud
|
||||
// messaging service, or QPS from loadbalancer running outside of cluster).
|
||||
#ExternalMetricSource: {
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(1,bytes)
|
||||
|
||||
// target specifies the target value for the given metric
|
||||
target: #MetricTarget @go(Target) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// MetricIdentifier defines the name and optionally selector for a metric
|
||||
#MetricIdentifier: {
|
||||
// name is the name of the given metric
|
||||
name: string @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
|
||||
// When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
|
||||
// When unset, just the metricName will be used to gather metrics.
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// MetricTarget defines the target value, average value, or average utilization of a specific metric
|
||||
#MetricTarget: {
|
||||
// type represents whether the metric type is Utilization, Value, or AverageValue
|
||||
type: #MetricTargetType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// value is the target value of the metric (as a quantity).
|
||||
// +optional
|
||||
value?: null | resource.#Quantity @go(Value,*resource.Quantity) @protobuf(2,bytes,opt)
|
||||
|
||||
// averageValue is the target value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
// +optional
|
||||
averageValue?: null | resource.#Quantity @go(AverageValue,*resource.Quantity) @protobuf(3,bytes,opt)
|
||||
|
||||
// averageUtilization is the target value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods.
|
||||
// Currently only valid for Resource metric source type
|
||||
// +optional
|
||||
averageUtilization?: null | int32 @go(AverageUtilization,*int32) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// MetricTargetType specifies the type of metric being targeted, and should be either
|
||||
// "Value", "AverageValue", or "Utilization"
|
||||
#MetricTargetType: string // #enumMetricTargetType
|
||||
|
||||
#enumMetricTargetType:
|
||||
#UtilizationMetricType |
|
||||
#ValueMetricType |
|
||||
#AverageValueMetricType
|
||||
|
||||
// UtilizationMetricType declares a MetricTarget is an AverageUtilization value
|
||||
#UtilizationMetricType: #MetricTargetType & "Utilization"
|
||||
|
||||
// ValueMetricType declares a MetricTarget is a raw value
|
||||
#ValueMetricType: #MetricTargetType & "Value"
|
||||
|
||||
// AverageValueMetricType declares a MetricTarget is an
|
||||
#AverageValueMetricType: #MetricTargetType & "AverageValue"
|
||||
|
||||
// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
|
||||
#HorizontalPodAutoscalerStatus: {
|
||||
// observedGeneration is the most recent generation observed by this autoscaler.
|
||||
// +optional
|
||||
observedGeneration?: null | int64 @go(ObservedGeneration,*int64) @protobuf(1,varint,opt)
|
||||
|
||||
// lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
|
||||
// used by the autoscaler to control how often the number of pods is changed.
|
||||
// +optional
|
||||
lastScaleTime?: null | metav1.#Time @go(LastScaleTime,*metav1.Time) @protobuf(2,bytes,opt)
|
||||
|
||||
// currentReplicas is current number of replicas of pods managed by this autoscaler,
|
||||
// as last seen by the autoscaler.
|
||||
// +optional
|
||||
currentReplicas?: int32 @go(CurrentReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// desiredReplicas is the desired number of replicas of pods managed by this autoscaler,
|
||||
// as last calculated by the autoscaler.
|
||||
desiredReplicas: int32 @go(DesiredReplicas) @protobuf(4,varint,opt)
|
||||
|
||||
// currentMetrics is the last read state of the metrics used by this autoscaler.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
currentMetrics?: [...#MetricStatus] @go(CurrentMetrics,[]MetricStatus) @protobuf(5,bytes,rep)
|
||||
|
||||
// conditions is the set of conditions required for this autoscaler to scale its target,
|
||||
// and indicates whether or not those conditions are met.
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
// +optional
|
||||
conditions?: [...#HorizontalPodAutoscalerCondition] @go(Conditions,[]HorizontalPodAutoscalerCondition) @protobuf(6,bytes,rep)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerConditionType are the valid conditions of
|
||||
// a HorizontalPodAutoscaler.
|
||||
#HorizontalPodAutoscalerConditionType: string // #enumHorizontalPodAutoscalerConditionType
|
||||
|
||||
#enumHorizontalPodAutoscalerConditionType:
|
||||
#ScalingActive |
|
||||
#AbleToScale |
|
||||
#ScalingLimited
|
||||
|
||||
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
||||
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
||||
#ScalingActive: #HorizontalPodAutoscalerConditionType & "ScalingActive"
|
||||
|
||||
// AbleToScale indicates a lack of transient issues which prevent scaling from occurring,
|
||||
// such as being in a backoff window, or being unable to access/update the target scale.
|
||||
#AbleToScale: #HorizontalPodAutoscalerConditionType & "AbleToScale"
|
||||
|
||||
// ScalingLimited indicates that the calculated scale based on metrics would be above or
|
||||
// below the range for the HPA, and has thus been capped.
|
||||
#ScalingLimited: #HorizontalPodAutoscalerConditionType & "ScalingLimited"
|
||||
|
||||
// HorizontalPodAutoscalerCondition describes the state of
|
||||
// a HorizontalPodAutoscaler at a certain point.
|
||||
#HorizontalPodAutoscalerCondition: {
|
||||
// type describes the current condition
|
||||
type: #HorizontalPodAutoscalerConditionType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// status is the status of the condition (True, False, Unknown)
|
||||
status: v1.#ConditionStatus @go(Status) @protobuf(2,bytes)
|
||||
|
||||
// lastTransitionTime is the last time the condition transitioned from
|
||||
// one status to another
|
||||
// +optional
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// reason is the reason for the condition's last transition.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// message is a human-readable explanation containing details about
|
||||
// the transition
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// MetricStatus describes the last-read state of a single metric.
|
||||
#MetricStatus: {
|
||||
// type is the type of metric source. It will be one of "ContainerResource", "External",
|
||||
// "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
|
||||
// Note: "ContainerResource" type is available on when the feature-gate
|
||||
// HPAContainerMetrics is enabled
|
||||
type: #MetricSourceType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// object refers to a metric describing a single kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
// +optional
|
||||
object?: null | #ObjectMetricStatus @go(Object,*ObjectMetricStatus) @protobuf(2,bytes,opt)
|
||||
|
||||
// pods refers to a metric describing each pod in the current scale target
|
||||
// (for example, transactions-processed-per-second). The values will be
|
||||
// averaged together before being compared to the target value.
|
||||
// +optional
|
||||
pods?: null | #PodsMetricStatus @go(Pods,*PodsMetricStatus) @protobuf(3,bytes,opt)
|
||||
|
||||
// resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
resource?: null | #ResourceMetricStatus @go(Resource,*ResourceMetricStatus) @protobuf(4,bytes,opt)
|
||||
|
||||
// container resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
containerResource?: null | #ContainerResourceMetricStatus @go(ContainerResource,*ContainerResourceMetricStatus) @protobuf(7,bytes,opt)
|
||||
|
||||
// external refers to a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
// +optional
|
||||
external?: null | #ExternalMetricStatus @go(External,*ExternalMetricStatus) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// ObjectMetricStatus indicates the current value of a metric describing a
|
||||
// kubernetes object (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricStatus: {
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(1,bytes)
|
||||
|
||||
// current contains the current value for the given metric
|
||||
current: #MetricValueStatus @go(Current) @protobuf(2,bytes)
|
||||
|
||||
// DescribedObject specifies the descriptions of a object,such as kind,name apiVersion
|
||||
describedObject: #CrossVersionObjectReference @go(DescribedObject) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// PodsMetricStatus indicates the current value of a metric describing each pod in
|
||||
// the current scale target (for example, transactions-processed-per-second).
|
||||
#PodsMetricStatus: {
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(1,bytes)
|
||||
|
||||
// current contains the current value for the given metric
|
||||
current: #MetricValueStatus @go(Current) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// ResourceMetricStatus indicates the current value of a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source.
|
||||
#ResourceMetricStatus: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// current contains the current value for the given metric
|
||||
current: #MetricValueStatus @go(Current) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// ContainerResourceMetricStatus indicates the current value of a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing a single container in each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source.
|
||||
#ContainerResourceMetricStatus: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// current contains the current value for the given metric
|
||||
current: #MetricValueStatus @go(Current) @protobuf(2,bytes)
|
||||
|
||||
// container is the name of the container in the pods of the scaling target
|
||||
container: string @go(Container) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ExternalMetricStatus indicates the current value of a global metric
|
||||
// not associated with any Kubernetes object.
|
||||
#ExternalMetricStatus: {
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(1,bytes)
|
||||
|
||||
// current contains the current value for the given metric
|
||||
current: #MetricValueStatus @go(Current) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// MetricValueStatus holds the current value for a metric
|
||||
#MetricValueStatus: {
|
||||
// value is the current value of the metric (as a quantity).
|
||||
// +optional
|
||||
value?: null | resource.#Quantity @go(Value,*resource.Quantity) @protobuf(1,bytes,opt)
|
||||
|
||||
// averageValue is the current value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
// +optional
|
||||
averageValue?: null | resource.#Quantity @go(AverageValue,*resource.Quantity) @protobuf(2,bytes,opt)
|
||||
|
||||
// currentAverageUtilization is the current value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods.
|
||||
// +optional
|
||||
averageUtilization?: null | int32 @go(AverageUtilization,*int32) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.
|
||||
#HorizontalPodAutoscalerList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// metadata is the standard list metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is the list of horizontal pod autoscaler objects.
|
||||
items: [...#HorizontalPodAutoscaler] @go(Items,[]HorizontalPodAutoscaler) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/autoscaling/v2beta1
|
||||
|
||||
package v2beta1
|
||||
|
||||
#GroupName: "autoscaling"
|
||||
@@ -0,0 +1,520 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/autoscaling/v2beta1
|
||||
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||
#CrossVersionObjectReference: {
|
||||
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: string @go(Kind) @protobuf(1,bytes,opt)
|
||||
|
||||
// Name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
name: string @go(Name) @protobuf(2,bytes,opt)
|
||||
|
||||
// API version of the referent
|
||||
// +optional
|
||||
apiVersion?: string @go(APIVersion) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
|
||||
#HorizontalPodAutoscalerSpec: {
|
||||
// scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
|
||||
// should be collected, as well as to actually change the replica count.
|
||||
scaleTargetRef: #CrossVersionObjectReference @go(ScaleTargetRef) @protobuf(1,bytes,opt)
|
||||
|
||||
// minReplicas is the lower limit for the number of replicas to which the autoscaler
|
||||
// can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
|
||||
// alpha feature gate HPAScaleToZero is enabled and at least one Object or External
|
||||
// metric is configured. Scaling is active as long as at least one metric value is
|
||||
// available.
|
||||
// +optional
|
||||
minReplicas?: null | int32 @go(MinReplicas,*int32) @protobuf(2,varint,opt)
|
||||
|
||||
// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
|
||||
// It cannot be less that minReplicas.
|
||||
maxReplicas: int32 @go(MaxReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// metrics contains the specifications for which to use to calculate the
|
||||
// desired replica count (the maximum replica count across all metrics will
|
||||
// be used). The desired replica count is calculated multiplying the
|
||||
// ratio between the target value and the current value by the current
|
||||
// number of pods. Ergo, metrics used must decrease as the pod count is
|
||||
// increased, and vice-versa. See the individual metric source types for
|
||||
// more information about how each type of metric must respond.
|
||||
// +optional
|
||||
metrics?: [...#MetricSpec] @go(Metrics,[]MetricSpec) @protobuf(4,bytes,rep)
|
||||
}
|
||||
|
||||
// MetricSourceType indicates the type of metric.
|
||||
#MetricSourceType: string // #enumMetricSourceType
|
||||
|
||||
#enumMetricSourceType:
|
||||
#ObjectMetricSourceType |
|
||||
#PodsMetricSourceType |
|
||||
#ResourceMetricSourceType |
|
||||
#ContainerResourceMetricSourceType |
|
||||
#ExternalMetricSourceType
|
||||
|
||||
// ObjectMetricSourceType is a metric describing a kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricSourceType: #MetricSourceType & "Object"
|
||||
|
||||
// PodsMetricSourceType is a metric describing each pod in the current scale
|
||||
// target (for example, transactions-processed-per-second). The values
|
||||
// will be averaged together before being compared to the target value.
|
||||
#PodsMetricSourceType: #MetricSourceType & "Pods"
|
||||
|
||||
// ResourceMetricSourceType is a resource metric known to Kubernetes, as
|
||||
// specified in requests and limits, describing each pod in the current
|
||||
// scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics (the "pods" source).
|
||||
#ResourceMetricSourceType: #MetricSourceType & "Resource"
|
||||
|
||||
// ContainerResourceMetricSourceType is a resource metric known to Kubernetes, as
|
||||
// specified in requests and limits, describing a single container in each pod in the current
|
||||
// scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics (the "pods" source).
|
||||
#ContainerResourceMetricSourceType: #MetricSourceType & "ContainerResource"
|
||||
|
||||
// ExternalMetricSourceType is a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
#ExternalMetricSourceType: #MetricSourceType & "External"
|
||||
|
||||
// MetricSpec specifies how to scale based on a single metric
|
||||
// (only `type` and one other matching field should be set at once).
|
||||
#MetricSpec: {
|
||||
// type is the type of metric source. It should be one of "ContainerResource",
|
||||
// "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object.
|
||||
// Note: "ContainerResource" type is available on when the feature-gate
|
||||
// HPAContainerMetrics is enabled
|
||||
type: #MetricSourceType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// object refers to a metric describing a single kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
// +optional
|
||||
object?: null | #ObjectMetricSource @go(Object,*ObjectMetricSource) @protobuf(2,bytes,opt)
|
||||
|
||||
// pods refers to a metric describing each pod in the current scale target
|
||||
// (for example, transactions-processed-per-second). The values will be
|
||||
// averaged together before being compared to the target value.
|
||||
// +optional
|
||||
pods?: null | #PodsMetricSource @go(Pods,*PodsMetricSource) @protobuf(3,bytes,opt)
|
||||
|
||||
// resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
resource?: null | #ResourceMetricSource @go(Resource,*ResourceMetricSource) @protobuf(4,bytes,opt)
|
||||
|
||||
// container resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing a single container in
|
||||
// each pod of the current scale target (e.g. CPU or memory). Such metrics are
|
||||
// built in to Kubernetes, and have special scaling options on top of those
|
||||
// available to normal per-pod metrics using the "pods" source.
|
||||
// This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
|
||||
// +optional
|
||||
containerResource?: null | #ContainerResourceMetricSource @go(ContainerResource,*ContainerResourceMetricSource) @protobuf(7,bytes,opt)
|
||||
|
||||
// external refers to a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
// +optional
|
||||
external?: null | #ExternalMetricSource @go(External,*ExternalMetricSource) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// ObjectMetricSource indicates how to scale on a metric describing a
|
||||
// kubernetes object (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricSource: {
|
||||
// target is the described Kubernetes object.
|
||||
target: #CrossVersionObjectReference @go(Target) @protobuf(1,bytes)
|
||||
|
||||
// metricName is the name of the metric in question.
|
||||
metricName: string @go(MetricName) @protobuf(2,bytes)
|
||||
|
||||
// targetValue is the target value of the metric (as a quantity).
|
||||
targetValue: resource.#Quantity @go(TargetValue) @protobuf(3,bytes)
|
||||
|
||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
|
||||
// When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
|
||||
// When unset, just the metricName will be used to gather metrics.
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(4,bytes)
|
||||
|
||||
// averageValue is the target value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
// +optional
|
||||
averageValue?: null | resource.#Quantity @go(AverageValue,*resource.Quantity) @protobuf(5,bytes)
|
||||
}
|
||||
|
||||
// PodsMetricSource indicates how to scale on a metric describing each pod in
|
||||
// the current scale target (for example, transactions-processed-per-second).
|
||||
// The values will be averaged together before being compared to the target
|
||||
// value.
|
||||
#PodsMetricSource: {
|
||||
// metricName is the name of the metric in question
|
||||
metricName: string @go(MetricName) @protobuf(1,bytes)
|
||||
|
||||
// targetAverageValue is the target value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
targetAverageValue: resource.#Quantity @go(TargetAverageValue) @protobuf(2,bytes)
|
||||
|
||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
|
||||
// When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping
|
||||
// When unset, just the metricName will be used to gather metrics.
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// ResourceMetricSource indicates how to scale on a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). The values will be averaged
|
||||
// together before being compared to the target. Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source. Only one "target" type
|
||||
// should be set.
|
||||
#ResourceMetricSource: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// targetAverageUtilization is the target value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods.
|
||||
// +optional
|
||||
targetAverageUtilization?: null | int32 @go(TargetAverageUtilization,*int32) @protobuf(2,varint,opt)
|
||||
|
||||
// targetAverageValue is the target value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
// +optional
|
||||
targetAverageValue?: null | resource.#Quantity @go(TargetAverageValue,*resource.Quantity) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ContainerResourceMetricSource indicates how to scale on a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). The values will be averaged
|
||||
// together before being compared to the target. Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source. Only one "target" type
|
||||
// should be set.
|
||||
#ContainerResourceMetricSource: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// targetAverageUtilization is the target value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods.
|
||||
// +optional
|
||||
targetAverageUtilization?: null | int32 @go(TargetAverageUtilization,*int32) @protobuf(2,varint,opt)
|
||||
|
||||
// targetAverageValue is the target value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
// +optional
|
||||
targetAverageValue?: null | resource.#Quantity @go(TargetAverageValue,*resource.Quantity) @protobuf(3,bytes,opt)
|
||||
|
||||
// container is the name of the container in the pods of the scaling target
|
||||
container: string @go(Container) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// ExternalMetricSource indicates how to scale on a metric not associated with
|
||||
// any Kubernetes object (for example length of queue in cloud
|
||||
// messaging service, or QPS from loadbalancer running outside of cluster).
|
||||
// Exactly one "target" type should be set.
|
||||
#ExternalMetricSource: {
|
||||
// metricName is the name of the metric in question.
|
||||
metricName: string @go(MetricName) @protobuf(1,bytes)
|
||||
|
||||
// metricSelector is used to identify a specific time series
|
||||
// within a given metric.
|
||||
// +optional
|
||||
metricSelector?: null | metav1.#LabelSelector @go(MetricSelector,*metav1.LabelSelector) @protobuf(2,bytes,opt)
|
||||
|
||||
// targetValue is the target value of the metric (as a quantity).
|
||||
// Mutually exclusive with TargetAverageValue.
|
||||
// +optional
|
||||
targetValue?: null | resource.#Quantity @go(TargetValue,*resource.Quantity) @protobuf(3,bytes,opt)
|
||||
|
||||
// targetAverageValue is the target per-pod value of global metric (as a quantity).
|
||||
// Mutually exclusive with TargetValue.
|
||||
// +optional
|
||||
targetAverageValue?: null | resource.#Quantity @go(TargetAverageValue,*resource.Quantity) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
|
||||
#HorizontalPodAutoscalerStatus: {
|
||||
// observedGeneration is the most recent generation observed by this autoscaler.
|
||||
// +optional
|
||||
observedGeneration?: null | int64 @go(ObservedGeneration,*int64) @protobuf(1,varint,opt)
|
||||
|
||||
// lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
|
||||
// used by the autoscaler to control how often the number of pods is changed.
|
||||
// +optional
|
||||
lastScaleTime?: null | metav1.#Time @go(LastScaleTime,*metav1.Time) @protobuf(2,bytes,opt)
|
||||
|
||||
// currentReplicas is current number of replicas of pods managed by this autoscaler,
|
||||
// as last seen by the autoscaler.
|
||||
currentReplicas: int32 @go(CurrentReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// desiredReplicas is the desired number of replicas of pods managed by this autoscaler,
|
||||
// as last calculated by the autoscaler.
|
||||
desiredReplicas: int32 @go(DesiredReplicas) @protobuf(4,varint,opt)
|
||||
|
||||
// currentMetrics is the last read state of the metrics used by this autoscaler.
|
||||
// +optional
|
||||
currentMetrics?: [...#MetricStatus] @go(CurrentMetrics,[]MetricStatus) @protobuf(5,bytes,rep)
|
||||
|
||||
// conditions is the set of conditions required for this autoscaler to scale its target,
|
||||
// and indicates whether or not those conditions are met.
|
||||
// +optional
|
||||
conditions?: [...#HorizontalPodAutoscalerCondition] @go(Conditions,[]HorizontalPodAutoscalerCondition) @protobuf(6,bytes,rep)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerConditionType are the valid conditions of
|
||||
// a HorizontalPodAutoscaler.
|
||||
#HorizontalPodAutoscalerConditionType: string // #enumHorizontalPodAutoscalerConditionType
|
||||
|
||||
#enumHorizontalPodAutoscalerConditionType:
|
||||
#ScalingActive |
|
||||
#AbleToScale |
|
||||
#ScalingLimited
|
||||
|
||||
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
||||
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
||||
#ScalingActive: #HorizontalPodAutoscalerConditionType & "ScalingActive"
|
||||
|
||||
// AbleToScale indicates a lack of transient issues which prevent scaling from occurring,
|
||||
// such as being in a backoff window, or being unable to access/update the target scale.
|
||||
#AbleToScale: #HorizontalPodAutoscalerConditionType & "AbleToScale"
|
||||
|
||||
// ScalingLimited indicates that the calculated scale based on metrics would be above or
|
||||
// below the range for the HPA, and has thus been capped.
|
||||
#ScalingLimited: #HorizontalPodAutoscalerConditionType & "ScalingLimited"
|
||||
|
||||
// HorizontalPodAutoscalerCondition describes the state of
|
||||
// a HorizontalPodAutoscaler at a certain point.
|
||||
#HorizontalPodAutoscalerCondition: {
|
||||
// type describes the current condition
|
||||
type: #HorizontalPodAutoscalerConditionType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// status is the status of the condition (True, False, Unknown)
|
||||
status: v1.#ConditionStatus @go(Status) @protobuf(2,bytes)
|
||||
|
||||
// lastTransitionTime is the last time the condition transitioned from
|
||||
// one status to another
|
||||
// +optional
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// reason is the reason for the condition's last transition.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// message is a human-readable explanation containing details about
|
||||
// the transition
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// MetricStatus describes the last-read state of a single metric.
|
||||
#MetricStatus: {
|
||||
// type is the type of metric source. It will be one of "ContainerResource",
|
||||
// "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
|
||||
// Note: "ContainerResource" type is available on when the feature-gate
|
||||
// HPAContainerMetrics is enabled
|
||||
type: #MetricSourceType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// object refers to a metric describing a single kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
// +optional
|
||||
object?: null | #ObjectMetricStatus @go(Object,*ObjectMetricStatus) @protobuf(2,bytes,opt)
|
||||
|
||||
// pods refers to a metric describing each pod in the current scale target
|
||||
// (for example, transactions-processed-per-second). The values will be
|
||||
// averaged together before being compared to the target value.
|
||||
// +optional
|
||||
pods?: null | #PodsMetricStatus @go(Pods,*PodsMetricStatus) @protobuf(3,bytes,opt)
|
||||
|
||||
// resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
resource?: null | #ResourceMetricStatus @go(Resource,*ResourceMetricStatus) @protobuf(4,bytes,opt)
|
||||
|
||||
// container resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
containerResource?: null | #ContainerResourceMetricStatus @go(ContainerResource,*ContainerResourceMetricStatus) @protobuf(7,bytes,opt)
|
||||
|
||||
// external refers to a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
// +optional
|
||||
external?: null | #ExternalMetricStatus @go(External,*ExternalMetricStatus) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// ObjectMetricStatus indicates the current value of a metric describing a
|
||||
// kubernetes object (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricStatus: {
|
||||
// target is the described Kubernetes object.
|
||||
target: #CrossVersionObjectReference @go(Target) @protobuf(1,bytes)
|
||||
|
||||
// metricName is the name of the metric in question.
|
||||
metricName: string @go(MetricName) @protobuf(2,bytes)
|
||||
|
||||
// currentValue is the current value of the metric (as a quantity).
|
||||
currentValue: resource.#Quantity @go(CurrentValue) @protobuf(3,bytes)
|
||||
|
||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
|
||||
// When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
|
||||
// When unset, just the metricName will be used to gather metrics.
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(4,bytes)
|
||||
|
||||
// averageValue is the current value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
// +optional
|
||||
averageValue?: null | resource.#Quantity @go(AverageValue,*resource.Quantity) @protobuf(5,bytes)
|
||||
}
|
||||
|
||||
// PodsMetricStatus indicates the current value of a metric describing each pod in
|
||||
// the current scale target (for example, transactions-processed-per-second).
|
||||
#PodsMetricStatus: {
|
||||
// metricName is the name of the metric in question
|
||||
metricName: string @go(MetricName) @protobuf(1,bytes)
|
||||
|
||||
// currentAverageValue is the current value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
currentAverageValue: resource.#Quantity @go(CurrentAverageValue) @protobuf(2,bytes)
|
||||
|
||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
|
||||
// When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
|
||||
// When unset, just the metricName will be used to gather metrics.
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// ResourceMetricStatus indicates the current value of a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source.
|
||||
#ResourceMetricStatus: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// currentAverageUtilization is the current value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods. It will only be
|
||||
// present if `targetAverageValue` was set in the corresponding metric
|
||||
// specification.
|
||||
// +optional
|
||||
currentAverageUtilization?: null | int32 @go(CurrentAverageUtilization,*int32) @protobuf(2,bytes,opt)
|
||||
|
||||
// currentAverageValue is the current value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
// It will always be set, regardless of the corresponding metric specification.
|
||||
currentAverageValue: resource.#Quantity @go(CurrentAverageValue) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// ContainerResourceMetricStatus indicates the current value of a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing a single container in each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source.
|
||||
#ContainerResourceMetricStatus: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// currentAverageUtilization is the current value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods. It will only be
|
||||
// present if `targetAverageValue` was set in the corresponding metric
|
||||
// specification.
|
||||
// +optional
|
||||
currentAverageUtilization?: null | int32 @go(CurrentAverageUtilization,*int32) @protobuf(2,bytes,opt)
|
||||
|
||||
// currentAverageValue is the current value of the average of the
|
||||
// resource metric across all relevant pods, as a raw value (instead of as
|
||||
// a percentage of the request), similar to the "pods" metric source type.
|
||||
// It will always be set, regardless of the corresponding metric specification.
|
||||
currentAverageValue: resource.#Quantity @go(CurrentAverageValue) @protobuf(3,bytes)
|
||||
|
||||
// container is the name of the container in the pods of the scaling target
|
||||
container: string @go(Container) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// ExternalMetricStatus indicates the current value of a global metric
|
||||
// not associated with any Kubernetes object.
|
||||
#ExternalMetricStatus: {
|
||||
// metricName is the name of a metric used for autoscaling in
|
||||
// metric system.
|
||||
metricName: string @go(MetricName) @protobuf(1,bytes)
|
||||
|
||||
// metricSelector is used to identify a specific time series
|
||||
// within a given metric.
|
||||
// +optional
|
||||
metricSelector?: null | metav1.#LabelSelector @go(MetricSelector,*metav1.LabelSelector) @protobuf(2,bytes,opt)
|
||||
|
||||
// currentValue is the current value of the metric (as a quantity)
|
||||
currentValue: resource.#Quantity @go(CurrentValue) @protobuf(3,bytes)
|
||||
|
||||
// currentAverageValue is the current value of metric averaged over autoscaled pods.
|
||||
// +optional
|
||||
currentAverageValue?: null | resource.#Quantity @go(CurrentAverageValue,*resource.Quantity) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscaler is the configuration for a horizontal pod
|
||||
// autoscaler, which automatically manages the replica count of any resource
|
||||
// implementing the scale subresource based on the metrics specified.
|
||||
#HorizontalPodAutoscaler: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// metadata is the standard object metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// spec is the specification for the behaviour of the autoscaler.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||
// +optional
|
||||
spec?: #HorizontalPodAutoscalerSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// status is the current information about the autoscaler.
|
||||
// +optional
|
||||
status?: #HorizontalPodAutoscalerStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.
|
||||
#HorizontalPodAutoscalerList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// metadata is the standard list metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is the list of horizontal pod autoscaler objects.
|
||||
items: [...#HorizontalPodAutoscaler] @go(Items,[]HorizontalPodAutoscaler) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/autoscaling/v2beta2
|
||||
|
||||
package v2beta2
|
||||
|
||||
#GroupName: "autoscaling"
|
||||
@@ -0,0 +1,586 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/autoscaling/v2beta2
|
||||
|
||||
package v2beta2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscaler is the configuration for a horizontal pod
|
||||
// autoscaler, which automatically manages the replica count of any resource
|
||||
// implementing the scale subresource based on the metrics specified.
|
||||
#HorizontalPodAutoscaler: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// metadata is the standard object metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// spec is the specification for the behaviour of the autoscaler.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||
// +optional
|
||||
spec?: #HorizontalPodAutoscalerSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// status is the current information about the autoscaler.
|
||||
// +optional
|
||||
status?: #HorizontalPodAutoscalerStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
|
||||
#HorizontalPodAutoscalerSpec: {
|
||||
// scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
|
||||
// should be collected, as well as to actually change the replica count.
|
||||
scaleTargetRef: #CrossVersionObjectReference @go(ScaleTargetRef) @protobuf(1,bytes,opt)
|
||||
|
||||
// minReplicas is the lower limit for the number of replicas to which the autoscaler
|
||||
// can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the
|
||||
// alpha feature gate HPAScaleToZero is enabled and at least one Object or External
|
||||
// metric is configured. Scaling is active as long as at least one metric value is
|
||||
// available.
|
||||
// +optional
|
||||
minReplicas?: null | int32 @go(MinReplicas,*int32) @protobuf(2,varint,opt)
|
||||
|
||||
// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
|
||||
// It cannot be less that minReplicas.
|
||||
maxReplicas: int32 @go(MaxReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// metrics contains the specifications for which to use to calculate the
|
||||
// desired replica count (the maximum replica count across all metrics will
|
||||
// be used). The desired replica count is calculated multiplying the
|
||||
// ratio between the target value and the current value by the current
|
||||
// number of pods. Ergo, metrics used must decrease as the pod count is
|
||||
// increased, and vice-versa. See the individual metric source types for
|
||||
// more information about how each type of metric must respond.
|
||||
// If not set, the default metric will be set to 80% average CPU utilization.
|
||||
// +optional
|
||||
metrics?: [...#MetricSpec] @go(Metrics,[]MetricSpec) @protobuf(4,bytes,rep)
|
||||
|
||||
// behavior configures the scaling behavior of the target
|
||||
// in both Up and Down directions (scaleUp and scaleDown fields respectively).
|
||||
// If not set, the default HPAScalingRules for scale up and scale down are used.
|
||||
// +optional
|
||||
behavior?: null | #HorizontalPodAutoscalerBehavior @go(Behavior,*HorizontalPodAutoscalerBehavior) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||
#CrossVersionObjectReference: {
|
||||
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: string @go(Kind) @protobuf(1,bytes,opt)
|
||||
|
||||
// name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
name: string @go(Name) @protobuf(2,bytes,opt)
|
||||
|
||||
// apiVersion is the API version of the referent
|
||||
// +optional
|
||||
apiVersion?: string @go(APIVersion) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// MetricSpec specifies how to scale based on a single metric
|
||||
// (only `type` and one other matching field should be set at once).
|
||||
#MetricSpec: {
|
||||
// type is the type of metric source. It should be one of "ContainerResource", "External",
|
||||
// "Object", "Pods" or "Resource", each mapping to a matching field in the object.
|
||||
// Note: "ContainerResource" type is available on when the feature-gate
|
||||
// HPAContainerMetrics is enabled
|
||||
type: #MetricSourceType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// object refers to a metric describing a single kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
// +optional
|
||||
object?: null | #ObjectMetricSource @go(Object,*ObjectMetricSource) @protobuf(2,bytes,opt)
|
||||
|
||||
// pods refers to a metric describing each pod in the current scale target
|
||||
// (for example, transactions-processed-per-second). The values will be
|
||||
// averaged together before being compared to the target value.
|
||||
// +optional
|
||||
pods?: null | #PodsMetricSource @go(Pods,*PodsMetricSource) @protobuf(3,bytes,opt)
|
||||
|
||||
// resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
resource?: null | #ResourceMetricSource @go(Resource,*ResourceMetricSource) @protobuf(4,bytes,opt)
|
||||
|
||||
// container resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing a single container in
|
||||
// each pod of the current scale target (e.g. CPU or memory). Such metrics are
|
||||
// built in to Kubernetes, and have special scaling options on top of those
|
||||
// available to normal per-pod metrics using the "pods" source.
|
||||
// This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
|
||||
// +optional
|
||||
containerResource?: null | #ContainerResourceMetricSource @go(ContainerResource,*ContainerResourceMetricSource) @protobuf(7,bytes,opt)
|
||||
|
||||
// external refers to a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
// +optional
|
||||
external?: null | #ExternalMetricSource @go(External,*ExternalMetricSource) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerBehavior configures the scaling behavior of the target
|
||||
// in both Up and Down directions (scaleUp and scaleDown fields respectively).
|
||||
#HorizontalPodAutoscalerBehavior: {
|
||||
// scaleUp is scaling policy for scaling Up.
|
||||
// If not set, the default value is the higher of:
|
||||
// * increase no more than 4 pods per 60 seconds
|
||||
// * double the number of pods per 60 seconds
|
||||
// No stabilization is used.
|
||||
// +optional
|
||||
scaleUp?: null | #HPAScalingRules @go(ScaleUp,*HPAScalingRules) @protobuf(1,bytes,opt)
|
||||
|
||||
// scaleDown is scaling policy for scaling Down.
|
||||
// If not set, the default value is to allow to scale down to minReplicas pods, with a
|
||||
// 300 second stabilization window (i.e., the highest recommendation for
|
||||
// the last 300sec is used).
|
||||
// +optional
|
||||
scaleDown?: null | #HPAScalingRules @go(ScaleDown,*HPAScalingRules) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// ScalingPolicySelect is used to specify which policy should be used while scaling in a certain direction
|
||||
#ScalingPolicySelect: string // #enumScalingPolicySelect
|
||||
|
||||
#enumScalingPolicySelect:
|
||||
#MaxPolicySelect |
|
||||
#MinPolicySelect |
|
||||
#DisabledPolicySelect
|
||||
|
||||
// MaxPolicySelect selects the policy with the highest possible change.
|
||||
#MaxPolicySelect: #ScalingPolicySelect & "Max"
|
||||
|
||||
// MinPolicySelect selects the policy with the lowest possible change.
|
||||
#MinPolicySelect: #ScalingPolicySelect & "Min"
|
||||
|
||||
// DisabledPolicySelect disables the scaling in this direction.
|
||||
#DisabledPolicySelect: #ScalingPolicySelect & "Disabled"
|
||||
|
||||
// HPAScalingRules configures the scaling behavior for one direction.
|
||||
// These Rules are applied after calculating DesiredReplicas from metrics for the HPA.
|
||||
// They can limit the scaling velocity by specifying scaling policies.
|
||||
// They can prevent flapping by specifying the stabilization window, so that the
|
||||
// number of replicas is not set instantly, instead, the safest value from the stabilization
|
||||
// window is chosen.
|
||||
#HPAScalingRules: {
|
||||
// stabilizationWindowSeconds is the number of seconds for which past recommendations should be
|
||||
// considered while scaling up or scaling down.
|
||||
// StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour).
|
||||
// If not set, use the default values:
|
||||
// - For scale up: 0 (i.e. no stabilization is done).
|
||||
// - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
|
||||
// +optional
|
||||
stabilizationWindowSeconds?: null | int32 @go(StabilizationWindowSeconds,*int32) @protobuf(3,varint,opt)
|
||||
|
||||
// selectPolicy is used to specify which policy should be used.
|
||||
// If not set, the default value MaxPolicySelect is used.
|
||||
// +optional
|
||||
selectPolicy?: null | #ScalingPolicySelect @go(SelectPolicy,*ScalingPolicySelect) @protobuf(1,bytes,opt)
|
||||
|
||||
// policies is a list of potential scaling polices which can be used during scaling.
|
||||
// At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
|
||||
// +optional
|
||||
policies?: [...#HPAScalingPolicy] @go(Policies,[]HPAScalingPolicy) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// HPAScalingPolicyType is the type of the policy which could be used while making scaling decisions.
|
||||
#HPAScalingPolicyType: string // #enumHPAScalingPolicyType
|
||||
|
||||
#enumHPAScalingPolicyType:
|
||||
#PodsScalingPolicy |
|
||||
#PercentScalingPolicy
|
||||
|
||||
// PodsScalingPolicy is a policy used to specify a change in absolute number of pods.
|
||||
#PodsScalingPolicy: #HPAScalingPolicyType & "Pods"
|
||||
|
||||
// PercentScalingPolicy is a policy used to specify a relative amount of change with respect to
|
||||
// the current number of pods.
|
||||
#PercentScalingPolicy: #HPAScalingPolicyType & "Percent"
|
||||
|
||||
// HPAScalingPolicy is a single policy which must hold true for a specified past interval.
|
||||
#HPAScalingPolicy: {
|
||||
// type is used to specify the scaling policy.
|
||||
type: #HPAScalingPolicyType @go(Type) @protobuf(1,bytes,opt,casttype=HPAScalingPolicyType)
|
||||
|
||||
// value contains the amount of change which is permitted by the policy.
|
||||
// It must be greater than zero
|
||||
value: int32 @go(Value) @protobuf(2,varint,opt)
|
||||
|
||||
// periodSeconds specifies the window of time for which the policy should hold true.
|
||||
// PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
|
||||
periodSeconds: int32 @go(PeriodSeconds) @protobuf(3,varint,opt)
|
||||
}
|
||||
|
||||
// MetricSourceType indicates the type of metric.
|
||||
#MetricSourceType: string // #enumMetricSourceType
|
||||
|
||||
#enumMetricSourceType:
|
||||
#ObjectMetricSourceType |
|
||||
#PodsMetricSourceType |
|
||||
#ResourceMetricSourceType |
|
||||
#ContainerResourceMetricSourceType |
|
||||
#ExternalMetricSourceType
|
||||
|
||||
// ObjectMetricSourceType is a metric describing a kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricSourceType: #MetricSourceType & "Object"
|
||||
|
||||
// PodsMetricSourceType is a metric describing each pod in the current scale
|
||||
// target (for example, transactions-processed-per-second). The values
|
||||
// will be averaged together before being compared to the target value.
|
||||
#PodsMetricSourceType: #MetricSourceType & "Pods"
|
||||
|
||||
// ResourceMetricSourceType is a resource metric known to Kubernetes, as
|
||||
// specified in requests and limits, describing each pod in the current
|
||||
// scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics (the "pods" source).
|
||||
#ResourceMetricSourceType: #MetricSourceType & "Resource"
|
||||
|
||||
// ContainerResourceMetricSourceType is a resource metric known to Kubernetes, as
|
||||
// specified in requests and limits, describing a single container in each pod in the current
|
||||
// scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics (the "pods" source).
|
||||
#ContainerResourceMetricSourceType: #MetricSourceType & "ContainerResource"
|
||||
|
||||
// ExternalMetricSourceType is a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
#ExternalMetricSourceType: #MetricSourceType & "External"
|
||||
|
||||
// ObjectMetricSource indicates how to scale on a metric describing a
|
||||
// kubernetes object (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricSource: {
|
||||
describedObject: #CrossVersionObjectReference @go(DescribedObject) @protobuf(1,bytes)
|
||||
|
||||
// target specifies the target value for the given metric
|
||||
target: #MetricTarget @go(Target) @protobuf(2,bytes)
|
||||
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// PodsMetricSource indicates how to scale on a metric describing each pod in
|
||||
// the current scale target (for example, transactions-processed-per-second).
|
||||
// The values will be averaged together before being compared to the target
|
||||
// value.
|
||||
#PodsMetricSource: {
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(1,bytes)
|
||||
|
||||
// target specifies the target value for the given metric
|
||||
target: #MetricTarget @go(Target) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// ResourceMetricSource indicates how to scale on a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). The values will be averaged
|
||||
// together before being compared to the target. Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source. Only one "target" type
|
||||
// should be set.
|
||||
#ResourceMetricSource: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// target specifies the target value for the given metric
|
||||
target: #MetricTarget @go(Target) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// ContainerResourceMetricSource indicates how to scale on a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). The values will be averaged
|
||||
// together before being compared to the target. Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source. Only one "target" type
|
||||
// should be set.
|
||||
#ContainerResourceMetricSource: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// target specifies the target value for the given metric
|
||||
target: #MetricTarget @go(Target) @protobuf(2,bytes)
|
||||
|
||||
// container is the name of the container in the pods of the scaling target
|
||||
container: string @go(Container) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ExternalMetricSource indicates how to scale on a metric not associated with
|
||||
// any Kubernetes object (for example length of queue in cloud
|
||||
// messaging service, or QPS from loadbalancer running outside of cluster).
|
||||
#ExternalMetricSource: {
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(1,bytes)
|
||||
|
||||
// target specifies the target value for the given metric
|
||||
target: #MetricTarget @go(Target) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// MetricIdentifier defines the name and optionally selector for a metric
|
||||
#MetricIdentifier: {
|
||||
// name is the name of the given metric
|
||||
name: string @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
|
||||
// When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
|
||||
// When unset, just the metricName will be used to gather metrics.
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// MetricTarget defines the target value, average value, or average utilization of a specific metric
|
||||
#MetricTarget: {
|
||||
// type represents whether the metric type is Utilization, Value, or AverageValue
|
||||
type: #MetricTargetType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// value is the target value of the metric (as a quantity).
|
||||
// +optional
|
||||
value?: null | resource.#Quantity @go(Value,*resource.Quantity) @protobuf(2,bytes,opt)
|
||||
|
||||
// averageValue is the target value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
// +optional
|
||||
averageValue?: null | resource.#Quantity @go(AverageValue,*resource.Quantity) @protobuf(3,bytes,opt)
|
||||
|
||||
// averageUtilization is the target value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods.
|
||||
// Currently only valid for Resource metric source type
|
||||
// +optional
|
||||
averageUtilization?: null | int32 @go(AverageUtilization,*int32) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// MetricTargetType specifies the type of metric being targeted, and should be either
|
||||
// "Value", "AverageValue", or "Utilization"
|
||||
#MetricTargetType: string // #enumMetricTargetType
|
||||
|
||||
#enumMetricTargetType:
|
||||
#UtilizationMetricType |
|
||||
#ValueMetricType |
|
||||
#AverageValueMetricType
|
||||
|
||||
// UtilizationMetricType declares a MetricTarget is an AverageUtilization value
|
||||
#UtilizationMetricType: #MetricTargetType & "Utilization"
|
||||
|
||||
// ValueMetricType declares a MetricTarget is a raw value
|
||||
#ValueMetricType: #MetricTargetType & "Value"
|
||||
|
||||
// AverageValueMetricType declares a MetricTarget is an
|
||||
#AverageValueMetricType: #MetricTargetType & "AverageValue"
|
||||
|
||||
// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.
|
||||
#HorizontalPodAutoscalerStatus: {
|
||||
// observedGeneration is the most recent generation observed by this autoscaler.
|
||||
// +optional
|
||||
observedGeneration?: null | int64 @go(ObservedGeneration,*int64) @protobuf(1,varint,opt)
|
||||
|
||||
// lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,
|
||||
// used by the autoscaler to control how often the number of pods is changed.
|
||||
// +optional
|
||||
lastScaleTime?: null | metav1.#Time @go(LastScaleTime,*metav1.Time) @protobuf(2,bytes,opt)
|
||||
|
||||
// currentReplicas is current number of replicas of pods managed by this autoscaler,
|
||||
// as last seen by the autoscaler.
|
||||
currentReplicas: int32 @go(CurrentReplicas) @protobuf(3,varint,opt)
|
||||
|
||||
// desiredReplicas is the desired number of replicas of pods managed by this autoscaler,
|
||||
// as last calculated by the autoscaler.
|
||||
desiredReplicas: int32 @go(DesiredReplicas) @protobuf(4,varint,opt)
|
||||
|
||||
// currentMetrics is the last read state of the metrics used by this autoscaler.
|
||||
// +optional
|
||||
currentMetrics?: [...#MetricStatus] @go(CurrentMetrics,[]MetricStatus) @protobuf(5,bytes,rep)
|
||||
|
||||
// conditions is the set of conditions required for this autoscaler to scale its target,
|
||||
// and indicates whether or not those conditions are met.
|
||||
// +optional
|
||||
conditions?: [...#HorizontalPodAutoscalerCondition] @go(Conditions,[]HorizontalPodAutoscalerCondition) @protobuf(6,bytes,rep)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerConditionType are the valid conditions of
|
||||
// a HorizontalPodAutoscaler.
|
||||
#HorizontalPodAutoscalerConditionType: string // #enumHorizontalPodAutoscalerConditionType
|
||||
|
||||
#enumHorizontalPodAutoscalerConditionType:
|
||||
#ScalingActive |
|
||||
#AbleToScale |
|
||||
#ScalingLimited
|
||||
|
||||
// ScalingActive indicates that the HPA controller is able to scale if necessary:
|
||||
// it's correctly configured, can fetch the desired metrics, and isn't disabled.
|
||||
#ScalingActive: #HorizontalPodAutoscalerConditionType & "ScalingActive"
|
||||
|
||||
// AbleToScale indicates a lack of transient issues which prevent scaling from occurring,
|
||||
// such as being in a backoff window, or being unable to access/update the target scale.
|
||||
#AbleToScale: #HorizontalPodAutoscalerConditionType & "AbleToScale"
|
||||
|
||||
// ScalingLimited indicates that the calculated scale based on metrics would be above or
|
||||
// below the range for the HPA, and has thus been capped.
|
||||
#ScalingLimited: #HorizontalPodAutoscalerConditionType & "ScalingLimited"
|
||||
|
||||
// HorizontalPodAutoscalerCondition describes the state of
|
||||
// a HorizontalPodAutoscaler at a certain point.
|
||||
#HorizontalPodAutoscalerCondition: {
|
||||
// type describes the current condition
|
||||
type: #HorizontalPodAutoscalerConditionType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// status is the status of the condition (True, False, Unknown)
|
||||
status: v1.#ConditionStatus @go(Status) @protobuf(2,bytes)
|
||||
|
||||
// lastTransitionTime is the last time the condition transitioned from
|
||||
// one status to another
|
||||
// +optional
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// reason is the reason for the condition's last transition.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// message is a human-readable explanation containing details about
|
||||
// the transition
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// MetricStatus describes the last-read state of a single metric.
|
||||
#MetricStatus: {
|
||||
// type is the type of metric source. It will be one of "ContainerResource", "External",
|
||||
// "Object", "Pods" or "Resource", each corresponds to a matching field in the object.
|
||||
// Note: "ContainerResource" type is available on when the feature-gate
|
||||
// HPAContainerMetrics is enabled
|
||||
type: #MetricSourceType @go(Type) @protobuf(1,bytes)
|
||||
|
||||
// object refers to a metric describing a single kubernetes object
|
||||
// (for example, hits-per-second on an Ingress object).
|
||||
// +optional
|
||||
object?: null | #ObjectMetricStatus @go(Object,*ObjectMetricStatus) @protobuf(2,bytes,opt)
|
||||
|
||||
// pods refers to a metric describing each pod in the current scale target
|
||||
// (for example, transactions-processed-per-second). The values will be
|
||||
// averaged together before being compared to the target value.
|
||||
// +optional
|
||||
pods?: null | #PodsMetricStatus @go(Pods,*PodsMetricStatus) @protobuf(3,bytes,opt)
|
||||
|
||||
// resource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
resource?: null | #ResourceMetricStatus @go(Resource,*ResourceMetricStatus) @protobuf(4,bytes,opt)
|
||||
|
||||
// containerResource refers to a resource metric (such as those specified in
|
||||
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available
|
||||
// to normal per-pod metrics using the "pods" source.
|
||||
// +optional
|
||||
containerResource?: null | #ContainerResourceMetricStatus @go(ContainerResource,*ContainerResourceMetricStatus) @protobuf(7,bytes,opt)
|
||||
|
||||
// external refers to a global metric that is not associated
|
||||
// with any Kubernetes object. It allows autoscaling based on information
|
||||
// coming from components running outside of cluster
|
||||
// (for example length of queue in cloud messaging service, or
|
||||
// QPS from loadbalancer running outside of cluster).
|
||||
// +optional
|
||||
external?: null | #ExternalMetricStatus @go(External,*ExternalMetricStatus) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// ObjectMetricStatus indicates the current value of a metric describing a
|
||||
// kubernetes object (for example, hits-per-second on an Ingress object).
|
||||
#ObjectMetricStatus: {
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(1,bytes)
|
||||
|
||||
// current contains the current value for the given metric
|
||||
current: #MetricValueStatus @go(Current) @protobuf(2,bytes)
|
||||
describedObject: #CrossVersionObjectReference @go(DescribedObject) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// PodsMetricStatus indicates the current value of a metric describing each pod in
|
||||
// the current scale target (for example, transactions-processed-per-second).
|
||||
#PodsMetricStatus: {
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(1,bytes)
|
||||
|
||||
// current contains the current value for the given metric
|
||||
current: #MetricValueStatus @go(Current) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// ResourceMetricStatus indicates the current value of a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source.
|
||||
#ResourceMetricStatus: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// current contains the current value for the given metric
|
||||
current: #MetricValueStatus @go(Current) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// ContainerResourceMetricStatus indicates the current value of a resource metric known to
|
||||
// Kubernetes, as specified in requests and limits, describing a single container in each pod in the
|
||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||
// Kubernetes, and have special scaling options on top of those available to
|
||||
// normal per-pod metrics using the "pods" source.
|
||||
#ContainerResourceMetricStatus: {
|
||||
// name is the name of the resource in question.
|
||||
name: v1.#ResourceName @go(Name) @protobuf(1,bytes)
|
||||
|
||||
// current contains the current value for the given metric
|
||||
current: #MetricValueStatus @go(Current) @protobuf(2,bytes)
|
||||
|
||||
// container is the name of the container in the pods of the scaling target
|
||||
container: string @go(Container) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// ExternalMetricStatus indicates the current value of a global metric
|
||||
// not associated with any Kubernetes object.
|
||||
#ExternalMetricStatus: {
|
||||
// metric identifies the target metric by name and selector
|
||||
metric: #MetricIdentifier @go(Metric) @protobuf(1,bytes)
|
||||
|
||||
// current contains the current value for the given metric
|
||||
current: #MetricValueStatus @go(Current) @protobuf(2,bytes)
|
||||
}
|
||||
|
||||
// MetricValueStatus holds the current value for a metric
|
||||
#MetricValueStatus: {
|
||||
// value is the current value of the metric (as a quantity).
|
||||
// +optional
|
||||
value?: null | resource.#Quantity @go(Value,*resource.Quantity) @protobuf(1,bytes,opt)
|
||||
|
||||
// averageValue is the current value of the average of the
|
||||
// metric across all relevant pods (as a quantity)
|
||||
// +optional
|
||||
averageValue?: null | resource.#Quantity @go(AverageValue,*resource.Quantity) @protobuf(2,bytes,opt)
|
||||
|
||||
// averageUtilization is the current value of the average of the
|
||||
// resource metric across all relevant pods, represented as a percentage of
|
||||
// the requested value of the resource for the pods.
|
||||
// +optional
|
||||
averageUtilization?: null | int32 @go(AverageUtilization,*int32) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.
|
||||
#HorizontalPodAutoscalerList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// metadata is the standard list metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is the list of horizontal pod autoscaler objects.
|
||||
items: [...#HorizontalPodAutoscaler] @go(Items,[]HorizontalPodAutoscaler) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/batch/v1
|
||||
|
||||
package v1
|
||||
|
||||
#GroupName: "batch"
|
||||
713
docs/examples/cue.mod/gen/k8s.io/api/batch/v1/types_go_gen.cue
Normal file
713
docs/examples/cue.mod/gen/k8s.io/api/batch/v1/types_go_gen.cue
Normal file
@@ -0,0 +1,713 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/batch/v1
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
)
|
||||
|
||||
// All Kubernetes labels need to be prefixed with Kubernetes to distinguish them from end-user labels
|
||||
// More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#label-selector-and-annotation-conventions
|
||||
_#labelPrefix: "batch.kubernetes.io/"
|
||||
|
||||
// CronJobScheduledTimestampAnnotation is the scheduled timestamp annotation for the Job.
|
||||
// It records the original/expected scheduled timestamp for the running job, represented in RFC3339.
|
||||
// The CronJob controller adds this annotation if the CronJobsScheduledAnnotation feature gate (beta in 1.28) is enabled.
|
||||
#CronJobScheduledTimestampAnnotation: "batch.kubernetes.io/cronjob-scheduled-timestamp"
|
||||
#JobCompletionIndexAnnotation: "batch.kubernetes.io/job-completion-index"
|
||||
|
||||
// JobTrackingFinalizer is a finalizer for Job's pods. It prevents them from
|
||||
// being deleted before being accounted in the Job status.
|
||||
//
|
||||
// Additionally, the apiserver and job controller use this string as a Job
|
||||
// annotation, to mark Jobs that are being tracked using pod finalizers.
|
||||
// However, this behavior is deprecated in kubernetes 1.26. This means that, in
|
||||
// 1.27+, one release after JobTrackingWithFinalizers graduates to GA, the
|
||||
// apiserver and job controller will ignore this annotation and they will
|
||||
// always track jobs using finalizers.
|
||||
#JobTrackingFinalizer: "batch.kubernetes.io/job-tracking"
|
||||
|
||||
// The Job labels will use batch.kubernetes.io as a prefix for all labels
|
||||
// Historically the job controller uses unprefixed labels for job-name and controller-uid and
|
||||
// Kubernetes continutes to recognize those unprefixed labels for consistency.
|
||||
#JobNameLabel: "batch.kubernetes.io/job-name"
|
||||
|
||||
// ControllerUid is used to programatically get pods corresponding to a Job.
|
||||
// There is a corresponding label without the batch.kubernetes.io that we support for legacy reasons.
|
||||
#ControllerUidLabel: "batch.kubernetes.io/controller-uid"
|
||||
|
||||
// Annotation indicating the number of failures for the index corresponding
|
||||
// to the pod, which are counted towards the backoff limit.
|
||||
#JobIndexFailureCountAnnotation: "batch.kubernetes.io/job-index-failure-count"
|
||||
|
||||
// Annotation indicating the number of failures for the index corresponding
|
||||
// to the pod, which don't count towards the backoff limit, according to the
|
||||
// pod failure policy. When the annotation is absent zero is implied.
|
||||
#JobIndexIgnoredFailureCountAnnotation: "batch.kubernetes.io/job-index-ignored-failure-count"
|
||||
|
||||
// Job represents the configuration of a single job.
|
||||
#Job: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Specification of the desired behavior of a job.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #JobSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Current status of a job.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
status?: #JobStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// JobList is a collection of jobs.
|
||||
#JobList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is the list of Jobs.
|
||||
items: [...#Job] @go(Items,[]Job) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// CompletionMode specifies how Pod completions of a Job are tracked.
|
||||
// +enum
|
||||
#CompletionMode: string // #enumCompletionMode
|
||||
|
||||
#enumCompletionMode:
|
||||
#NonIndexedCompletion |
|
||||
#IndexedCompletion
|
||||
|
||||
// NonIndexedCompletion is a Job completion mode. In this mode, the Job is
|
||||
// considered complete when there have been .spec.completions
|
||||
// successfully completed Pods. Pod completions are homologous to each other.
|
||||
#NonIndexedCompletion: #CompletionMode & "NonIndexed"
|
||||
|
||||
// IndexedCompletion is a Job completion mode. In this mode, the Pods of a
|
||||
// Job get an associated completion index from 0 to (.spec.completions - 1).
|
||||
// The Job is considered complete when a Pod completes for each completion
|
||||
// index.
|
||||
#IndexedCompletion: #CompletionMode & "Indexed"
|
||||
|
||||
// PodFailurePolicyAction specifies how a Pod failure is handled.
|
||||
// +enum
|
||||
#PodFailurePolicyAction: string // #enumPodFailurePolicyAction
|
||||
|
||||
#enumPodFailurePolicyAction:
|
||||
#PodFailurePolicyActionFailJob |
|
||||
#PodFailurePolicyActionFailIndex |
|
||||
#PodFailurePolicyActionIgnore |
|
||||
#PodFailurePolicyActionCount
|
||||
|
||||
// This is an action which might be taken on a pod failure - mark the
|
||||
// pod's job as Failed and terminate all running pods.
|
||||
#PodFailurePolicyActionFailJob: #PodFailurePolicyAction & "FailJob"
|
||||
|
||||
// This is an action which might be taken on a pod failure - mark the
|
||||
// Job's index as failed to avoid restarts within this index. This action
|
||||
// can only be used when backoffLimitPerIndex is set.
|
||||
// This value is beta-level.
|
||||
#PodFailurePolicyActionFailIndex: #PodFailurePolicyAction & "FailIndex"
|
||||
|
||||
// This is an action which might be taken on a pod failure - the counter towards
|
||||
// .backoffLimit, represented by the job's .status.failed field, is not
|
||||
// incremented and a replacement pod is created.
|
||||
#PodFailurePolicyActionIgnore: #PodFailurePolicyAction & "Ignore"
|
||||
|
||||
// This is an action which might be taken on a pod failure - the pod failure
|
||||
// is handled in the default way - the counter towards .backoffLimit,
|
||||
// represented by the job's .status.failed field, is incremented.
|
||||
#PodFailurePolicyActionCount: #PodFailurePolicyAction & "Count"
|
||||
|
||||
// +enum
|
||||
#PodFailurePolicyOnExitCodesOperator: string // #enumPodFailurePolicyOnExitCodesOperator
|
||||
|
||||
#enumPodFailurePolicyOnExitCodesOperator:
|
||||
#PodFailurePolicyOnExitCodesOpIn |
|
||||
#PodFailurePolicyOnExitCodesOpNotIn
|
||||
|
||||
#PodFailurePolicyOnExitCodesOpIn: #PodFailurePolicyOnExitCodesOperator & "In"
|
||||
#PodFailurePolicyOnExitCodesOpNotIn: #PodFailurePolicyOnExitCodesOperator & "NotIn"
|
||||
|
||||
// PodReplacementPolicy specifies the policy for creating pod replacements.
|
||||
// +enum
|
||||
#PodReplacementPolicy: string // #enumPodReplacementPolicy
|
||||
|
||||
#enumPodReplacementPolicy:
|
||||
#TerminatingOrFailed |
|
||||
#Failed
|
||||
|
||||
// TerminatingOrFailed means that we recreate pods
|
||||
// when they are terminating (has a metadata.deletionTimestamp) or failed.
|
||||
#TerminatingOrFailed: #PodReplacementPolicy & "TerminatingOrFailed"
|
||||
|
||||
// Failed means to wait until a previously created Pod is fully terminated (has phase
|
||||
// Failed or Succeeded) before creating a replacement Pod.
|
||||
#Failed: #PodReplacementPolicy & "Failed"
|
||||
|
||||
// PodFailurePolicyOnExitCodesRequirement describes the requirement for handling
|
||||
// a failed pod based on its container exit codes. In particular, it lookups the
|
||||
// .state.terminated.exitCode for each app container and init container status,
|
||||
// represented by the .status.containerStatuses and .status.initContainerStatuses
|
||||
// fields in the Pod status, respectively. Containers completed with success
|
||||
// (exit code 0) are excluded from the requirement check.
|
||||
#PodFailurePolicyOnExitCodesRequirement: {
|
||||
// Restricts the check for exit codes to the container with the
|
||||
// specified name. When null, the rule applies to all containers.
|
||||
// When specified, it should match one the container or initContainer
|
||||
// names in the pod template.
|
||||
// +optional
|
||||
containerName?: null | string @go(ContainerName,*string) @protobuf(1,bytes,opt)
|
||||
|
||||
// Represents the relationship between the container exit code(s) and the
|
||||
// specified values. Containers completed with success (exit code 0) are
|
||||
// excluded from the requirement check. Possible values are:
|
||||
//
|
||||
// - In: the requirement is satisfied if at least one container exit code
|
||||
// (might be multiple if there are multiple containers not restricted
|
||||
// by the 'containerName' field) is in the set of specified values.
|
||||
// - NotIn: the requirement is satisfied if at least one container exit code
|
||||
// (might be multiple if there are multiple containers not restricted
|
||||
// by the 'containerName' field) is not in the set of specified values.
|
||||
// Additional values are considered to be added in the future. Clients should
|
||||
// react to an unknown operator by assuming the requirement is not satisfied.
|
||||
operator: #PodFailurePolicyOnExitCodesOperator @go(Operator) @protobuf(2,bytes,req)
|
||||
|
||||
// Specifies the set of values. Each returned container exit code (might be
|
||||
// multiple in case of multiple containers) is checked against this set of
|
||||
// values with respect to the operator. The list of values must be ordered
|
||||
// and must not contain duplicates. Value '0' cannot be used for the In operator.
|
||||
// At least one element is required. At most 255 elements are allowed.
|
||||
// +listType=set
|
||||
values: [...int32] @go(Values,[]int32) @protobuf(3,varint,rep)
|
||||
}
|
||||
|
||||
// PodFailurePolicyOnPodConditionsPattern describes a pattern for matching
|
||||
// an actual pod condition type.
|
||||
#PodFailurePolicyOnPodConditionsPattern: {
|
||||
// Specifies the required Pod condition type. To match a pod condition
|
||||
// it is required that specified type equals the pod condition type.
|
||||
type: corev1.#PodConditionType @go(Type) @protobuf(1,bytes,req)
|
||||
|
||||
// Specifies the required Pod condition status. To match a pod condition
|
||||
// it is required that the specified status equals the pod condition status.
|
||||
// Defaults to True.
|
||||
status: corev1.#ConditionStatus @go(Status) @protobuf(2,bytes,req)
|
||||
}
|
||||
|
||||
// PodFailurePolicyRule describes how a pod failure is handled when the requirements are met.
|
||||
// One of onExitCodes and onPodConditions, but not both, can be used in each rule.
|
||||
#PodFailurePolicyRule: {
|
||||
// Specifies the action taken on a pod failure when the requirements are satisfied.
|
||||
// Possible values are:
|
||||
//
|
||||
// - FailJob: indicates that the pod's job is marked as Failed and all
|
||||
// running pods are terminated.
|
||||
// - FailIndex: indicates that the pod's index is marked as Failed and will
|
||||
// not be restarted.
|
||||
// This value is beta-level. It can be used when the
|
||||
// `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).
|
||||
// - Ignore: indicates that the counter towards the .backoffLimit is not
|
||||
// incremented and a replacement pod is created.
|
||||
// - Count: indicates that the pod is handled in the default way - the
|
||||
// counter towards the .backoffLimit is incremented.
|
||||
// Additional values are considered to be added in the future. Clients should
|
||||
// react to an unknown action by skipping the rule.
|
||||
action: #PodFailurePolicyAction @go(Action) @protobuf(1,bytes,req)
|
||||
|
||||
// Represents the requirement on the container exit codes.
|
||||
// +optional
|
||||
onExitCodes?: null | #PodFailurePolicyOnExitCodesRequirement @go(OnExitCodes,*PodFailurePolicyOnExitCodesRequirement) @protobuf(2,bytes,opt)
|
||||
|
||||
// Represents the requirement on the pod conditions. The requirement is represented
|
||||
// as a list of pod condition patterns. The requirement is satisfied if at
|
||||
// least one pattern matches an actual pod condition. At most 20 elements are allowed.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
onPodConditions?: [...#PodFailurePolicyOnPodConditionsPattern] @go(OnPodConditions,[]PodFailurePolicyOnPodConditionsPattern) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// PodFailurePolicy describes how failed pods influence the backoffLimit.
|
||||
#PodFailurePolicy: {
|
||||
// A list of pod failure policy rules. The rules are evaluated in order.
|
||||
// Once a rule matches a Pod failure, the remaining of the rules are ignored.
|
||||
// When no rule matches the Pod failure, the default handling applies - the
|
||||
// counter of pod failures is incremented and it is checked against
|
||||
// the backoffLimit. At most 20 elements are allowed.
|
||||
// +listType=atomic
|
||||
rules: [...#PodFailurePolicyRule] @go(Rules,[]PodFailurePolicyRule) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// JobSpec describes how the job execution will look like.
|
||||
#JobSpec: {
|
||||
// Specifies the maximum desired number of pods the job should
|
||||
// run at any given time. The actual number of pods running in steady state will
|
||||
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
|
||||
// i.e. when the work left to do is less than max parallelism.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
|
||||
// +optional
|
||||
parallelism?: null | int32 @go(Parallelism,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// Specifies the desired number of successfully finished pods the
|
||||
// job should be run with. Setting to null means that the success of any
|
||||
// pod signals the success of all pods, and allows parallelism to have any positive
|
||||
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
||||
// pod signals the success of the job.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
|
||||
// +optional
|
||||
completions?: null | int32 @go(Completions,*int32) @protobuf(2,varint,opt)
|
||||
|
||||
// Specifies the duration in seconds relative to the startTime that the job
|
||||
// may be continuously active before the system tries to terminate it; value
|
||||
// must be positive integer. If a Job is suspended (at creation or through an
|
||||
// update), this timer will effectively be stopped and reset when the Job is
|
||||
// resumed again.
|
||||
// +optional
|
||||
activeDeadlineSeconds?: null | int64 @go(ActiveDeadlineSeconds,*int64) @protobuf(3,varint,opt)
|
||||
|
||||
// Specifies the policy of handling failed pods. In particular, it allows to
|
||||
// specify the set of actions and conditions which need to be
|
||||
// satisfied to take the associated action.
|
||||
// If empty, the default behaviour applies - the counter of failed pods,
|
||||
// represented by the jobs's .status.failed field, is incremented and it is
|
||||
// checked against the backoffLimit. This field cannot be used in combination
|
||||
// with restartPolicy=OnFailure.
|
||||
//
|
||||
// This field is beta-level. It can be used when the `JobPodFailurePolicy`
|
||||
// feature gate is enabled (enabled by default).
|
||||
// +optional
|
||||
podFailurePolicy?: null | #PodFailurePolicy @go(PodFailurePolicy,*PodFailurePolicy) @protobuf(11,bytes,opt)
|
||||
|
||||
// Specifies the number of retries before marking this job failed.
|
||||
// Defaults to 6
|
||||
// +optional
|
||||
backoffLimit?: null | int32 @go(BackoffLimit,*int32) @protobuf(7,varint,opt)
|
||||
|
||||
// Specifies the limit for the number of retries within an
|
||||
// index before marking this index as failed. When enabled the number of
|
||||
// failures per index is kept in the pod's
|
||||
// batch.kubernetes.io/job-index-failure-count annotation. It can only
|
||||
// be set when Job's completionMode=Indexed, and the Pod's restart
|
||||
// policy is Never. The field is immutable.
|
||||
// This field is beta-level. It can be used when the `JobBackoffLimitPerIndex`
|
||||
// feature gate is enabled (enabled by default).
|
||||
// +optional
|
||||
backoffLimitPerIndex?: null | int32 @go(BackoffLimitPerIndex,*int32) @protobuf(12,varint,opt)
|
||||
|
||||
// Specifies the maximal number of failed indexes before marking the Job as
|
||||
// failed, when backoffLimitPerIndex is set. Once the number of failed
|
||||
// indexes exceeds this number the entire Job is marked as Failed and its
|
||||
// execution is terminated. When left as null the job continues execution of
|
||||
// all of its indexes and is marked with the `Complete` Job condition.
|
||||
// It can only be specified when backoffLimitPerIndex is set.
|
||||
// It can be null or up to completions. It is required and must be
|
||||
// less than or equal to 10^4 when is completions greater than 10^5.
|
||||
// This field is beta-level. It can be used when the `JobBackoffLimitPerIndex`
|
||||
// feature gate is enabled (enabled by default).
|
||||
// +optional
|
||||
maxFailedIndexes?: null | int32 @go(MaxFailedIndexes,*int32) @protobuf(13,varint,opt)
|
||||
|
||||
// A label query over pods that should match the pod count.
|
||||
// Normally, the system sets this field for you.
|
||||
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
|
||||
// +optional
|
||||
selector?: null | metav1.#LabelSelector @go(Selector,*metav1.LabelSelector) @protobuf(4,bytes,opt)
|
||||
|
||||
// manualSelector controls generation of pod labels and pod selectors.
|
||||
// Leave `manualSelector` unset unless you are certain what you are doing.
|
||||
// When false or unset, the system pick labels unique to this job
|
||||
// and appends those labels to the pod template. When true,
|
||||
// the user is responsible for picking unique labels and specifying
|
||||
// the selector. Failure to pick a unique label may cause this
|
||||
// and other jobs to not function correctly. However, You may see
|
||||
// `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
|
||||
// API.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector
|
||||
// +optional
|
||||
manualSelector?: null | bool @go(ManualSelector,*bool) @protobuf(5,varint,opt)
|
||||
|
||||
// Describes the pod that will be created when executing a job.
|
||||
// The only allowed template.spec.restartPolicy values are "Never" or "OnFailure".
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
|
||||
template: corev1.#PodTemplateSpec @go(Template) @protobuf(6,bytes,opt)
|
||||
|
||||
// ttlSecondsAfterFinished limits the lifetime of a Job that has finished
|
||||
// execution (either Complete or Failed). If this field is set,
|
||||
// ttlSecondsAfterFinished after the Job finishes, it is eligible to be
|
||||
// automatically deleted. When the Job is being deleted, its lifecycle
|
||||
// guarantees (e.g. finalizers) will be honored. If this field is unset,
|
||||
// the Job won't be automatically deleted. If this field is set to zero,
|
||||
// the Job becomes eligible to be deleted immediately after it finishes.
|
||||
// +optional
|
||||
ttlSecondsAfterFinished?: null | int32 @go(TTLSecondsAfterFinished,*int32) @protobuf(8,varint,opt)
|
||||
|
||||
// completionMode specifies how Pod completions are tracked. It can be
|
||||
// `NonIndexed` (default) or `Indexed`.
|
||||
//
|
||||
// `NonIndexed` means that the Job is considered complete when there have
|
||||
// been .spec.completions successfully completed Pods. Each Pod completion is
|
||||
// homologous to each other.
|
||||
//
|
||||
// `Indexed` means that the Pods of a
|
||||
// Job get an associated completion index from 0 to (.spec.completions - 1),
|
||||
// available in the annotation batch.kubernetes.io/job-completion-index.
|
||||
// The Job is considered complete when there is one successfully completed Pod
|
||||
// for each index.
|
||||
// When value is `Indexed`, .spec.completions must be specified and
|
||||
// `.spec.parallelism` must be less than or equal to 10^5.
|
||||
// In addition, The Pod name takes the form
|
||||
// `$(job-name)-$(index)-$(random-string)`,
|
||||
// the Pod hostname takes the form `$(job-name)-$(index)`.
|
||||
//
|
||||
// More completion modes can be added in the future.
|
||||
// If the Job controller observes a mode that it doesn't recognize, which
|
||||
// is possible during upgrades due to version skew, the controller
|
||||
// skips updates for the Job.
|
||||
// +optional
|
||||
completionMode?: null | #CompletionMode @go(CompletionMode,*CompletionMode) @protobuf(9,bytes,opt,casttype=CompletionMode)
|
||||
|
||||
// suspend specifies whether the Job controller should create Pods or not. If
|
||||
// a Job is created with suspend set to true, no Pods are created by the Job
|
||||
// controller. If a Job is suspended after creation (i.e. the flag goes from
|
||||
// false to true), the Job controller will delete all active Pods associated
|
||||
// with this Job. Users must design their workload to gracefully handle this.
|
||||
// Suspending a Job will reset the StartTime field of the Job, effectively
|
||||
// resetting the ActiveDeadlineSeconds timer too. Defaults to false.
|
||||
//
|
||||
// +optional
|
||||
suspend?: null | bool @go(Suspend,*bool) @protobuf(10,varint,opt)
|
||||
|
||||
// podReplacementPolicy specifies when to create replacement Pods.
|
||||
// Possible values are:
|
||||
// - TerminatingOrFailed means that we recreate pods
|
||||
// when they are terminating (has a metadata.deletionTimestamp) or failed.
|
||||
// - Failed means to wait until a previously created Pod is fully terminated (has phase
|
||||
// Failed or Succeeded) before creating a replacement Pod.
|
||||
//
|
||||
// When using podFailurePolicy, Failed is the the only allowed value.
|
||||
// TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use.
|
||||
// This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle.
|
||||
// This is on by default.
|
||||
// +optional
|
||||
podReplacementPolicy?: null | #PodReplacementPolicy @go(PodReplacementPolicy,*PodReplacementPolicy) @protobuf(14,bytes,opt,casttype=podReplacementPolicy)
|
||||
}
|
||||
|
||||
// JobStatus represents the current state of a Job.
|
||||
#JobStatus: {
|
||||
// The latest available observations of an object's current state. When a Job
|
||||
// fails, one of the conditions will have type "Failed" and status true. When
|
||||
// a Job is suspended, one of the conditions will have type "Suspended" and
|
||||
// status true; when the Job is resumed, the status of this condition will
|
||||
// become false. When a Job is completed, one of the conditions will have
|
||||
// type "Complete" and status true.
|
||||
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
|
||||
// +optional
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
// +listType=atomic
|
||||
conditions?: [...#JobCondition] @go(Conditions,[]JobCondition) @protobuf(1,bytes,rep)
|
||||
|
||||
// Represents time when the job controller started processing a job. When a
|
||||
// Job is created in the suspended state, this field is not set until the
|
||||
// first time it is resumed. This field is reset every time a Job is resumed
|
||||
// from suspension. It is represented in RFC3339 form and is in UTC.
|
||||
// +optional
|
||||
startTime?: null | metav1.#Time @go(StartTime,*metav1.Time) @protobuf(2,bytes,opt)
|
||||
|
||||
// Represents time when the job was completed. It is not guaranteed to
|
||||
// be set in happens-before order across separate operations.
|
||||
// It is represented in RFC3339 form and is in UTC.
|
||||
// The completion time is only set when the job finishes successfully.
|
||||
// +optional
|
||||
completionTime?: null | metav1.#Time @go(CompletionTime,*metav1.Time) @protobuf(3,bytes,opt)
|
||||
|
||||
// The number of pending and running pods.
|
||||
// +optional
|
||||
active?: int32 @go(Active) @protobuf(4,varint,opt)
|
||||
|
||||
// The number of pods which reached phase Succeeded.
|
||||
// +optional
|
||||
succeeded?: int32 @go(Succeeded) @protobuf(5,varint,opt)
|
||||
|
||||
// The number of pods which reached phase Failed.
|
||||
// +optional
|
||||
failed?: int32 @go(Failed) @protobuf(6,varint,opt)
|
||||
|
||||
// The number of pods which are terminating (in phase Pending or Running
|
||||
// and have a deletionTimestamp).
|
||||
//
|
||||
// This field is beta-level. The job controller populates the field when
|
||||
// the feature gate JobPodReplacementPolicy is enabled (enabled by default).
|
||||
// +optional
|
||||
terminating?: null | int32 @go(Terminating,*int32) @protobuf(11,varint,opt)
|
||||
|
||||
// completedIndexes holds the completed indexes when .spec.completionMode =
|
||||
// "Indexed" in a text format. The indexes are represented as decimal integers
|
||||
// separated by commas. The numbers are listed in increasing order. Three or
|
||||
// more consecutive numbers are compressed and represented by the first and
|
||||
// last element of the series, separated by a hyphen.
|
||||
// For example, if the completed indexes are 1, 3, 4, 5 and 7, they are
|
||||
// represented as "1,3-5,7".
|
||||
// +optional
|
||||
completedIndexes?: string @go(CompletedIndexes) @protobuf(7,bytes,opt)
|
||||
|
||||
// FailedIndexes holds the failed indexes when backoffLimitPerIndex=true.
|
||||
// The indexes are represented in the text format analogous as for the
|
||||
// `completedIndexes` field, ie. they are kept as decimal integers
|
||||
// separated by commas. The numbers are listed in increasing order. Three or
|
||||
// more consecutive numbers are compressed and represented by the first and
|
||||
// last element of the series, separated by a hyphen.
|
||||
// For example, if the failed indexes are 1, 3, 4, 5 and 7, they are
|
||||
// represented as "1,3-5,7".
|
||||
// This field is beta-level. It can be used when the `JobBackoffLimitPerIndex`
|
||||
// feature gate is enabled (enabled by default).
|
||||
// +optional
|
||||
failedIndexes?: null | string @go(FailedIndexes,*string) @protobuf(10,bytes,opt)
|
||||
|
||||
// uncountedTerminatedPods holds the UIDs of Pods that have terminated but
|
||||
// the job controller hasn't yet accounted for in the status counters.
|
||||
//
|
||||
// The job controller creates pods with a finalizer. When a pod terminates
|
||||
// (succeeded or failed), the controller does three steps to account for it
|
||||
// in the job status:
|
||||
//
|
||||
// 1. Add the pod UID to the arrays in this field.
|
||||
// 2. Remove the pod finalizer.
|
||||
// 3. Remove the pod UID from the arrays while increasing the corresponding
|
||||
// counter.
|
||||
//
|
||||
// Old jobs might not be tracked using this field, in which case the field
|
||||
// remains null.
|
||||
// +optional
|
||||
uncountedTerminatedPods?: null | #UncountedTerminatedPods @go(UncountedTerminatedPods,*UncountedTerminatedPods) @protobuf(8,bytes,opt)
|
||||
|
||||
// The number of pods which have a Ready condition.
|
||||
// +optional
|
||||
ready?: null | int32 @go(Ready,*int32) @protobuf(9,varint,opt)
|
||||
}
|
||||
|
||||
// UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't
|
||||
// been accounted in Job status counters.
|
||||
#UncountedTerminatedPods: {
|
||||
// succeeded holds UIDs of succeeded Pods.
|
||||
// +listType=set
|
||||
// +optional
|
||||
succeeded?: [...types.#UID] @go(Succeeded,[]types.UID) @protobuf(1,bytes,rep,casttype=k8s.io/apimachinery/pkg/types.UID)
|
||||
|
||||
// failed holds UIDs of failed Pods.
|
||||
// +listType=set
|
||||
// +optional
|
||||
failed?: [...types.#UID] @go(Failed,[]types.UID) @protobuf(2,bytes,rep,casttype=k8s.io/apimachinery/pkg/types.UID)
|
||||
}
|
||||
|
||||
#JobConditionType: string // #enumJobConditionType
|
||||
|
||||
#enumJobConditionType:
|
||||
#JobSuspended |
|
||||
#JobComplete |
|
||||
#JobFailed |
|
||||
#JobFailureTarget
|
||||
|
||||
// JobSuspended means the job has been suspended.
|
||||
#JobSuspended: #JobConditionType & "Suspended"
|
||||
|
||||
// JobComplete means the job has completed its execution.
|
||||
#JobComplete: #JobConditionType & "Complete"
|
||||
|
||||
// JobFailed means the job has failed its execution.
|
||||
#JobFailed: #JobConditionType & "Failed"
|
||||
|
||||
// FailureTarget means the job is about to fail its execution.
|
||||
#JobFailureTarget: #JobConditionType & "FailureTarget"
|
||||
|
||||
// JobReasonPodFailurePolicy reason indicates a job failure condition is added due to
|
||||
// a failed pod matching a pod failure policy rule
|
||||
// https://kep.k8s.io/3329
|
||||
// This is currently a beta field.
|
||||
#JobReasonPodFailurePolicy: "PodFailurePolicy"
|
||||
|
||||
// JobReasonBackOffLimitExceeded reason indicates that pods within a job have failed a number of
|
||||
// times higher than backOffLimit times.
|
||||
#JobReasonBackoffLimitExceeded: "BackoffLimitExceeded"
|
||||
|
||||
// JobReasponDeadlineExceeded means job duration is past ActiveDeadline
|
||||
#JobReasonDeadlineExceeded: "DeadlineExceeded"
|
||||
|
||||
// JobReasonMaxFailedIndexesExceeded indicates that an indexed of a job failed
|
||||
// This const is used in beta-level feature: https://kep.k8s.io/3850.
|
||||
#JobReasonMaxFailedIndexesExceeded: "MaxFailedIndexesExceeded"
|
||||
|
||||
// JobReasonFailedIndexes means Job has failed indexes.
|
||||
// This const is used in beta-level feature: https://kep.k8s.io/3850.
|
||||
#JobReasonFailedIndexes: "FailedIndexes"
|
||||
|
||||
// JobCondition describes current state of a job.
|
||||
#JobCondition: {
|
||||
// Type of job condition, Complete or Failed.
|
||||
type: #JobConditionType @go(Type) @protobuf(1,bytes,opt,casttype=JobConditionType)
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
status: corev1.#ConditionStatus @go(Status) @protobuf(2,bytes,opt,casttype=k8s.io/api/core/v1.ConditionStatus)
|
||||
|
||||
// Last time the condition was checked.
|
||||
// +optional
|
||||
lastProbeTime?: metav1.#Time @go(LastProbeTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// Last time the condition transit from one status to another.
|
||||
// +optional
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(4,bytes,opt)
|
||||
|
||||
// (brief) reason for the condition's last transition.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(5,bytes,opt)
|
||||
|
||||
// Human readable message indicating details about last transition.
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(6,bytes,opt)
|
||||
}
|
||||
|
||||
// JobTemplateSpec describes the data a Job should have when created from a template
|
||||
#JobTemplateSpec: {
|
||||
// Standard object's metadata of the jobs created from this template.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Specification of the desired behavior of the job.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #JobSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// CronJob represents the configuration of a single cron job.
|
||||
#CronJob: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Specification of the desired behavior of a cron job, including the schedule.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #CronJobSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Current status of a cron job.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
status?: #CronJobStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// CronJobList is a collection of cron jobs.
|
||||
#CronJobList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is the list of CronJobs.
|
||||
items: [...#CronJob] @go(Items,[]CronJob) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// CronJobSpec describes how the job execution will look like and when it will actually run.
|
||||
#CronJobSpec: {
|
||||
// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
||||
schedule: string @go(Schedule) @protobuf(1,bytes,opt)
|
||||
|
||||
// The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
|
||||
// If not specified, this will default to the time zone of the kube-controller-manager process.
|
||||
// The set of valid time zone names and the time zone offset is loaded from the system-wide time zone
|
||||
// database by the API server during CronJob validation and the controller manager during execution.
|
||||
// If no system-wide time zone database can be found a bundled version of the database is used instead.
|
||||
// If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host
|
||||
// configuration, the controller will stop creating new new Jobs and will create a system event with the
|
||||
// reason UnknownTimeZone.
|
||||
// More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones
|
||||
// +optional
|
||||
timeZone?: null | string @go(TimeZone,*string) @protobuf(8,bytes,opt)
|
||||
|
||||
// Optional deadline in seconds for starting the job if it misses scheduled
|
||||
// time for any reason. Missed jobs executions will be counted as failed ones.
|
||||
// +optional
|
||||
startingDeadlineSeconds?: null | int64 @go(StartingDeadlineSeconds,*int64) @protobuf(2,varint,opt)
|
||||
|
||||
// Specifies how to treat concurrent executions of a Job.
|
||||
// Valid values are:
|
||||
//
|
||||
// - "Allow" (default): allows CronJobs to run concurrently;
|
||||
// - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
|
||||
// - "Replace": cancels currently running job and replaces it with a new one
|
||||
// +optional
|
||||
concurrencyPolicy?: #ConcurrencyPolicy @go(ConcurrencyPolicy) @protobuf(3,bytes,opt,casttype=ConcurrencyPolicy)
|
||||
|
||||
// This flag tells the controller to suspend subsequent executions, it does
|
||||
// not apply to already started executions. Defaults to false.
|
||||
// +optional
|
||||
suspend?: null | bool @go(Suspend,*bool) @protobuf(4,varint,opt)
|
||||
|
||||
// Specifies the job that will be created when executing a CronJob.
|
||||
jobTemplate: #JobTemplateSpec @go(JobTemplate) @protobuf(5,bytes,opt)
|
||||
|
||||
// The number of successful finished jobs to retain. Value must be non-negative integer.
|
||||
// Defaults to 3.
|
||||
// +optional
|
||||
successfulJobsHistoryLimit?: null | int32 @go(SuccessfulJobsHistoryLimit,*int32) @protobuf(6,varint,opt)
|
||||
|
||||
// The number of failed finished jobs to retain. Value must be non-negative integer.
|
||||
// Defaults to 1.
|
||||
// +optional
|
||||
failedJobsHistoryLimit?: null | int32 @go(FailedJobsHistoryLimit,*int32) @protobuf(7,varint,opt)
|
||||
}
|
||||
|
||||
// ConcurrencyPolicy describes how the job will be handled.
|
||||
// Only one of the following concurrent policies may be specified.
|
||||
// If none of the following policies is specified, the default one
|
||||
// is AllowConcurrent.
|
||||
// +enum
|
||||
#ConcurrencyPolicy: string // #enumConcurrencyPolicy
|
||||
|
||||
#enumConcurrencyPolicy:
|
||||
#AllowConcurrent |
|
||||
#ForbidConcurrent |
|
||||
#ReplaceConcurrent
|
||||
|
||||
// AllowConcurrent allows CronJobs to run concurrently.
|
||||
#AllowConcurrent: #ConcurrencyPolicy & "Allow"
|
||||
|
||||
// ForbidConcurrent forbids concurrent runs, skipping next run if previous
|
||||
// hasn't finished yet.
|
||||
#ForbidConcurrent: #ConcurrencyPolicy & "Forbid"
|
||||
|
||||
// ReplaceConcurrent cancels currently running job and replaces it with a new one.
|
||||
#ReplaceConcurrent: #ConcurrencyPolicy & "Replace"
|
||||
|
||||
// CronJobStatus represents the current state of a cron job.
|
||||
#CronJobStatus: {
|
||||
// A list of pointers to currently running jobs.
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
active?: [...corev1.#ObjectReference] @go(Active,[]corev1.ObjectReference) @protobuf(1,bytes,rep)
|
||||
|
||||
// Information when was the last time the job was successfully scheduled.
|
||||
// +optional
|
||||
lastScheduleTime?: null | metav1.#Time @go(LastScheduleTime,*metav1.Time) @protobuf(4,bytes,opt)
|
||||
|
||||
// Information when was the last time the job successfully completed.
|
||||
// +optional
|
||||
lastSuccessfulTime?: null | metav1.#Time @go(LastSuccessfulTime,*metav1.Time) @protobuf(5,bytes,opt)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/batch/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "batch"
|
||||
@@ -0,0 +1,146 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/batch/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
batchv1 "k8s.io/api/batch/v1"
|
||||
"k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// JobTemplateSpec describes the data a Job should have when created from a template
|
||||
#JobTemplateSpec: {
|
||||
// Standard object's metadata of the jobs created from this template.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Specification of the desired behavior of the job.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: batchv1.#JobSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// CronJob represents the configuration of a single cron job.
|
||||
#CronJob: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// Specification of the desired behavior of a cron job, including the schedule.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #CronJobSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Current status of a cron job.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
status?: #CronJobStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// CronJobList is a collection of cron jobs.
|
||||
#CronJobList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is the list of CronJobs.
|
||||
items: [...#CronJob] @go(Items,[]CronJob) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// CronJobSpec describes how the job execution will look like and when it will actually run.
|
||||
#CronJobSpec: {
|
||||
// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
||||
schedule: string @go(Schedule) @protobuf(1,bytes,opt)
|
||||
|
||||
// The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
|
||||
// If not specified, this will default to the time zone of the kube-controller-manager process.
|
||||
// The set of valid time zone names and the time zone offset is loaded from the system-wide time zone
|
||||
// database by the API server during CronJob validation and the controller manager during execution.
|
||||
// If no system-wide time zone database can be found a bundled version of the database is used instead.
|
||||
// If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host
|
||||
// configuration, the controller will stop creating new new Jobs and will create a system event with the
|
||||
// reason UnknownTimeZone.
|
||||
// More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones
|
||||
// +optional
|
||||
timeZone?: null | string @go(TimeZone,*string) @protobuf(8,bytes,opt)
|
||||
|
||||
// Optional deadline in seconds for starting the job if it misses scheduled
|
||||
// time for any reason. Missed jobs executions will be counted as failed ones.
|
||||
// +optional
|
||||
startingDeadlineSeconds?: null | int64 @go(StartingDeadlineSeconds,*int64) @protobuf(2,varint,opt)
|
||||
|
||||
// Specifies how to treat concurrent executions of a Job.
|
||||
// Valid values are:
|
||||
//
|
||||
// - "Allow" (default): allows CronJobs to run concurrently;
|
||||
// - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
|
||||
// - "Replace": cancels currently running job and replaces it with a new one
|
||||
// +optional
|
||||
concurrencyPolicy?: #ConcurrencyPolicy @go(ConcurrencyPolicy) @protobuf(3,bytes,opt,casttype=ConcurrencyPolicy)
|
||||
|
||||
// This flag tells the controller to suspend subsequent executions, it does
|
||||
// not apply to already started executions. Defaults to false.
|
||||
// +optional
|
||||
suspend?: null | bool @go(Suspend,*bool) @protobuf(4,varint,opt)
|
||||
|
||||
// Specifies the job that will be created when executing a CronJob.
|
||||
jobTemplate: #JobTemplateSpec @go(JobTemplate) @protobuf(5,bytes,opt)
|
||||
|
||||
// The number of successful finished jobs to retain.
|
||||
// This is a pointer to distinguish between explicit zero and not specified.
|
||||
// Defaults to 3.
|
||||
// +optional
|
||||
successfulJobsHistoryLimit?: null | int32 @go(SuccessfulJobsHistoryLimit,*int32) @protobuf(6,varint,opt)
|
||||
|
||||
// The number of failed finished jobs to retain.
|
||||
// This is a pointer to distinguish between explicit zero and not specified.
|
||||
// Defaults to 1.
|
||||
// +optional
|
||||
failedJobsHistoryLimit?: null | int32 @go(FailedJobsHistoryLimit,*int32) @protobuf(7,varint,opt)
|
||||
}
|
||||
|
||||
// ConcurrencyPolicy describes how the job will be handled.
|
||||
// Only one of the following concurrent policies may be specified.
|
||||
// If none of the following policies is specified, the default one
|
||||
// is AllowConcurrent.
|
||||
#ConcurrencyPolicy: string // #enumConcurrencyPolicy
|
||||
|
||||
#enumConcurrencyPolicy:
|
||||
#AllowConcurrent |
|
||||
#ForbidConcurrent |
|
||||
#ReplaceConcurrent
|
||||
|
||||
// AllowConcurrent allows CronJobs to run concurrently.
|
||||
#AllowConcurrent: #ConcurrencyPolicy & "Allow"
|
||||
|
||||
// ForbidConcurrent forbids concurrent runs, skipping next run if previous
|
||||
// hasn't finished yet.
|
||||
#ForbidConcurrent: #ConcurrencyPolicy & "Forbid"
|
||||
|
||||
// ReplaceConcurrent cancels currently running job and replaces it with a new one.
|
||||
#ReplaceConcurrent: #ConcurrencyPolicy & "Replace"
|
||||
|
||||
// CronJobStatus represents the current state of a cron job.
|
||||
#CronJobStatus: {
|
||||
// A list of pointers to currently running jobs.
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
active?: [...v1.#ObjectReference] @go(Active,[]v1.ObjectReference) @protobuf(1,bytes,rep)
|
||||
|
||||
// Information when was the last time the job was successfully scheduled.
|
||||
// +optional
|
||||
lastScheduleTime?: null | metav1.#Time @go(LastScheduleTime,*metav1.Time) @protobuf(4,bytes,opt)
|
||||
|
||||
// Information when was the last time the job successfully completed.
|
||||
// +optional
|
||||
lastSuccessfulTime?: null | metav1.#Time @go(LastSuccessfulTime,*metav1.Time) @protobuf(5,bytes,opt)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/certificates/v1
|
||||
|
||||
package v1
|
||||
|
||||
#GroupName: "certificates.k8s.io"
|
||||
@@ -0,0 +1,318 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/certificates/v1
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// CertificateSigningRequest objects provide a mechanism to obtain x509 certificates
|
||||
// by submitting a certificate signing request, and having it asynchronously approved and issued.
|
||||
//
|
||||
// Kubelets use this API to obtain:
|
||||
// 1. client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client-kubelet" signerName).
|
||||
// 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the "kubernetes.io/kubelet-serving" signerName).
|
||||
//
|
||||
// This API can be used to request client certificates to authenticate to kube-apiserver
|
||||
// (with the "kubernetes.io/kube-apiserver-client" signerName),
|
||||
// or to obtain certificates from custom non-Kubernetes signers.
|
||||
#CertificateSigningRequest: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// spec contains the certificate request, and is immutable after creation.
|
||||
// Only the request, signerName, expirationSeconds, and usages fields can be set on creation.
|
||||
// Other fields are derived by Kubernetes and cannot be modified by users.
|
||||
spec: #CertificateSigningRequestSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// status contains information about whether the request is approved or denied,
|
||||
// and the certificate issued by the signer, or the failure condition indicating signer failure.
|
||||
// +optional
|
||||
status?: #CertificateSigningRequestStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// CertificateSigningRequestSpec contains the certificate request.
|
||||
#CertificateSigningRequestSpec: {
|
||||
// request contains an x509 certificate signing request encoded in a "CERTIFICATE REQUEST" PEM block.
|
||||
// When serialized as JSON or YAML, the data is additionally base64-encoded.
|
||||
// +listType=atomic
|
||||
request: bytes @go(Request,[]byte) @protobuf(1,bytes,opt)
|
||||
|
||||
// signerName indicates the requested signer, and is a qualified name.
|
||||
//
|
||||
// List/watch requests for CertificateSigningRequests can filter on this field using a "spec.signerName=NAME" fieldSelector.
|
||||
//
|
||||
// Well-known Kubernetes signers are:
|
||||
// 1. "kubernetes.io/kube-apiserver-client": issues client certificates that can be used to authenticate to kube-apiserver.
|
||||
// Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the "csrsigning" controller in kube-controller-manager.
|
||||
// 2. "kubernetes.io/kube-apiserver-client-kubelet": issues client certificates that kubelets use to authenticate to kube-apiserver.
|
||||
// Requests for this signer can be auto-approved by the "csrapproving" controller in kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager.
|
||||
// 3. "kubernetes.io/kubelet-serving" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.
|
||||
// Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager.
|
||||
//
|
||||
// More details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers
|
||||
//
|
||||
// Custom signerNames can also be specified. The signer defines:
|
||||
// 1. Trust distribution: how trust (CA bundles) are distributed.
|
||||
// 2. Permitted subjects: and behavior when a disallowed subject is requested.
|
||||
// 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.
|
||||
// 4. Required, permitted, or forbidden key usages / extended key usages.
|
||||
// 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.
|
||||
// 6. Whether or not requests for CA certificates are allowed.
|
||||
signerName: string @go(SignerName) @protobuf(7,bytes,opt)
|
||||
|
||||
// expirationSeconds is the requested duration of validity of the issued
|
||||
// certificate. The certificate signer may issue a certificate with a different
|
||||
// validity duration so a client must check the delta between the notBefore and
|
||||
// and notAfter fields in the issued certificate to determine the actual duration.
|
||||
//
|
||||
// The v1.22+ in-tree implementations of the well-known Kubernetes signers will
|
||||
// honor this field as long as the requested duration is not greater than the
|
||||
// maximum duration they will honor per the --cluster-signing-duration CLI
|
||||
// flag to the Kubernetes controller manager.
|
||||
//
|
||||
// Certificate signers may not honor this field for various reasons:
|
||||
//
|
||||
// 1. Old signer that is unaware of the field (such as the in-tree
|
||||
// implementations prior to v1.22)
|
||||
// 2. Signer whose configured maximum is shorter than the requested duration
|
||||
// 3. Signer whose configured minimum is longer than the requested duration
|
||||
//
|
||||
// The minimum valid value for expirationSeconds is 600, i.e. 10 minutes.
|
||||
//
|
||||
// +optional
|
||||
expirationSeconds?: null | int32 @go(ExpirationSeconds,*int32) @protobuf(8,varint,opt)
|
||||
|
||||
// usages specifies a set of key usages requested in the issued certificate.
|
||||
//
|
||||
// Requests for TLS client certificates typically request: "digital signature", "key encipherment", "client auth".
|
||||
//
|
||||
// Requests for TLS serving certificates typically request: "key encipherment", "digital signature", "server auth".
|
||||
//
|
||||
// Valid values are:
|
||||
// "signing", "digital signature", "content commitment",
|
||||
// "key encipherment", "key agreement", "data encipherment",
|
||||
// "cert sign", "crl sign", "encipher only", "decipher only", "any",
|
||||
// "server auth", "client auth",
|
||||
// "code signing", "email protection", "s/mime",
|
||||
// "ipsec end system", "ipsec tunnel", "ipsec user",
|
||||
// "timestamping", "ocsp signing", "microsoft sgc", "netscape sgc"
|
||||
// +listType=atomic
|
||||
usages?: [...#KeyUsage] @go(Usages,[]KeyUsage) @protobuf(5,bytes,opt)
|
||||
|
||||
// username contains the name of the user that created the CertificateSigningRequest.
|
||||
// Populated by the API server on creation and immutable.
|
||||
// +optional
|
||||
username?: string @go(Username) @protobuf(2,bytes,opt)
|
||||
|
||||
// uid contains the uid of the user that created the CertificateSigningRequest.
|
||||
// Populated by the API server on creation and immutable.
|
||||
// +optional
|
||||
uid?: string @go(UID) @protobuf(3,bytes,opt)
|
||||
|
||||
// groups contains group membership of the user that created the CertificateSigningRequest.
|
||||
// Populated by the API server on creation and immutable.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
groups?: [...string] @go(Groups,[]string) @protobuf(4,bytes,rep)
|
||||
|
||||
// extra contains extra attributes of the user that created the CertificateSigningRequest.
|
||||
// Populated by the API server on creation and immutable.
|
||||
// +optional
|
||||
extra?: {[string]: #ExtraValue} @go(Extra,map[string]ExtraValue) @protobuf(6,bytes,rep)
|
||||
}
|
||||
|
||||
// "kubernetes.io/kube-apiserver-client" signer issues client certificates that can be used to authenticate to kube-apiserver.
|
||||
// Never auto-approved by kube-controller-manager.
|
||||
// Can be issued by the "csrsigning" controller in kube-controller-manager.
|
||||
#KubeAPIServerClientSignerName: "kubernetes.io/kube-apiserver-client"
|
||||
|
||||
// "kubernetes.io/kube-apiserver-client-kubelet" issues client certificates that kubelets use to authenticate to kube-apiserver.
|
||||
// Can be auto-approved by the "csrapproving" controller in kube-controller-manager.
|
||||
// Can be issued by the "csrsigning" controller in kube-controller-manager.
|
||||
#KubeAPIServerClientKubeletSignerName: "kubernetes.io/kube-apiserver-client-kubelet"
|
||||
|
||||
// "kubernetes.io/kubelet-serving" issues serving certificates that kubelets use to serve TLS endpoints,
|
||||
// which kube-apiserver can connect to securely.
|
||||
// Never auto-approved by kube-controller-manager.
|
||||
// Can be issued by the "csrsigning" controller in kube-controller-manager.
|
||||
#KubeletServingSignerName: "kubernetes.io/kubelet-serving"
|
||||
|
||||
// ExtraValue masks the value so protobuf can generate
|
||||
// +protobuf.nullable=true
|
||||
// +protobuf.options.(gogoproto.goproto_stringer)=false
|
||||
#ExtraValue: [...string]
|
||||
|
||||
// CertificateSigningRequestStatus contains conditions used to indicate
|
||||
// approved/denied/failed status of the request, and the issued certificate.
|
||||
#CertificateSigningRequestStatus: {
|
||||
// conditions applied to the request. Known conditions are "Approved", "Denied", and "Failed".
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
// +optional
|
||||
conditions?: [...#CertificateSigningRequestCondition] @go(Conditions,[]CertificateSigningRequestCondition) @protobuf(1,bytes,rep)
|
||||
|
||||
// certificate is populated with an issued certificate by the signer after an Approved condition is present.
|
||||
// This field is set via the /status subresource. Once populated, this field is immutable.
|
||||
//
|
||||
// If the certificate signing request is denied, a condition of type "Denied" is added and this field remains empty.
|
||||
// If the signer cannot issue the certificate, a condition of type "Failed" is added and this field remains empty.
|
||||
//
|
||||
// Validation requirements:
|
||||
// 1. certificate must contain one or more PEM blocks.
|
||||
// 2. All PEM blocks must have the "CERTIFICATE" label, contain no headers, and the encoded data
|
||||
// must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.
|
||||
// 3. Non-PEM content may appear before or after the "CERTIFICATE" PEM blocks and is unvalidated,
|
||||
// to allow for explanatory text as described in section 5.2 of RFC7468.
|
||||
//
|
||||
// If more than one PEM block is present, and the definition of the requested spec.signerName
|
||||
// does not indicate otherwise, the first block is the issued certificate,
|
||||
// and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.
|
||||
//
|
||||
// The certificate is encoded in PEM format.
|
||||
//
|
||||
// When serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:
|
||||
//
|
||||
// base64(
|
||||
// -----BEGIN CERTIFICATE-----
|
||||
// ...
|
||||
// -----END CERTIFICATE-----
|
||||
// )
|
||||
//
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
certificate?: bytes @go(Certificate,[]byte) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// RequestConditionType is the type of a CertificateSigningRequestCondition
|
||||
#RequestConditionType: string // #enumRequestConditionType
|
||||
|
||||
#enumRequestConditionType:
|
||||
#CertificateApproved |
|
||||
#CertificateDenied |
|
||||
#CertificateFailed
|
||||
|
||||
// Approved indicates the request was approved and should be issued by the signer.
|
||||
#CertificateApproved: #RequestConditionType & "Approved"
|
||||
|
||||
// Denied indicates the request was denied and should not be issued by the signer.
|
||||
#CertificateDenied: #RequestConditionType & "Denied"
|
||||
|
||||
// Failed indicates the signer failed to issue the certificate.
|
||||
#CertificateFailed: #RequestConditionType & "Failed"
|
||||
|
||||
// CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object
|
||||
#CertificateSigningRequestCondition: {
|
||||
// type of the condition. Known conditions are "Approved", "Denied", and "Failed".
|
||||
//
|
||||
// An "Approved" condition is added via the /approval subresource,
|
||||
// indicating the request was approved and should be issued by the signer.
|
||||
//
|
||||
// A "Denied" condition is added via the /approval subresource,
|
||||
// indicating the request was denied and should not be issued by the signer.
|
||||
//
|
||||
// A "Failed" condition is added via the /status subresource,
|
||||
// indicating the signer failed to issue the certificate.
|
||||
//
|
||||
// Approved and Denied conditions are mutually exclusive.
|
||||
// Approved, Denied, and Failed conditions cannot be removed once added.
|
||||
//
|
||||
// Only one condition of a given type is allowed.
|
||||
type: #RequestConditionType @go(Type) @protobuf(1,bytes,opt,casttype=RequestConditionType)
|
||||
|
||||
// status of the condition, one of True, False, Unknown.
|
||||
// Approved, Denied, and Failed conditions may not be "False" or "Unknown".
|
||||
status: v1.#ConditionStatus @go(Status) @protobuf(6,bytes,opt,casttype=k8s.io/api/core/v1.ConditionStatus)
|
||||
|
||||
// reason indicates a brief reason for the request state
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(2,bytes,opt)
|
||||
|
||||
// message contains a human readable message with details about the request state
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(3,bytes,opt)
|
||||
|
||||
// lastUpdateTime is the time of the last update to this condition
|
||||
// +optional
|
||||
lastUpdateTime?: metav1.#Time @go(LastUpdateTime) @protobuf(4,bytes,opt)
|
||||
|
||||
// lastTransitionTime is the time the condition last transitioned from one status to another.
|
||||
// If unset, when a new condition type is added or an existing condition's status is changed,
|
||||
// the server defaults this to the current time.
|
||||
// +optional
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// CertificateSigningRequestList is a collection of CertificateSigningRequest objects
|
||||
#CertificateSigningRequestList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is a collection of CertificateSigningRequest objects
|
||||
items: [...#CertificateSigningRequest] @go(Items,[]CertificateSigningRequest) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// KeyUsage specifies valid usage contexts for keys.
|
||||
// See:
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5280#section-4.2.1.3
|
||||
// https://tools.ietf.org/html/rfc5280#section-4.2.1.12
|
||||
//
|
||||
// +enum
|
||||
#KeyUsage: string // #enumKeyUsage
|
||||
|
||||
#enumKeyUsage:
|
||||
#UsageSigning |
|
||||
#UsageDigitalSignature |
|
||||
#UsageContentCommitment |
|
||||
#UsageKeyEncipherment |
|
||||
#UsageKeyAgreement |
|
||||
#UsageDataEncipherment |
|
||||
#UsageCertSign |
|
||||
#UsageCRLSign |
|
||||
#UsageEncipherOnly |
|
||||
#UsageDecipherOnly |
|
||||
#UsageAny |
|
||||
#UsageServerAuth |
|
||||
#UsageClientAuth |
|
||||
#UsageCodeSigning |
|
||||
#UsageEmailProtection |
|
||||
#UsageSMIME |
|
||||
#UsageIPsecEndSystem |
|
||||
#UsageIPsecTunnel |
|
||||
#UsageIPsecUser |
|
||||
#UsageTimestamping |
|
||||
#UsageOCSPSigning |
|
||||
#UsageMicrosoftSGC |
|
||||
#UsageNetscapeSGC
|
||||
|
||||
#UsageSigning: #KeyUsage & "signing"
|
||||
#UsageDigitalSignature: #KeyUsage & "digital signature"
|
||||
#UsageContentCommitment: #KeyUsage & "content commitment"
|
||||
#UsageKeyEncipherment: #KeyUsage & "key encipherment"
|
||||
#UsageKeyAgreement: #KeyUsage & "key agreement"
|
||||
#UsageDataEncipherment: #KeyUsage & "data encipherment"
|
||||
#UsageCertSign: #KeyUsage & "cert sign"
|
||||
#UsageCRLSign: #KeyUsage & "crl sign"
|
||||
#UsageEncipherOnly: #KeyUsage & "encipher only"
|
||||
#UsageDecipherOnly: #KeyUsage & "decipher only"
|
||||
#UsageAny: #KeyUsage & "any"
|
||||
#UsageServerAuth: #KeyUsage & "server auth"
|
||||
#UsageClientAuth: #KeyUsage & "client auth"
|
||||
#UsageCodeSigning: #KeyUsage & "code signing"
|
||||
#UsageEmailProtection: #KeyUsage & "email protection"
|
||||
#UsageSMIME: #KeyUsage & "s/mime"
|
||||
#UsageIPsecEndSystem: #KeyUsage & "ipsec end system"
|
||||
#UsageIPsecTunnel: #KeyUsage & "ipsec tunnel"
|
||||
#UsageIPsecUser: #KeyUsage & "ipsec user"
|
||||
#UsageTimestamping: #KeyUsage & "timestamping"
|
||||
#UsageOCSPSigning: #KeyUsage & "ocsp signing"
|
||||
#UsageMicrosoftSGC: #KeyUsage & "microsoft sgc"
|
||||
#UsageNetscapeSGC: #KeyUsage & "netscape sgc"
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/certificates/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
#GroupName: "certificates.k8s.io"
|
||||
@@ -0,0 +1,84 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/certificates/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors
|
||||
// (root certificates).
|
||||
//
|
||||
// ClusterTrustBundle objects are considered to be readable by any authenticated
|
||||
// user in the cluster, because they can be mounted by pods using the
|
||||
// `clusterTrustBundle` projection. All service accounts have read access to
|
||||
// ClusterTrustBundles by default. Users who only have namespace-level access
|
||||
// to a cluster can read ClusterTrustBundles by impersonating a serviceaccount
|
||||
// that they have access to.
|
||||
//
|
||||
// It can be optionally associated with a particular assigner, in which case it
|
||||
// contains one valid set of trust anchors for that signer. Signers may have
|
||||
// multiple associated ClusterTrustBundles; each is an independent set of trust
|
||||
// anchors for that signer. Admission control is used to enforce that only users
|
||||
// with permissions on the signer can create or modify the corresponding bundle.
|
||||
#ClusterTrustBundle: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// metadata contains the object metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// spec contains the signer (if any) and trust anchors.
|
||||
spec: #ClusterTrustBundleSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// ClusterTrustBundleSpec contains the signer and trust anchors.
|
||||
#ClusterTrustBundleSpec: {
|
||||
// signerName indicates the associated signer, if any.
|
||||
//
|
||||
// In order to create or update a ClusterTrustBundle that sets signerName,
|
||||
// you must have the following cluster-scoped permission:
|
||||
// group=certificates.k8s.io resource=signers resourceName=<the signer name>
|
||||
// verb=attest.
|
||||
//
|
||||
// If signerName is not empty, then the ClusterTrustBundle object must be
|
||||
// named with the signer name as a prefix (translating slashes to colons).
|
||||
// For example, for the signer name `example.com/foo`, valid
|
||||
// ClusterTrustBundle object names include `example.com:foo:abc` and
|
||||
// `example.com:foo:v1`.
|
||||
//
|
||||
// If signerName is empty, then the ClusterTrustBundle object's name must
|
||||
// not have such a prefix.
|
||||
//
|
||||
// List/watch requests for ClusterTrustBundles can filter on this field
|
||||
// using a `spec.signerName=NAME` field selector.
|
||||
//
|
||||
// +optional
|
||||
signerName?: string @go(SignerName) @protobuf(1,bytes,opt)
|
||||
|
||||
// trustBundle contains the individual X.509 trust anchors for this
|
||||
// bundle, as PEM bundle of PEM-wrapped, DER-formatted X.509 certificates.
|
||||
//
|
||||
// The data must consist only of PEM certificate blocks that parse as valid
|
||||
// X.509 certificates. Each certificate must include a basic constraints
|
||||
// extension with the CA bit set. The API server will reject objects that
|
||||
// contain duplicate certificates, or that use PEM block headers.
|
||||
//
|
||||
// Users of ClusterTrustBundles, including Kubelet, are free to reorder and
|
||||
// deduplicate certificate blocks in this file according to their own logic,
|
||||
// as well as to drop PEM block headers and inter-block data.
|
||||
trustBundle: string @go(TrustBundle) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// ClusterTrustBundleList is a collection of ClusterTrustBundle objects
|
||||
#ClusterTrustBundleList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// metadata contains the list metadata.
|
||||
//
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is a collection of ClusterTrustBundle objects
|
||||
items: [...#ClusterTrustBundle] @go(Items,[]ClusterTrustBundle) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/certificates/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "certificates.k8s.io"
|
||||
@@ -0,0 +1,263 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/certificates/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// Describes a certificate signing request
|
||||
#CertificateSigningRequest: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// spec contains the certificate request, and is immutable after creation.
|
||||
// Only the request, signerName, expirationSeconds, and usages fields can be set on creation.
|
||||
// Other fields are derived by Kubernetes and cannot be modified by users.
|
||||
spec: #CertificateSigningRequestSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// Derived information about the request.
|
||||
// +optional
|
||||
status?: #CertificateSigningRequestStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// CertificateSigningRequestSpec contains the certificate request.
|
||||
#CertificateSigningRequestSpec: {
|
||||
// Base64-encoded PKCS#10 CSR data
|
||||
// +listType=atomic
|
||||
request: bytes @go(Request,[]byte) @protobuf(1,bytes,opt)
|
||||
|
||||
// Requested signer for the request. It is a qualified name in the form:
|
||||
// `scope-hostname.io/name`.
|
||||
// If empty, it will be defaulted:
|
||||
// 1. If it's a kubelet client certificate, it is assigned
|
||||
// "kubernetes.io/kube-apiserver-client-kubelet".
|
||||
// 2. If it's a kubelet serving certificate, it is assigned
|
||||
// "kubernetes.io/kubelet-serving".
|
||||
// 3. Otherwise, it is assigned "kubernetes.io/legacy-unknown".
|
||||
// Distribution of trust for signers happens out of band.
|
||||
// You can select on this field using `spec.signerName`.
|
||||
// +optional
|
||||
signerName?: null | string @go(SignerName,*string) @protobuf(7,bytes,opt)
|
||||
|
||||
// expirationSeconds is the requested duration of validity of the issued
|
||||
// certificate. The certificate signer may issue a certificate with a different
|
||||
// validity duration so a client must check the delta between the notBefore and
|
||||
// and notAfter fields in the issued certificate to determine the actual duration.
|
||||
//
|
||||
// The v1.22+ in-tree implementations of the well-known Kubernetes signers will
|
||||
// honor this field as long as the requested duration is not greater than the
|
||||
// maximum duration they will honor per the --cluster-signing-duration CLI
|
||||
// flag to the Kubernetes controller manager.
|
||||
//
|
||||
// Certificate signers may not honor this field for various reasons:
|
||||
//
|
||||
// 1. Old signer that is unaware of the field (such as the in-tree
|
||||
// implementations prior to v1.22)
|
||||
// 2. Signer whose configured maximum is shorter than the requested duration
|
||||
// 3. Signer whose configured minimum is longer than the requested duration
|
||||
//
|
||||
// The minimum valid value for expirationSeconds is 600, i.e. 10 minutes.
|
||||
//
|
||||
// +optional
|
||||
expirationSeconds?: null | int32 @go(ExpirationSeconds,*int32) @protobuf(8,varint,opt)
|
||||
|
||||
// allowedUsages specifies a set of usage contexts the key will be
|
||||
// valid for.
|
||||
// See:
|
||||
// https://tools.ietf.org/html/rfc5280#section-4.2.1.3
|
||||
// https://tools.ietf.org/html/rfc5280#section-4.2.1.12
|
||||
//
|
||||
// Valid values are:
|
||||
// "signing",
|
||||
// "digital signature",
|
||||
// "content commitment",
|
||||
// "key encipherment",
|
||||
// "key agreement",
|
||||
// "data encipherment",
|
||||
// "cert sign",
|
||||
// "crl sign",
|
||||
// "encipher only",
|
||||
// "decipher only",
|
||||
// "any",
|
||||
// "server auth",
|
||||
// "client auth",
|
||||
// "code signing",
|
||||
// "email protection",
|
||||
// "s/mime",
|
||||
// "ipsec end system",
|
||||
// "ipsec tunnel",
|
||||
// "ipsec user",
|
||||
// "timestamping",
|
||||
// "ocsp signing",
|
||||
// "microsoft sgc",
|
||||
// "netscape sgc"
|
||||
// +listType=atomic
|
||||
usages?: [...#KeyUsage] @go(Usages,[]KeyUsage) @protobuf(5,bytes,opt)
|
||||
|
||||
// Information about the requesting user.
|
||||
// See user.Info interface for details.
|
||||
// +optional
|
||||
username?: string @go(Username) @protobuf(2,bytes,opt)
|
||||
|
||||
// UID information about the requesting user.
|
||||
// See user.Info interface for details.
|
||||
// +optional
|
||||
uid?: string @go(UID) @protobuf(3,bytes,opt)
|
||||
|
||||
// Group information about the requesting user.
|
||||
// See user.Info interface for details.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
groups?: [...string] @go(Groups,[]string) @protobuf(4,bytes,rep)
|
||||
|
||||
// Extra information about the requesting user.
|
||||
// See user.Info interface for details.
|
||||
// +optional
|
||||
extra?: {[string]: #ExtraValue} @go(Extra,map[string]ExtraValue) @protobuf(6,bytes,rep)
|
||||
}
|
||||
|
||||
// Signs certificates that will be honored as client-certs by the
|
||||
// kube-apiserver. Never auto-approved by kube-controller-manager.
|
||||
#KubeAPIServerClientSignerName: "kubernetes.io/kube-apiserver-client"
|
||||
|
||||
// Signs client certificates that will be honored as client-certs by the
|
||||
// kube-apiserver for a kubelet.
|
||||
// May be auto-approved by kube-controller-manager.
|
||||
#KubeAPIServerClientKubeletSignerName: "kubernetes.io/kube-apiserver-client-kubelet"
|
||||
|
||||
// Signs serving certificates that are honored as a valid kubelet serving
|
||||
// certificate by the kube-apiserver, but has no other guarantees.
|
||||
#KubeletServingSignerName: "kubernetes.io/kubelet-serving"
|
||||
|
||||
// Has no guarantees for trust at all. Some distributions may honor these
|
||||
// as client certs, but that behavior is not standard kubernetes behavior.
|
||||
#LegacyUnknownSignerName: "kubernetes.io/legacy-unknown"
|
||||
|
||||
// ExtraValue masks the value so protobuf can generate
|
||||
// +protobuf.nullable=true
|
||||
// +protobuf.options.(gogoproto.goproto_stringer)=false
|
||||
#ExtraValue: [...string]
|
||||
|
||||
#CertificateSigningRequestStatus: {
|
||||
// Conditions applied to the request, such as approval or denial.
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
// +optional
|
||||
conditions?: [...#CertificateSigningRequestCondition] @go(Conditions,[]CertificateSigningRequestCondition) @protobuf(1,bytes,rep)
|
||||
|
||||
// If request was approved, the controller will place the issued certificate here.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
certificate?: bytes @go(Certificate,[]byte) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
#RequestConditionType: string // #enumRequestConditionType
|
||||
|
||||
#enumRequestConditionType:
|
||||
#CertificateApproved |
|
||||
#CertificateDenied |
|
||||
#CertificateFailed
|
||||
|
||||
#CertificateApproved: #RequestConditionType & "Approved"
|
||||
#CertificateDenied: #RequestConditionType & "Denied"
|
||||
#CertificateFailed: #RequestConditionType & "Failed"
|
||||
|
||||
#CertificateSigningRequestCondition: {
|
||||
// type of the condition. Known conditions include "Approved", "Denied", and "Failed".
|
||||
type: #RequestConditionType @go(Type) @protobuf(1,bytes,opt,casttype=RequestConditionType)
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
// Approved, Denied, and Failed conditions may not be "False" or "Unknown".
|
||||
// Defaults to "True".
|
||||
// If unset, should be treated as "True".
|
||||
// +optional
|
||||
status?: v1.#ConditionStatus @go(Status) @protobuf(6,bytes,opt,casttype=k8s.io/api/core/v1.ConditionStatus)
|
||||
|
||||
// brief reason for the request state
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(2,bytes,opt)
|
||||
|
||||
// human readable message with details about the request state
|
||||
// +optional
|
||||
message?: string @go(Message) @protobuf(3,bytes,opt)
|
||||
|
||||
// timestamp for the last update to this condition
|
||||
// +optional
|
||||
lastUpdateTime?: metav1.#Time @go(LastUpdateTime) @protobuf(4,bytes,opt)
|
||||
|
||||
// lastTransitionTime is the time the condition last transitioned from one status to another.
|
||||
// If unset, when a new condition type is added or an existing condition's status is changed,
|
||||
// the server defaults this to the current time.
|
||||
// +optional
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
#CertificateSigningRequestList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
items: [...#CertificateSigningRequest] @go(Items,[]CertificateSigningRequest) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// KeyUsages specifies valid usage contexts for keys.
|
||||
// See:
|
||||
//
|
||||
// https://tools.ietf.org/html/rfc5280#section-4.2.1.3
|
||||
// https://tools.ietf.org/html/rfc5280#section-4.2.1.12
|
||||
#KeyUsage: string // #enumKeyUsage
|
||||
|
||||
#enumKeyUsage:
|
||||
#UsageSigning |
|
||||
#UsageDigitalSignature |
|
||||
#UsageContentCommitment |
|
||||
#UsageKeyEncipherment |
|
||||
#UsageKeyAgreement |
|
||||
#UsageDataEncipherment |
|
||||
#UsageCertSign |
|
||||
#UsageCRLSign |
|
||||
#UsageEncipherOnly |
|
||||
#UsageDecipherOnly |
|
||||
#UsageAny |
|
||||
#UsageServerAuth |
|
||||
#UsageClientAuth |
|
||||
#UsageCodeSigning |
|
||||
#UsageEmailProtection |
|
||||
#UsageSMIME |
|
||||
#UsageIPsecEndSystem |
|
||||
#UsageIPsecTunnel |
|
||||
#UsageIPsecUser |
|
||||
#UsageTimestamping |
|
||||
#UsageOCSPSigning |
|
||||
#UsageMicrosoftSGC |
|
||||
#UsageNetscapeSGC
|
||||
|
||||
#UsageSigning: #KeyUsage & "signing"
|
||||
#UsageDigitalSignature: #KeyUsage & "digital signature"
|
||||
#UsageContentCommitment: #KeyUsage & "content commitment"
|
||||
#UsageKeyEncipherment: #KeyUsage & "key encipherment"
|
||||
#UsageKeyAgreement: #KeyUsage & "key agreement"
|
||||
#UsageDataEncipherment: #KeyUsage & "data encipherment"
|
||||
#UsageCertSign: #KeyUsage & "cert sign"
|
||||
#UsageCRLSign: #KeyUsage & "crl sign"
|
||||
#UsageEncipherOnly: #KeyUsage & "encipher only"
|
||||
#UsageDecipherOnly: #KeyUsage & "decipher only"
|
||||
#UsageAny: #KeyUsage & "any"
|
||||
#UsageServerAuth: #KeyUsage & "server auth"
|
||||
#UsageClientAuth: #KeyUsage & "client auth"
|
||||
#UsageCodeSigning: #KeyUsage & "code signing"
|
||||
#UsageEmailProtection: #KeyUsage & "email protection"
|
||||
#UsageSMIME: #KeyUsage & "s/mime"
|
||||
#UsageIPsecEndSystem: #KeyUsage & "ipsec end system"
|
||||
#UsageIPsecTunnel: #KeyUsage & "ipsec tunnel"
|
||||
#UsageIPsecUser: #KeyUsage & "ipsec user"
|
||||
#UsageTimestamping: #KeyUsage & "timestamping"
|
||||
#UsageOCSPSigning: #KeyUsage & "ocsp signing"
|
||||
#UsageMicrosoftSGC: #KeyUsage & "microsoft sgc"
|
||||
#UsageNetscapeSGC: #KeyUsage & "netscape sgc"
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/coordination/v1
|
||||
|
||||
package v1
|
||||
|
||||
#GroupName: "coordination.k8s.io"
|
||||
@@ -0,0 +1,61 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/coordination/v1
|
||||
|
||||
package v1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// Lease defines a lease concept.
|
||||
#Lease: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// spec contains the specification of the Lease.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #LeaseSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// LeaseSpec is a specification of a Lease.
|
||||
#LeaseSpec: {
|
||||
// holderIdentity contains the identity of the holder of a current lease.
|
||||
// +optional
|
||||
holderIdentity?: null | string @go(HolderIdentity,*string) @protobuf(1,bytes,opt)
|
||||
|
||||
// leaseDurationSeconds is a duration that candidates for a lease need
|
||||
// to wait to force acquire it. This is measure against time of last
|
||||
// observed renewTime.
|
||||
// +optional
|
||||
leaseDurationSeconds?: null | int32 @go(LeaseDurationSeconds,*int32) @protobuf(2,varint,opt)
|
||||
|
||||
// acquireTime is a time when the current lease was acquired.
|
||||
// +optional
|
||||
acquireTime?: null | metav1.#MicroTime @go(AcquireTime,*metav1.MicroTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// renewTime is a time when the current holder of a lease has last
|
||||
// updated the lease.
|
||||
// +optional
|
||||
renewTime?: null | metav1.#MicroTime @go(RenewTime,*metav1.MicroTime) @protobuf(4,bytes,opt)
|
||||
|
||||
// leaseTransitions is the number of transitions of a lease between
|
||||
// holders.
|
||||
// +optional
|
||||
leaseTransitions?: null | int32 @go(LeaseTransitions,*int32) @protobuf(5,varint,opt)
|
||||
}
|
||||
|
||||
// LeaseList is a list of Lease objects.
|
||||
#LeaseList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is a list of schema objects.
|
||||
items: [...#Lease] @go(Items,[]Lease) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/coordination/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "coordination.k8s.io"
|
||||
@@ -0,0 +1,61 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/coordination/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
// Lease defines a lease concept.
|
||||
#Lease: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// spec contains the specification of the Lease.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #LeaseSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// LeaseSpec is a specification of a Lease.
|
||||
#LeaseSpec: {
|
||||
// holderIdentity contains the identity of the holder of a current lease.
|
||||
// +optional
|
||||
holderIdentity?: null | string @go(HolderIdentity,*string) @protobuf(1,bytes,opt)
|
||||
|
||||
// leaseDurationSeconds is a duration that candidates for a lease need
|
||||
// to wait to force acquire it. This is measure against time of last
|
||||
// observed renewTime.
|
||||
// +optional
|
||||
leaseDurationSeconds?: null | int32 @go(LeaseDurationSeconds,*int32) @protobuf(2,varint,opt)
|
||||
|
||||
// acquireTime is a time when the current lease was acquired.
|
||||
// +optional
|
||||
acquireTime?: null | metav1.#MicroTime @go(AcquireTime,*metav1.MicroTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// renewTime is a time when the current holder of a lease has last
|
||||
// updated the lease.
|
||||
// +optional
|
||||
renewTime?: null | metav1.#MicroTime @go(RenewTime,*metav1.MicroTime) @protobuf(4,bytes,opt)
|
||||
|
||||
// leaseTransitions is the number of transitions of a lease between
|
||||
// holders.
|
||||
// +optional
|
||||
leaseTransitions?: null | int32 @go(LeaseTransitions,*int32) @protobuf(5,varint,opt)
|
||||
}
|
||||
|
||||
// LeaseList is a list of Lease objects.
|
||||
#LeaseList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is a list of schema objects.
|
||||
items: [...#Lease] @go(Items,[]Lease) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -473,7 +473,7 @@ import (
|
||||
|
||||
// lastPhaseTransitionTime is the time the phase transitioned from one to another
|
||||
// and automatically resets to current time everytime a volume phase transitions.
|
||||
// This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature.
|
||||
// This is a beta field and requires the PersistentVolumeLastPhaseTransitionTime feature to be enabled (enabled by default).
|
||||
// +featureGate=PersistentVolumeLastPhaseTransitionTime
|
||||
// +optional
|
||||
lastPhaseTransitionTime?: null | metav1.#Time @go(LastPhaseTransitionTime,*metav1.Time) @protobuf(4,bytes,opt)
|
||||
@@ -2164,7 +2164,7 @@ import (
|
||||
|
||||
// serviceAccountToken is information about the serviceAccountToken data to project
|
||||
// +optional
|
||||
serviceAccountToken?: null | #ServiceAccountTokenProjection @go(ServiceAccountToken,*ServiceAccountTokenProjection) @protobuf(4,bytes,opt)
|
||||
serviceAccountToken?: #ServiceAccountTokenProjection @go(ServiceAccountToken,*ServiceAccountTokenProjection) @protobuf(4,bytes,opt)
|
||||
|
||||
// ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field
|
||||
// of ClusterTrustBundle objects in an auto-updating file.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/discovery/v1
|
||||
|
||||
package v1
|
||||
|
||||
#GroupName: "discovery.k8s.io"
|
||||
@@ -0,0 +1,206 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/discovery/v1
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// EndpointSlice represents a subset of the endpoints that implement a service.
|
||||
// For a given service there may be multiple EndpointSlice objects, selected by
|
||||
// labels, which must be joined to produce the full set of endpoints.
|
||||
#EndpointSlice: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// addressType specifies the type of address carried by this EndpointSlice.
|
||||
// All addresses in this slice must be the same type. This field is
|
||||
// immutable after creation. The following address types are currently
|
||||
// supported:
|
||||
// * IPv4: Represents an IPv4 Address.
|
||||
// * IPv6: Represents an IPv6 Address.
|
||||
// * FQDN: Represents a Fully Qualified Domain Name.
|
||||
addressType: #AddressType @go(AddressType) @protobuf(4,bytes,rep)
|
||||
|
||||
// endpoints is a list of unique endpoints in this slice. Each slice may
|
||||
// include a maximum of 1000 endpoints.
|
||||
// +listType=atomic
|
||||
endpoints: [...#Endpoint] @go(Endpoints,[]Endpoint) @protobuf(2,bytes,rep)
|
||||
|
||||
// ports specifies the list of network ports exposed by each endpoint in
|
||||
// this slice. Each port must have a unique name. When ports is empty, it
|
||||
// indicates that there are no defined ports. When a port is defined with a
|
||||
// nil port value, it indicates "all ports". Each slice may include a
|
||||
// maximum of 100 ports.
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
ports?: [...#EndpointPort] @go(Ports,[]EndpointPort) @protobuf(3,bytes,rep)
|
||||
}
|
||||
|
||||
// AddressType represents the type of address referred to by an endpoint.
|
||||
// +enum
|
||||
#AddressType: string // #enumAddressType
|
||||
|
||||
#enumAddressType:
|
||||
#AddressTypeIPv4 |
|
||||
#AddressTypeIPv6 |
|
||||
#AddressTypeFQDN
|
||||
|
||||
// AddressTypeIPv4 represents an IPv4 Address.
|
||||
#AddressTypeIPv4: #AddressType & "IPv4"
|
||||
|
||||
// AddressTypeIPv6 represents an IPv6 Address.
|
||||
#AddressTypeIPv6: #AddressType & "IPv6"
|
||||
|
||||
// AddressTypeFQDN represents a FQDN.
|
||||
#AddressTypeFQDN: #AddressType & "FQDN"
|
||||
|
||||
// Endpoint represents a single logical "backend" implementing a service.
|
||||
#Endpoint: {
|
||||
// addresses of this endpoint. The contents of this field are interpreted
|
||||
// according to the corresponding EndpointSlice addressType field. Consumers
|
||||
// must handle different types of addresses in the context of their own
|
||||
// capabilities. This must contain at least one address but no more than
|
||||
// 100. These are all assumed to be fungible and clients may choose to only
|
||||
// use the first element. Refer to: https://issue.k8s.io/106267
|
||||
// +listType=set
|
||||
addresses: [...string] @go(Addresses,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// conditions contains information about the current status of the endpoint.
|
||||
conditions?: #EndpointConditions @go(Conditions) @protobuf(2,bytes,opt)
|
||||
|
||||
// hostname of this endpoint. This field may be used by consumers of
|
||||
// endpoints to distinguish endpoints from each other (e.g. in DNS names).
|
||||
// Multiple endpoints which use the same hostname should be considered
|
||||
// fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS
|
||||
// Label (RFC 1123) validation.
|
||||
// +optional
|
||||
hostname?: null | string @go(Hostname,*string) @protobuf(3,bytes,opt)
|
||||
|
||||
// targetRef is a reference to a Kubernetes object that represents this
|
||||
// endpoint.
|
||||
// +optional
|
||||
targetRef?: null | v1.#ObjectReference @go(TargetRef,*v1.ObjectReference) @protobuf(4,bytes,opt)
|
||||
|
||||
// deprecatedTopology contains topology information part of the v1beta1
|
||||
// API. This field is deprecated, and will be removed when the v1beta1
|
||||
// API is removed (no sooner than kubernetes v1.24). While this field can
|
||||
// hold values, it is not writable through the v1 API, and any attempts to
|
||||
// write to it will be silently ignored. Topology information can be found
|
||||
// in the zone and nodeName fields instead.
|
||||
// +optional
|
||||
deprecatedTopology?: {[string]: string} @go(DeprecatedTopology,map[string]string) @protobuf(5,bytes,opt)
|
||||
|
||||
// nodeName represents the name of the Node hosting this endpoint. This can
|
||||
// be used to determine endpoints local to a Node.
|
||||
// +optional
|
||||
nodeName?: null | string @go(NodeName,*string) @protobuf(6,bytes,opt)
|
||||
|
||||
// zone is the name of the Zone this endpoint exists in.
|
||||
// +optional
|
||||
zone?: null | string @go(Zone,*string) @protobuf(7,bytes,opt)
|
||||
|
||||
// hints contains information associated with how an endpoint should be
|
||||
// consumed.
|
||||
// +optional
|
||||
hints?: null | #EndpointHints @go(Hints,*EndpointHints) @protobuf(8,bytes,opt)
|
||||
}
|
||||
|
||||
// EndpointConditions represents the current condition of an endpoint.
|
||||
#EndpointConditions: {
|
||||
// ready indicates that this endpoint is prepared to receive traffic,
|
||||
// according to whatever system is managing the endpoint. A nil value
|
||||
// indicates an unknown state. In most cases consumers should interpret this
|
||||
// unknown state as ready. For compatibility reasons, ready should never be
|
||||
// "true" for terminating endpoints, except when the normal readiness
|
||||
// behavior is being explicitly overridden, for example when the associated
|
||||
// Service has set the publishNotReadyAddresses flag.
|
||||
// +optional
|
||||
ready?: null | bool @go(Ready,*bool) @protobuf(1,bytes)
|
||||
|
||||
// serving is identical to ready except that it is set regardless of the
|
||||
// terminating state of endpoints. This condition should be set to true for
|
||||
// a ready endpoint that is terminating. If nil, consumers should defer to
|
||||
// the ready condition.
|
||||
// +optional
|
||||
serving?: null | bool @go(Serving,*bool) @protobuf(2,bytes)
|
||||
|
||||
// terminating indicates that this endpoint is terminating. A nil value
|
||||
// indicates an unknown state. Consumers should interpret this unknown state
|
||||
// to mean that the endpoint is not terminating.
|
||||
// +optional
|
||||
terminating?: null | bool @go(Terminating,*bool) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// EndpointHints provides hints describing how an endpoint should be consumed.
|
||||
#EndpointHints: {
|
||||
// forZones indicates the zone(s) this endpoint should be consumed by to
|
||||
// enable topology aware routing.
|
||||
// +listType=atomic
|
||||
forZones?: [...#ForZone] @go(ForZones,[]ForZone) @protobuf(1,bytes)
|
||||
}
|
||||
|
||||
// ForZone provides information about which zones should consume this endpoint.
|
||||
#ForZone: {
|
||||
// name represents the name of the zone.
|
||||
name: string @go(Name) @protobuf(1,bytes)
|
||||
}
|
||||
|
||||
// EndpointPort represents a Port used by an EndpointSlice
|
||||
// +structType=atomic
|
||||
#EndpointPort: {
|
||||
// name represents the name of this port. All ports in an EndpointSlice must have a unique name.
|
||||
// If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name.
|
||||
// Name must either be an empty string or pass DNS_LABEL validation:
|
||||
// * must be no more than 63 characters long.
|
||||
// * must consist of lower case alphanumeric characters or '-'.
|
||||
// * must start and end with an alphanumeric character.
|
||||
// Default is empty string.
|
||||
name?: null | string @go(Name,*string) @protobuf(1,bytes)
|
||||
|
||||
// protocol represents the IP protocol for this port.
|
||||
// Must be UDP, TCP, or SCTP.
|
||||
// Default is TCP.
|
||||
protocol?: null | v1.#Protocol @go(Protocol,*v1.Protocol) @protobuf(2,bytes)
|
||||
|
||||
// port represents the port number of the endpoint.
|
||||
// If this is not specified, ports are not restricted and must be
|
||||
// interpreted in the context of the specific consumer.
|
||||
port?: null | int32 @go(Port,*int32) @protobuf(3,bytes,opt)
|
||||
|
||||
// The application protocol for this port.
|
||||
// This is used as a hint for implementations to offer richer behavior for protocols that they understand.
|
||||
// This field follows standard Kubernetes label syntax.
|
||||
// Valid values are either:
|
||||
//
|
||||
// * Un-prefixed protocol names - reserved for IANA standard service names (as per
|
||||
// RFC-6335 and https://www.iana.org/assignments/service-names).
|
||||
//
|
||||
// * Kubernetes-defined prefixed names:
|
||||
// * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-
|
||||
// * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
|
||||
// * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
|
||||
//
|
||||
// * Other protocols should use implementation-defined prefixed names such as
|
||||
// mycompany.com/my-custom-protocol.
|
||||
// +optional
|
||||
appProtocol?: null | string @go(AppProtocol,*string) @protobuf(4,bytes)
|
||||
}
|
||||
|
||||
// EndpointSliceList represents a list of endpoint slices
|
||||
#EndpointSliceList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is the list of endpoint slices
|
||||
items: [...#EndpointSlice] @go(Items,[]EndpointSlice) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/discovery/v1
|
||||
|
||||
package v1
|
||||
|
||||
// LabelServiceName is used to indicate the name of a Kubernetes service.
|
||||
#LabelServiceName: "kubernetes.io/service-name"
|
||||
|
||||
// LabelManagedBy is used to indicate the controller or entity that manages
|
||||
// an EndpointSlice. This label aims to enable different EndpointSlice
|
||||
// objects to be managed by different controllers or entities within the
|
||||
// same cluster. It is highly recommended to configure this label for all
|
||||
// EndpointSlices.
|
||||
#LabelManagedBy: "endpointslice.kubernetes.io/managed-by"
|
||||
|
||||
// LabelSkipMirror can be set to true on an Endpoints resource to indicate
|
||||
// that the EndpointSliceMirroring controller should not mirror this
|
||||
// resource with EndpointSlices.
|
||||
#LabelSkipMirror: "endpointslice.kubernetes.io/skip-mirror"
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/discovery/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "discovery.k8s.io"
|
||||
@@ -0,0 +1,197 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/discovery/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// EndpointSlice represents a subset of the endpoints that implement a service.
|
||||
// For a given service there may be multiple EndpointSlice objects, selected by
|
||||
// labels, which must be joined to produce the full set of endpoints.
|
||||
#EndpointSlice: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// addressType specifies the type of address carried by this EndpointSlice.
|
||||
// All addresses in this slice must be the same type. This field is
|
||||
// immutable after creation. The following address types are currently
|
||||
// supported:
|
||||
// * IPv4: Represents an IPv4 Address.
|
||||
// * IPv6: Represents an IPv6 Address.
|
||||
// * FQDN: Represents a Fully Qualified Domain Name.
|
||||
addressType: #AddressType @go(AddressType) @protobuf(4,bytes,rep)
|
||||
|
||||
// endpoints is a list of unique endpoints in this slice. Each slice may
|
||||
// include a maximum of 1000 endpoints.
|
||||
// +listType=atomic
|
||||
endpoints: [...#Endpoint] @go(Endpoints,[]Endpoint) @protobuf(2,bytes,rep)
|
||||
|
||||
// ports specifies the list of network ports exposed by each endpoint in
|
||||
// this slice. Each port must have a unique name. When ports is empty, it
|
||||
// indicates that there are no defined ports. When a port is defined with a
|
||||
// nil port value, it indicates "all ports". Each slice may include a
|
||||
// maximum of 100 ports.
|
||||
// +optional
|
||||
// +listType=atomic
|
||||
ports?: [...#EndpointPort] @go(Ports,[]EndpointPort) @protobuf(3,bytes,rep)
|
||||
}
|
||||
|
||||
// AddressType represents the type of address referred to by an endpoint.
|
||||
#AddressType: string // #enumAddressType
|
||||
|
||||
#enumAddressType:
|
||||
#AddressTypeIPv4 |
|
||||
#AddressTypeIPv6 |
|
||||
#AddressTypeFQDN
|
||||
|
||||
// AddressTypeIPv4 represents an IPv4 Address.
|
||||
#AddressTypeIPv4: #AddressType & "IPv4"
|
||||
|
||||
// AddressTypeIPv6 represents an IPv6 Address.
|
||||
#AddressTypeIPv6: #AddressType & "IPv6"
|
||||
|
||||
// AddressTypeFQDN represents a FQDN.
|
||||
#AddressTypeFQDN: #AddressType & "FQDN"
|
||||
|
||||
// Endpoint represents a single logical "backend" implementing a service.
|
||||
#Endpoint: {
|
||||
// addresses of this endpoint. The contents of this field are interpreted
|
||||
// according to the corresponding EndpointSlice addressType field. Consumers
|
||||
// must handle different types of addresses in the context of their own
|
||||
// capabilities. This must contain at least one address but no more than
|
||||
// 100. These are all assumed to be fungible and clients may choose to only
|
||||
// use the first element. Refer to: https://issue.k8s.io/106267
|
||||
// +listType=set
|
||||
addresses: [...string] @go(Addresses,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// conditions contains information about the current status of the endpoint.
|
||||
conditions?: #EndpointConditions @go(Conditions) @protobuf(2,bytes,opt)
|
||||
|
||||
// hostname of this endpoint. This field may be used by consumers of
|
||||
// endpoints to distinguish endpoints from each other (e.g. in DNS names).
|
||||
// Multiple endpoints which use the same hostname should be considered
|
||||
// fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS
|
||||
// Label (RFC 1123) validation.
|
||||
// +optional
|
||||
hostname?: null | string @go(Hostname,*string) @protobuf(3,bytes,opt)
|
||||
|
||||
// targetRef is a reference to a Kubernetes object that represents this
|
||||
// endpoint.
|
||||
// +optional
|
||||
targetRef?: null | v1.#ObjectReference @go(TargetRef,*v1.ObjectReference) @protobuf(4,bytes,opt)
|
||||
|
||||
// topology contains arbitrary topology information associated with the
|
||||
// endpoint. These key/value pairs must conform with the label format.
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
|
||||
// Topology may include a maximum of 16 key/value pairs. This includes, but
|
||||
// is not limited to the following well known keys:
|
||||
// * kubernetes.io/hostname: the value indicates the hostname of the node
|
||||
// where the endpoint is located. This should match the corresponding
|
||||
// node label.
|
||||
// * topology.kubernetes.io/zone: the value indicates the zone where the
|
||||
// endpoint is located. This should match the corresponding node label.
|
||||
// * topology.kubernetes.io/region: the value indicates the region where the
|
||||
// endpoint is located. This should match the corresponding node label.
|
||||
// This field is deprecated and will be removed in future api versions.
|
||||
// +optional
|
||||
topology?: {[string]: string} @go(Topology,map[string]string) @protobuf(5,bytes,opt)
|
||||
|
||||
// nodeName represents the name of the Node hosting this endpoint. This can
|
||||
// be used to determine endpoints local to a Node.
|
||||
// +optional
|
||||
nodeName?: null | string @go(NodeName,*string) @protobuf(6,bytes,opt)
|
||||
|
||||
// hints contains information associated with how an endpoint should be
|
||||
// consumed.
|
||||
// +featureGate=TopologyAwareHints
|
||||
// +optional
|
||||
hints?: null | #EndpointHints @go(Hints,*EndpointHints) @protobuf(7,bytes,opt)
|
||||
}
|
||||
|
||||
// EndpointConditions represents the current condition of an endpoint.
|
||||
#EndpointConditions: {
|
||||
// ready indicates that this endpoint is prepared to receive traffic,
|
||||
// according to whatever system is managing the endpoint. A nil value
|
||||
// indicates an unknown state. In most cases consumers should interpret this
|
||||
// unknown state as ready. For compatibility reasons, ready should never be
|
||||
// "true" for terminating endpoints.
|
||||
// +optional
|
||||
ready?: null | bool @go(Ready,*bool) @protobuf(1,bytes)
|
||||
|
||||
// serving is identical to ready except that it is set regardless of the
|
||||
// terminating state of endpoints. This condition should be set to true for
|
||||
// a ready endpoint that is terminating. If nil, consumers should defer to
|
||||
// the ready condition.
|
||||
// +optional
|
||||
serving?: null | bool @go(Serving,*bool) @protobuf(2,bytes)
|
||||
|
||||
// terminating indicates that this endpoint is terminating. A nil value
|
||||
// indicates an unknown state. Consumers should interpret this unknown state
|
||||
// to mean that the endpoint is not terminating.
|
||||
// +optional
|
||||
terminating?: null | bool @go(Terminating,*bool) @protobuf(3,bytes)
|
||||
}
|
||||
|
||||
// EndpointHints provides hints describing how an endpoint should be consumed.
|
||||
#EndpointHints: {
|
||||
// forZones indicates the zone(s) this endpoint should be consumed by to
|
||||
// enable topology aware routing. May contain a maximum of 8 entries.
|
||||
// +listType=atomic
|
||||
forZones?: [...#ForZone] @go(ForZones,[]ForZone) @protobuf(1,bytes)
|
||||
}
|
||||
|
||||
// ForZone provides information about which zones should consume this endpoint.
|
||||
#ForZone: {
|
||||
// name represents the name of the zone.
|
||||
name: string @go(Name) @protobuf(1,bytes)
|
||||
}
|
||||
|
||||
// EndpointPort represents a Port used by an EndpointSlice
|
||||
#EndpointPort: {
|
||||
// name represents the name of this port. All ports in an EndpointSlice must have a unique name.
|
||||
// If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name.
|
||||
// Name must either be an empty string or pass DNS_LABEL validation:
|
||||
// * must be no more than 63 characters long.
|
||||
// * must consist of lower case alphanumeric characters or '-'.
|
||||
// * must start and end with an alphanumeric character.
|
||||
// Default is empty string.
|
||||
name?: null | string @go(Name,*string) @protobuf(1,bytes)
|
||||
|
||||
// protocol represents the IP protocol for this port.
|
||||
// Must be UDP, TCP, or SCTP.
|
||||
// Default is TCP.
|
||||
protocol?: null | v1.#Protocol @go(Protocol,*v1.Protocol) @protobuf(2,bytes)
|
||||
|
||||
// port represents the port number of the endpoint.
|
||||
// If this is not specified, ports are not restricted and must be
|
||||
// interpreted in the context of the specific consumer.
|
||||
port?: null | int32 @go(Port,*int32) @protobuf(3,bytes,opt)
|
||||
|
||||
// appProtocol represents the application protocol for this port.
|
||||
// This field follows standard Kubernetes label syntax.
|
||||
// Un-prefixed names are reserved for IANA standard service names (as per
|
||||
// RFC-6335 and https://www.iana.org/assignments/service-names).
|
||||
// Non-standard protocols should use prefixed names such as
|
||||
// mycompany.com/my-custom-protocol.
|
||||
// +optional
|
||||
appProtocol?: null | string @go(AppProtocol,*string) @protobuf(4,bytes)
|
||||
}
|
||||
|
||||
// EndpointSliceList represents a list of endpoint slices
|
||||
#EndpointSliceList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is the list of endpoint slices
|
||||
items: [...#EndpointSlice] @go(Items,[]EndpointSlice) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/discovery/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
// LabelServiceName is used to indicate the name of a Kubernetes service.
|
||||
#LabelServiceName: "kubernetes.io/service-name"
|
||||
|
||||
// LabelManagedBy is used to indicate the controller or entity that manages
|
||||
// an EndpointSlice. This label aims to enable different EndpointSlice
|
||||
// objects to be managed by different controllers or entities within the
|
||||
// same cluster. It is highly recommended to configure this label for all
|
||||
// EndpointSlices.
|
||||
#LabelManagedBy: "endpointslice.kubernetes.io/managed-by"
|
||||
|
||||
// LabelSkipMirror can be set to true on an Endpoints resource to indicate
|
||||
// that the EndpointSliceMirroring controller should not mirror this
|
||||
// resource with EndpointSlices.
|
||||
#LabelSkipMirror: "endpointslice.kubernetes.io/skip-mirror"
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/events/v1
|
||||
|
||||
package v1
|
||||
|
||||
#GroupName: "events.k8s.io"
|
||||
111
docs/examples/cue.mod/gen/k8s.io/api/events/v1/types_go_gen.cue
Normal file
111
docs/examples/cue.mod/gen/k8s.io/api/events/v1/types_go_gen.cue
Normal file
@@ -0,0 +1,111 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/events/v1
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
||||
// Events have a limited retention time and triggers and messages may evolve
|
||||
// with time. Event consumers should not rely on the timing of an event
|
||||
// with a given Reason reflecting a consistent underlying trigger, or the
|
||||
// continued existence of events with that Reason. Events should be
|
||||
// treated as informative, best-effort, supplemental data.
|
||||
#Event: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// eventTime is the time when this Event was first observed. It is required.
|
||||
eventTime: metav1.#MicroTime @go(EventTime) @protobuf(2,bytes,opt)
|
||||
|
||||
// series is data about the Event series this event represents or nil if it's a singleton Event.
|
||||
// +optional
|
||||
series?: null | #EventSeries @go(Series,*EventSeries) @protobuf(3,bytes,opt)
|
||||
|
||||
// reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
|
||||
// This field cannot be empty for new Events.
|
||||
reportingController?: string @go(ReportingController) @protobuf(4,bytes,opt)
|
||||
|
||||
// reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`.
|
||||
// This field cannot be empty for new Events and it can have at most 128 characters.
|
||||
reportingInstance?: string @go(ReportingInstance) @protobuf(5,bytes,opt)
|
||||
|
||||
// action is what action was taken/failed regarding to the regarding object. It is machine-readable.
|
||||
// This field cannot be empty for new Events and it can have at most 128 characters.
|
||||
action?: string @go(Action) @protobuf(6,bytes)
|
||||
|
||||
// reason is why the action was taken. It is human-readable.
|
||||
// This field cannot be empty for new Events and it can have at most 128 characters.
|
||||
reason?: string @go(Reason) @protobuf(7,bytes)
|
||||
|
||||
// regarding contains the object this Event is about. In most cases it's an Object reporting controller
|
||||
// implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because
|
||||
// it acts on some changes in a ReplicaSet object.
|
||||
// +optional
|
||||
regarding?: corev1.#ObjectReference @go(Regarding) @protobuf(8,bytes,opt)
|
||||
|
||||
// related is the optional secondary object for more complex actions. E.g. when regarding object triggers
|
||||
// a creation or deletion of related object.
|
||||
// +optional
|
||||
related?: null | corev1.#ObjectReference @go(Related,*corev1.ObjectReference) @protobuf(9,bytes,opt)
|
||||
|
||||
// note is a human-readable description of the status of this operation.
|
||||
// Maximal length of the note is 1kB, but libraries should be prepared to
|
||||
// handle values up to 64kB.
|
||||
// +optional
|
||||
note?: string @go(Note) @protobuf(10,bytes,opt)
|
||||
|
||||
// type is the type of this event (Normal, Warning), new types could be added in the future.
|
||||
// It is machine-readable.
|
||||
// This field cannot be empty for new Events.
|
||||
type?: string @go(Type) @protobuf(11,bytes,opt)
|
||||
|
||||
// deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
|
||||
// +optional
|
||||
deprecatedSource?: corev1.#EventSource @go(DeprecatedSource) @protobuf(12,bytes,opt)
|
||||
|
||||
// deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
|
||||
// +optional
|
||||
deprecatedFirstTimestamp?: metav1.#Time @go(DeprecatedFirstTimestamp) @protobuf(13,bytes,opt)
|
||||
|
||||
// deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
|
||||
// +optional
|
||||
deprecatedLastTimestamp?: metav1.#Time @go(DeprecatedLastTimestamp) @protobuf(14,bytes,opt)
|
||||
|
||||
// deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
|
||||
// +optional
|
||||
deprecatedCount?: int32 @go(DeprecatedCount) @protobuf(15,varint,opt)
|
||||
}
|
||||
|
||||
// EventSeries contain information on series of events, i.e. thing that was/is happening
|
||||
// continuously for some time. How often to update the EventSeries is up to the event reporters.
|
||||
// The default event reporter in "k8s.io/client-go/tools/events/event_broadcaster.go" shows
|
||||
// how this struct is updated on heartbeats and can guide customized reporter implementations.
|
||||
#EventSeries: {
|
||||
// count is the number of occurrences in this series up to the last heartbeat time.
|
||||
count: int32 @go(Count) @protobuf(1,varint,opt)
|
||||
|
||||
// lastObservedTime is the time when last Event from the series was seen before last heartbeat.
|
||||
lastObservedTime: metav1.#MicroTime @go(LastObservedTime) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// EventList is a list of Event objects.
|
||||
#EventList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is a list of schema objects.
|
||||
items: [...#Event] @go(Items,[]Event) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/events/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "events.k8s.io"
|
||||
@@ -0,0 +1,113 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/events/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
|
||||
// Events have a limited retention time and triggers and messages may evolve
|
||||
// with time. Event consumers should not rely on the timing of an event
|
||||
// with a given Reason reflecting a consistent underlying trigger, or the
|
||||
// continued existence of events with that Reason. Events should be
|
||||
// treated as informative, best-effort, supplemental data.
|
||||
#Event: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// eventTime is the time when this Event was first observed. It is required.
|
||||
eventTime: metav1.#MicroTime @go(EventTime) @protobuf(2,bytes,opt)
|
||||
|
||||
// series is data about the Event series this event represents or nil if it's a singleton Event.
|
||||
// +optional
|
||||
series?: null | #EventSeries @go(Series,*EventSeries) @protobuf(3,bytes,opt)
|
||||
|
||||
// reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
|
||||
// This field cannot be empty for new Events.
|
||||
// +optional
|
||||
reportingController?: string @go(ReportingController) @protobuf(4,bytes,opt)
|
||||
|
||||
// reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`.
|
||||
// This field cannot be empty for new Events and it can have at most 128 characters.
|
||||
// +optional
|
||||
reportingInstance?: string @go(ReportingInstance) @protobuf(5,bytes,opt)
|
||||
|
||||
// action is what action was taken/failed regarding to the regarding object. It is machine-readable.
|
||||
// This field can have at most 128 characters.
|
||||
// +optional
|
||||
action?: string @go(Action) @protobuf(6,bytes)
|
||||
|
||||
// reason is why the action was taken. It is human-readable.
|
||||
// This field can have at most 128 characters.
|
||||
// +optional
|
||||
reason?: string @go(Reason) @protobuf(7,bytes)
|
||||
|
||||
// regarding contains the object this Event is about. In most cases it's an Object reporting controller
|
||||
// implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because
|
||||
// it acts on some changes in a ReplicaSet object.
|
||||
// +optional
|
||||
regarding?: corev1.#ObjectReference @go(Regarding) @protobuf(8,bytes,opt)
|
||||
|
||||
// related is the optional secondary object for more complex actions. E.g. when regarding object triggers
|
||||
// a creation or deletion of related object.
|
||||
// +optional
|
||||
related?: null | corev1.#ObjectReference @go(Related,*corev1.ObjectReference) @protobuf(9,bytes,opt)
|
||||
|
||||
// note is a human-readable description of the status of this operation.
|
||||
// Maximal length of the note is 1kB, but libraries should be prepared to
|
||||
// handle values up to 64kB.
|
||||
// +optional
|
||||
note?: string @go(Note) @protobuf(10,bytes,opt)
|
||||
|
||||
// type is the type of this event (Normal, Warning), new types could be added in the future.
|
||||
// It is machine-readable.
|
||||
// +optional
|
||||
type?: string @go(Type) @protobuf(11,bytes,opt)
|
||||
|
||||
// deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
|
||||
// +optional
|
||||
deprecatedSource?: corev1.#EventSource @go(DeprecatedSource) @protobuf(12,bytes,opt)
|
||||
|
||||
// deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
|
||||
// +optional
|
||||
deprecatedFirstTimestamp?: metav1.#Time @go(DeprecatedFirstTimestamp) @protobuf(13,bytes,opt)
|
||||
|
||||
// deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
|
||||
// +optional
|
||||
deprecatedLastTimestamp?: metav1.#Time @go(DeprecatedLastTimestamp) @protobuf(14,bytes,opt)
|
||||
|
||||
// deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
|
||||
// +optional
|
||||
deprecatedCount?: int32 @go(DeprecatedCount) @protobuf(15,varint,opt)
|
||||
}
|
||||
|
||||
// EventSeries contain information on series of events, i.e. thing that was/is happening
|
||||
// continuously for some time.
|
||||
#EventSeries: {
|
||||
// count is the number of occurrences in this series up to the last heartbeat time.
|
||||
count: int32 @go(Count) @protobuf(1,varint,opt)
|
||||
|
||||
// lastObservedTime is the time when last Event from the series was seen before last heartbeat.
|
||||
lastObservedTime: metav1.#MicroTime @go(LastObservedTime) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// EventList is a list of Event objects.
|
||||
#EventList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// items is a list of schema objects.
|
||||
items: [...#Event] @go(Items,[]Event) @protobuf(2,bytes,rep)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/extensions/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "extensions"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/flowcontrol/v1
|
||||
|
||||
// Package v1 holds api types of version v1 for group "flowcontrol.apiserver.k8s.io".
|
||||
package v1
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/flowcontrol/v1
|
||||
|
||||
package v1
|
||||
|
||||
#GroupName: "flowcontrol.apiserver.k8s.io"
|
||||
@@ -0,0 +1,643 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/flowcontrol/v1
|
||||
|
||||
package v1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
#APIGroupAll: "*"
|
||||
#ResourceAll: "*"
|
||||
#VerbAll: "*"
|
||||
#NonResourceAll: "*"
|
||||
#NameAll: "*"
|
||||
#NamespaceEvery: "*"
|
||||
|
||||
#PriorityLevelConfigurationNameExempt: "exempt"
|
||||
#PriorityLevelConfigurationNameCatchAll: "catch-all"
|
||||
#FlowSchemaNameExempt: "exempt"
|
||||
#FlowSchemaNameCatchAll: "catch-all"
|
||||
|
||||
#FlowSchemaConditionDangling: "Dangling"
|
||||
#PriorityLevelConfigurationConditionConcurrencyShared: "ConcurrencyShared"
|
||||
|
||||
#FlowSchemaMaxMatchingPrecedence: int32 & 10000
|
||||
|
||||
#ResponseHeaderMatchedPriorityLevelConfigurationUID: "X-Kubernetes-PF-PriorityLevel-UID"
|
||||
#ResponseHeaderMatchedFlowSchemaUID: "X-Kubernetes-PF-FlowSchema-UID"
|
||||
|
||||
// AutoUpdateAnnotationKey is the name of an annotation that enables
|
||||
// automatic update of the spec of the bootstrap configuration
|
||||
// object(s), if set to 'true'.
|
||||
//
|
||||
// On a fresh install, all bootstrap configuration objects will have auto
|
||||
// update enabled with the following annotation key:
|
||||
// apf.kubernetes.io/autoupdate-spec: 'true'
|
||||
//
|
||||
// The kube-apiserver periodically checks the bootstrap configuration
|
||||
// objects on the cluster and applies updates if necessary.
|
||||
//
|
||||
// kube-apiserver enforces an 'always auto-update' policy for the
|
||||
// mandatory configuration object(s). This implies:
|
||||
// - the auto-update annotation key is added with a value of 'true'
|
||||
// if it is missing.
|
||||
// - the auto-update annotation key is set to 'true' if its current value
|
||||
// is a boolean false or has an invalid boolean representation
|
||||
// (if the cluster operator sets it to 'false' it will be stomped)
|
||||
// - any changes to the spec made by the cluster operator will be
|
||||
// stomped, except for changes to the `nominalConcurrencyShares`
|
||||
// and `lendablePercent` fields of the PriorityLevelConfiguration
|
||||
// named "exempt".
|
||||
//
|
||||
// The kube-apiserver will apply updates on the suggested configuration if:
|
||||
// - the cluster operator has enabled auto-update by setting the annotation
|
||||
// (apf.kubernetes.io/autoupdate-spec: 'true') or
|
||||
// - the annotation key is missing but the generation is 1
|
||||
//
|
||||
// If the suggested configuration object is missing the annotation key,
|
||||
// kube-apiserver will update the annotation appropriately:
|
||||
// - it is set to 'true' if generation of the object is '1' which usually
|
||||
// indicates that the spec of the object has not been changed.
|
||||
// - it is set to 'false' if generation of the object is greater than 1.
|
||||
//
|
||||
// The goal is to enable the kube-apiserver to apply update on suggested
|
||||
// configuration objects installed by previous releases but not overwrite
|
||||
// changes made by the cluster operators.
|
||||
// Note that this distinction is imperfectly detected: in the case where an
|
||||
// operator deletes a suggested configuration object and later creates it
|
||||
// but with a variant spec and then does no updates of the object
|
||||
// (generation is 1), the technique outlined above will incorrectly
|
||||
// determine that the object should be auto-updated.
|
||||
#AutoUpdateAnnotationKey: "apf.kubernetes.io/autoupdate-spec"
|
||||
|
||||
// FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with
|
||||
// similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher".
|
||||
#FlowSchema: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `spec` is the specification of the desired behavior of a FlowSchema.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #FlowSchemaSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// `status` is the current status of a FlowSchema.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
status?: #FlowSchemaStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// FlowSchemaList is a list of FlowSchema objects.
|
||||
#FlowSchemaList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `items` is a list of FlowSchemas.
|
||||
items: [...#FlowSchema] @go(Items,[]FlowSchema) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowSchemaSpec describes how the FlowSchema's specification looks like.
|
||||
#FlowSchemaSpec: {
|
||||
// `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot
|
||||
// be resolved, the FlowSchema will be ignored and marked as invalid in its status.
|
||||
// Required.
|
||||
priorityLevelConfiguration: #PriorityLevelConfigurationReference @go(PriorityLevelConfiguration) @protobuf(1,bytes,opt)
|
||||
|
||||
// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen
|
||||
// FlowSchema is among those with the numerically lowest (which we take to be logically highest)
|
||||
// MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000].
|
||||
// Note that if the precedence is not specified, it will be set to 1000 as default.
|
||||
// +optional
|
||||
matchingPrecedence?: int32 @go(MatchingPrecedence) @protobuf(2,varint,opt)
|
||||
|
||||
// `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema.
|
||||
// `nil` specifies that the distinguisher is disabled and thus will always be the empty string.
|
||||
// +optional
|
||||
distinguisherMethod?: null | #FlowDistinguisherMethod @go(DistinguisherMethod,*FlowDistinguisherMethod) @protobuf(3,bytes,opt)
|
||||
|
||||
// `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if
|
||||
// at least one member of rules matches the request.
|
||||
// if it is an empty slice, there will be no requests matching the FlowSchema.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
rules?: [...#PolicyRulesWithSubjects] @go(Rules,[]PolicyRulesWithSubjects) @protobuf(4,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowDistinguisherMethodType is the type of flow distinguisher method
|
||||
#FlowDistinguisherMethodType: string // #enumFlowDistinguisherMethodType
|
||||
|
||||
#enumFlowDistinguisherMethodType:
|
||||
#FlowDistinguisherMethodByUserType |
|
||||
#FlowDistinguisherMethodByNamespaceType
|
||||
|
||||
// FlowDistinguisherMethodByUserType specifies that the flow distinguisher is the username in the request.
|
||||
// This type is used to provide some insulation between users.
|
||||
#FlowDistinguisherMethodByUserType: #FlowDistinguisherMethodType & "ByUser"
|
||||
|
||||
// FlowDistinguisherMethodByNamespaceType specifies that the flow distinguisher is the namespace of the
|
||||
// object that the request acts upon. If the object is not namespaced, or if the request is a non-resource
|
||||
// request, then the distinguisher will be the empty string. An example usage of this type is to provide
|
||||
// some insulation between tenants in a situation where there are multiple tenants and each namespace
|
||||
// is dedicated to a tenant.
|
||||
#FlowDistinguisherMethodByNamespaceType: #FlowDistinguisherMethodType & "ByNamespace"
|
||||
|
||||
// FlowDistinguisherMethod specifies the method of a flow distinguisher.
|
||||
#FlowDistinguisherMethod: {
|
||||
// `type` is the type of flow distinguisher method
|
||||
// The supported types are "ByUser" and "ByNamespace".
|
||||
// Required.
|
||||
type: #FlowDistinguisherMethodType @go(Type) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationReference contains information that points to the "request-priority" being used.
|
||||
#PriorityLevelConfigurationReference: {
|
||||
// `name` is the name of the priority level configuration being referenced
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject
|
||||
// making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches
|
||||
// a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member
|
||||
// of resourceRules or nonResourceRules matches the request.
|
||||
#PolicyRulesWithSubjects: {
|
||||
// subjects is the list of normal user, serviceaccount, or group that this rule cares about.
|
||||
// There must be at least one member in this slice.
|
||||
// A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request.
|
||||
// +listType=atomic
|
||||
// Required.
|
||||
subjects: [...#Subject] @go(Subjects,[]Subject) @protobuf(1,bytes,rep)
|
||||
|
||||
// `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the
|
||||
// target resource.
|
||||
// At least one of `resourceRules` and `nonResourceRules` has to be non-empty.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
resourceRules?: [...#ResourcePolicyRule] @go(ResourceRules,[]ResourcePolicyRule) @protobuf(2,bytes,opt)
|
||||
|
||||
// `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb
|
||||
// and the target non-resource URL.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
nonResourceRules?: [...#NonResourcePolicyRule] @go(NonResourceRules,[]NonResourcePolicyRule) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// Subject matches the originator of a request, as identified by the request authentication system. There are three
|
||||
// ways of matching an originator; by user, group, or service account.
|
||||
// +union
|
||||
#Subject: {
|
||||
// `kind` indicates which one of the other fields is non-empty.
|
||||
// Required
|
||||
// +unionDiscriminator
|
||||
kind: #SubjectKind @go(Kind) @protobuf(1,bytes,opt)
|
||||
|
||||
// `user` matches based on username.
|
||||
// +optional
|
||||
user?: null | #UserSubject @go(User,*UserSubject) @protobuf(2,bytes,opt)
|
||||
|
||||
// `group` matches based on user group name.
|
||||
// +optional
|
||||
group?: null | #GroupSubject @go(Group,*GroupSubject) @protobuf(3,bytes,opt)
|
||||
|
||||
// `serviceAccount` matches ServiceAccounts.
|
||||
// +optional
|
||||
serviceAccount?: null | #ServiceAccountSubject @go(ServiceAccount,*ServiceAccountSubject) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// SubjectKind is the kind of subject.
|
||||
#SubjectKind: string // #enumSubjectKind
|
||||
|
||||
#enumSubjectKind:
|
||||
#SubjectKindUser |
|
||||
#SubjectKindGroup |
|
||||
#SubjectKindServiceAccount
|
||||
|
||||
#SubjectKindUser: #SubjectKind & "User"
|
||||
#SubjectKindGroup: #SubjectKind & "Group"
|
||||
#SubjectKindServiceAccount: #SubjectKind & "ServiceAccount"
|
||||
|
||||
// UserSubject holds detailed information for user-kind subject.
|
||||
#UserSubject: {
|
||||
// `name` is the username that matches, or "*" to match all usernames.
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// GroupSubject holds detailed information for group-kind subject.
|
||||
#GroupSubject: {
|
||||
// name is the user group that matches, or "*" to match all user groups.
|
||||
// See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some
|
||||
// well-known group names.
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// ServiceAccountSubject holds detailed information for service-account-kind subject.
|
||||
#ServiceAccountSubject: {
|
||||
// `namespace` is the namespace of matching ServiceAccount objects.
|
||||
// Required.
|
||||
namespace: string @go(Namespace) @protobuf(1,bytes,opt)
|
||||
|
||||
// `name` is the name of matching ServiceAccount objects, or "*" to match regardless of name.
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// ResourcePolicyRule is a predicate that matches some resource
|
||||
// requests, testing the request's verb and the target resource. A
|
||||
// ResourcePolicyRule matches a resource request if and only if: (a)
|
||||
// at least one member of verbs matches the request, (b) at least one
|
||||
// member of apiGroups matches the request, (c) at least one member of
|
||||
// resources matches the request, and (d) either (d1) the request does
|
||||
// not specify a namespace (i.e., `Namespace==""`) and clusterScope is
|
||||
// true or (d2) the request specifies a namespace and least one member
|
||||
// of namespaces matches the request's namespace.
|
||||
#ResourcePolicyRule: {
|
||||
// `verbs` is a list of matching verbs and may not be empty.
|
||||
// "*" matches all verbs and, if present, must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// `apiGroups` is a list of matching API groups and may not be empty.
|
||||
// "*" matches all API groups and, if present, must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
apiGroups: [...string] @go(APIGroups,[]string) @protobuf(2,bytes,rep)
|
||||
|
||||
// `resources` is a list of matching resources (i.e., lowercase
|
||||
// and plural) with, if desired, subresource. For example, [
|
||||
// "services", "nodes/status" ]. This list may not be empty.
|
||||
// "*" matches all resources and, if present, must be the only entry.
|
||||
// Required.
|
||||
// +listType=set
|
||||
resources: [...string] @go(Resources,[]string) @protobuf(3,bytes,rep)
|
||||
|
||||
// `clusterScope` indicates whether to match requests that do not
|
||||
// specify a namespace (which happens either because the resource
|
||||
// is not namespaced or the request targets all namespaces).
|
||||
// If this field is omitted or false then the `namespaces` field
|
||||
// must contain a non-empty list.
|
||||
// +optional
|
||||
clusterScope?: bool @go(ClusterScope) @protobuf(4,varint,opt)
|
||||
|
||||
// `namespaces` is a list of target namespaces that restricts
|
||||
// matches. A request that specifies a target namespace matches
|
||||
// only if either (a) this list contains that target namespace or
|
||||
// (b) this list contains "*". Note that "*" matches any
|
||||
// specified namespace but does not match a request that _does
|
||||
// not specify_ a namespace (see the `clusterScope` field for
|
||||
// that).
|
||||
// This list may be empty, but only if `clusterScope` is true.
|
||||
// +optional
|
||||
// +listType=set
|
||||
namespaces?: [...string] @go(Namespaces,[]string) @protobuf(5,bytes,rep)
|
||||
}
|
||||
|
||||
// NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the
|
||||
// target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member
|
||||
// of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.
|
||||
#NonResourcePolicyRule: {
|
||||
// `verbs` is a list of matching verbs and may not be empty.
|
||||
// "*" matches all verbs. If it is present, it must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty.
|
||||
// For example:
|
||||
// - "/healthz" is legal
|
||||
// - "/hea*" is illegal
|
||||
// - "/hea" is legal but matches nothing
|
||||
// - "/hea/*" also matches nothing
|
||||
// - "/healthz/*" matches all per-component health checks.
|
||||
// "*" matches all non-resource urls. if it is present, it must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
nonResourceURLs: [...string] @go(NonResourceURLs,[]string) @protobuf(6,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowSchemaStatus represents the current state of a FlowSchema.
|
||||
#FlowSchemaStatus: {
|
||||
// `conditions` is a list of the current states of FlowSchema.
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
// +optional
|
||||
conditions?: [...#FlowSchemaCondition] @go(Conditions,[]FlowSchemaCondition) @protobuf(1,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowSchemaCondition describes conditions for a FlowSchema.
|
||||
#FlowSchemaCondition: {
|
||||
// `type` is the type of the condition.
|
||||
// Required.
|
||||
type?: #FlowSchemaConditionType @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `status` is the status of the condition.
|
||||
// Can be True, False, Unknown.
|
||||
// Required.
|
||||
status?: #ConditionStatus @go(Status) @protobuf(2,bytes,opt)
|
||||
|
||||
// `lastTransitionTime` is the last time the condition transitioned from one status to another.
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// `reason` is a unique, one-word, CamelCase reason for the condition's last transition.
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// `message` is a human-readable message indicating details about last transition.
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// FlowSchemaConditionType is a valid value for FlowSchemaStatusCondition.Type
|
||||
#FlowSchemaConditionType: string
|
||||
|
||||
// PriorityLevelConfiguration represents the configuration of a priority level.
|
||||
#PriorityLevelConfiguration: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `spec` is the specification of the desired behavior of a "request-priority".
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #PriorityLevelConfigurationSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// `status` is the current status of a "request-priority".
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
status?: #PriorityLevelConfigurationStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.
|
||||
#PriorityLevelConfigurationList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `items` is a list of request-priorities.
|
||||
items: [...#PriorityLevelConfiguration] @go(Items,[]PriorityLevelConfiguration) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationSpec specifies the configuration of a priority level.
|
||||
// +union
|
||||
#PriorityLevelConfigurationSpec: {
|
||||
// `type` indicates whether this priority level is subject to
|
||||
// limitation on request execution. A value of `"Exempt"` means
|
||||
// that requests of this priority level are not subject to a limit
|
||||
// (and thus are never queued) and do not detract from the
|
||||
// capacity made available to other priority levels. A value of
|
||||
// `"Limited"` means that (a) requests of this priority level
|
||||
// _are_ subject to limits and (b) some of the server's limited
|
||||
// capacity is made available exclusively to this priority level.
|
||||
// Required.
|
||||
// +unionDiscriminator
|
||||
type: #PriorityLevelEnablement @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `limited` specifies how requests are handled for a Limited priority level.
|
||||
// This field must be non-empty if and only if `type` is `"Limited"`.
|
||||
// +optional
|
||||
limited?: null | #LimitedPriorityLevelConfiguration @go(Limited,*LimitedPriorityLevelConfiguration) @protobuf(2,bytes,opt)
|
||||
|
||||
// `exempt` specifies how requests are handled for an exempt priority level.
|
||||
// This field MUST be empty if `type` is `"Limited"`.
|
||||
// This field MAY be non-empty if `type` is `"Exempt"`.
|
||||
// If empty and `type` is `"Exempt"` then the default values
|
||||
// for `ExemptPriorityLevelConfiguration` apply.
|
||||
// +optional
|
||||
exempt?: null | #ExemptPriorityLevelConfiguration @go(Exempt,*ExemptPriorityLevelConfiguration) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelEnablement indicates whether limits on execution are enabled for the priority level
|
||||
#PriorityLevelEnablement: string // #enumPriorityLevelEnablement
|
||||
|
||||
#enumPriorityLevelEnablement:
|
||||
#PriorityLevelEnablementExempt |
|
||||
#PriorityLevelEnablementLimited
|
||||
|
||||
// PriorityLevelEnablementExempt means that requests are not subject to limits
|
||||
#PriorityLevelEnablementExempt: #PriorityLevelEnablement & "Exempt"
|
||||
|
||||
// PriorityLevelEnablementLimited means that requests are subject to limits
|
||||
#PriorityLevelEnablementLimited: #PriorityLevelEnablement & "Limited"
|
||||
|
||||
// LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits.
|
||||
// It addresses two issues:
|
||||
// - How are requests for this priority level limited?
|
||||
// - What should be done with requests that exceed the limit?
|
||||
#LimitedPriorityLevelConfiguration: {
|
||||
// `nominalConcurrencyShares` (NCS) contributes to the computation of the
|
||||
// NominalConcurrencyLimit (NominalCL) of this level.
|
||||
// This is the number of execution seats available at this priority level.
|
||||
// This is used both for requests dispatched from this priority level
|
||||
// as well as requests dispatched from other priority levels
|
||||
// borrowing seats from this level.
|
||||
// The server's concurrency limit (ServerCL) is divided among the
|
||||
// Limited priority levels in proportion to their NCS values:
|
||||
//
|
||||
// NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs )
|
||||
// sum_ncs = sum[priority level k] NCS(k)
|
||||
//
|
||||
// Bigger numbers mean a larger nominal concurrency limit,
|
||||
// at the expense of every other priority level.
|
||||
//
|
||||
// If not specified, this field defaults to a value of 30.
|
||||
//
|
||||
// Setting this field to zero supports the construction of a
|
||||
// "jail" for this priority level that is used to hold some request(s)
|
||||
//
|
||||
// +optional
|
||||
nominalConcurrencyShares?: null | int32 @go(NominalConcurrencyShares,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// `limitResponse` indicates what to do with requests that can not be executed right now
|
||||
limitResponse?: #LimitResponse @go(LimitResponse) @protobuf(2,bytes,opt)
|
||||
|
||||
// `lendablePercent` prescribes the fraction of the level's NominalCL that
|
||||
// can be borrowed by other priority levels. The value of this
|
||||
// field must be between 0 and 100, inclusive, and it defaults to 0.
|
||||
// The number of seats that other levels can borrow from this level, known
|
||||
// as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.
|
||||
//
|
||||
// LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
|
||||
//
|
||||
// +optional
|
||||
lendablePercent?: null | int32 @go(LendablePercent,*int32) @protobuf(3,varint,opt)
|
||||
|
||||
// `borrowingLimitPercent`, if present, configures a limit on how many
|
||||
// seats this priority level can borrow from other priority levels.
|
||||
// The limit is known as this level's BorrowingConcurrencyLimit
|
||||
// (BorrowingCL) and is a limit on the total number of seats that this
|
||||
// level may borrow at any one time.
|
||||
// This field holds the ratio of that limit to the level's nominal
|
||||
// concurrency limit. When this field is non-nil, it must hold a
|
||||
// non-negative integer and the limit is calculated as follows.
|
||||
//
|
||||
// BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 )
|
||||
//
|
||||
// The value of this field can be more than 100, implying that this
|
||||
// priority level can borrow a number of seats that is greater than
|
||||
// its own nominal concurrency limit (NominalCL).
|
||||
// When this field is left `nil`, the limit is effectively infinite.
|
||||
// +optional
|
||||
borrowingLimitPercent?: null | int32 @go(BorrowingLimitPercent,*int32) @protobuf(4,varint,opt)
|
||||
}
|
||||
|
||||
// ExemptPriorityLevelConfiguration describes the configurable aspects
|
||||
// of the handling of exempt requests.
|
||||
// In the mandatory exempt configuration object the values in the fields
|
||||
// here can be modified by authorized users, unlike the rest of the `spec`.
|
||||
#ExemptPriorityLevelConfiguration: {
|
||||
// `nominalConcurrencyShares` (NCS) contributes to the computation of the
|
||||
// NominalConcurrencyLimit (NominalCL) of this level.
|
||||
// This is the number of execution seats nominally reserved for this priority level.
|
||||
// This DOES NOT limit the dispatching from this priority level
|
||||
// but affects the other priority levels through the borrowing mechanism.
|
||||
// The server's concurrency limit (ServerCL) is divided among all the
|
||||
// priority levels in proportion to their NCS values:
|
||||
//
|
||||
// NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs )
|
||||
// sum_ncs = sum[priority level k] NCS(k)
|
||||
//
|
||||
// Bigger numbers mean a larger nominal concurrency limit,
|
||||
// at the expense of every other priority level.
|
||||
// This field has a default value of zero.
|
||||
// +optional
|
||||
nominalConcurrencyShares?: null | int32 @go(NominalConcurrencyShares,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// `lendablePercent` prescribes the fraction of the level's NominalCL that
|
||||
// can be borrowed by other priority levels. This value of this
|
||||
// field must be between 0 and 100, inclusive, and it defaults to 0.
|
||||
// The number of seats that other levels can borrow from this level, known
|
||||
// as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.
|
||||
//
|
||||
// LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
|
||||
//
|
||||
// +optional
|
||||
lendablePercent?: null | int32 @go(LendablePercent,*int32) @protobuf(2,varint,opt)
|
||||
}
|
||||
|
||||
// LimitResponse defines how to handle requests that can not be executed right now.
|
||||
// +union
|
||||
#LimitResponse: {
|
||||
// `type` is "Queue" or "Reject".
|
||||
// "Queue" means that requests that can not be executed upon arrival
|
||||
// are held in a queue until they can be executed or a queuing limit
|
||||
// is reached.
|
||||
// "Reject" means that requests that can not be executed upon arrival
|
||||
// are rejected.
|
||||
// Required.
|
||||
// +unionDiscriminator
|
||||
type: #LimitResponseType @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `queuing` holds the configuration parameters for queuing.
|
||||
// This field may be non-empty only if `type` is `"Queue"`.
|
||||
// +optional
|
||||
queuing?: null | #QueuingConfiguration @go(Queuing,*QueuingConfiguration) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// LimitResponseType identifies how a Limited priority level handles a request that can not be executed right now
|
||||
#LimitResponseType: string // #enumLimitResponseType
|
||||
|
||||
#enumLimitResponseType:
|
||||
#LimitResponseTypeQueue |
|
||||
#LimitResponseTypeReject
|
||||
|
||||
// LimitResponseTypeQueue means that requests that can not be executed right now are queued until they can be executed or a queuing limit is hit
|
||||
#LimitResponseTypeQueue: #LimitResponseType & "Queue"
|
||||
|
||||
// LimitResponseTypeReject means that requests that can not be executed right now are rejected
|
||||
#LimitResponseTypeReject: #LimitResponseType & "Reject"
|
||||
|
||||
// QueuingConfiguration holds the configuration parameters for queuing
|
||||
#QueuingConfiguration: {
|
||||
// `queues` is the number of queues for this priority level. The
|
||||
// queues exist independently at each apiserver. The value must be
|
||||
// positive. Setting it to 1 effectively precludes
|
||||
// shufflesharding and thus makes the distinguisher method of
|
||||
// associated flow schemas irrelevant. This field has a default
|
||||
// value of 64.
|
||||
// +optional
|
||||
queues?: int32 @go(Queues) @protobuf(1,varint,opt)
|
||||
|
||||
// `handSize` is a small positive number that configures the
|
||||
// shuffle sharding of requests into queues. When enqueuing a request
|
||||
// at this priority level the request's flow identifier (a string
|
||||
// pair) is hashed and the hash value is used to shuffle the list
|
||||
// of queues and deal a hand of the size specified here. The
|
||||
// request is put into one of the shortest queues in that hand.
|
||||
// `handSize` must be no larger than `queues`, and should be
|
||||
// significantly smaller (so that a few heavy flows do not
|
||||
// saturate most of the queues). See the user-facing
|
||||
// documentation for more extensive guidance on setting this
|
||||
// field. This field has a default value of 8.
|
||||
// +optional
|
||||
handSize?: int32 @go(HandSize) @protobuf(2,varint,opt)
|
||||
|
||||
// `queueLengthLimit` is the maximum number of requests allowed to
|
||||
// be waiting in a given queue of this priority level at a time;
|
||||
// excess requests are rejected. This value must be positive. If
|
||||
// not specified, it will be defaulted to 50.
|
||||
// +optional
|
||||
queueLengthLimit?: int32 @go(QueueLengthLimit) @protobuf(3,varint,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationConditionType is a valid value for PriorityLevelConfigurationStatusCondition.Type
|
||||
#PriorityLevelConfigurationConditionType: string
|
||||
|
||||
// PriorityLevelConfigurationStatus represents the current state of a "request-priority".
|
||||
#PriorityLevelConfigurationStatus: {
|
||||
// `conditions` is the current state of "request-priority".
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
// +patchMergeKey=type
|
||||
// +patchStrategy=merge
|
||||
// +optional
|
||||
conditions?: [...#PriorityLevelConfigurationCondition] @go(Conditions,[]PriorityLevelConfigurationCondition) @protobuf(1,bytes,rep)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationCondition defines the condition of priority level.
|
||||
#PriorityLevelConfigurationCondition: {
|
||||
// `type` is the type of the condition.
|
||||
// Required.
|
||||
type?: #PriorityLevelConfigurationConditionType @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `status` is the status of the condition.
|
||||
// Can be True, False, Unknown.
|
||||
// Required.
|
||||
status?: #ConditionStatus @go(Status) @protobuf(2,bytes,opt)
|
||||
|
||||
// `lastTransitionTime` is the last time the condition transitioned from one status to another.
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// `reason` is a unique, one-word, CamelCase reason for the condition's last transition.
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// `message` is a human-readable message indicating details about last transition.
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// ConditionStatus is the status of the condition.
|
||||
#ConditionStatus: string // #enumConditionStatus
|
||||
|
||||
#enumConditionStatus:
|
||||
#ConditionTrue |
|
||||
#ConditionFalse |
|
||||
#ConditionUnknown
|
||||
|
||||
#ConditionTrue: #ConditionStatus & "True"
|
||||
#ConditionFalse: #ConditionStatus & "False"
|
||||
#ConditionUnknown: #ConditionStatus & "Unknown"
|
||||
@@ -0,0 +1,6 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/flowcontrol/v1beta1
|
||||
|
||||
// Package v1beta1 holds api types of version v1alpha1 for group "flowcontrol.apiserver.k8s.io".
|
||||
package v1beta1
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/flowcontrol/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
#GroupName: "flowcontrol.apiserver.k8s.io"
|
||||
@@ -0,0 +1,634 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/flowcontrol/v1beta1
|
||||
|
||||
package v1beta1
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
#APIGroupAll: "*"
|
||||
#ResourceAll: "*"
|
||||
#VerbAll: "*"
|
||||
#NonResourceAll: "*"
|
||||
#NameAll: "*"
|
||||
#NamespaceEvery: "*"
|
||||
|
||||
#PriorityLevelConfigurationNameExempt: "exempt"
|
||||
#PriorityLevelConfigurationNameCatchAll: "catch-all"
|
||||
#FlowSchemaNameExempt: "exempt"
|
||||
#FlowSchemaNameCatchAll: "catch-all"
|
||||
|
||||
#FlowSchemaConditionDangling: "Dangling"
|
||||
#PriorityLevelConfigurationConditionConcurrencyShared: "ConcurrencyShared"
|
||||
|
||||
#FlowSchemaMaxMatchingPrecedence: int32 & 10000
|
||||
|
||||
#ResponseHeaderMatchedPriorityLevelConfigurationUID: "X-Kubernetes-PF-PriorityLevel-UID"
|
||||
#ResponseHeaderMatchedFlowSchemaUID: "X-Kubernetes-PF-FlowSchema-UID"
|
||||
|
||||
// AutoUpdateAnnotationKey is the name of an annotation that enables
|
||||
// automatic update of the spec of the bootstrap configuration
|
||||
// object(s), if set to 'true'.
|
||||
//
|
||||
// On a fresh install, all bootstrap configuration objects will have auto
|
||||
// update enabled with the following annotation key:
|
||||
// apf.kubernetes.io/autoupdate-spec: 'true'
|
||||
//
|
||||
// The kube-apiserver periodically checks the bootstrap configuration
|
||||
// objects on the cluster and applies updates if necessary.
|
||||
//
|
||||
// kube-apiserver enforces an 'always auto-update' policy for the
|
||||
// mandatory configuration object(s). This implies:
|
||||
// - the auto-update annotation key is added with a value of 'true'
|
||||
// if it is missing.
|
||||
// - the auto-update annotation key is set to 'true' if its current value
|
||||
// is a boolean false or has an invalid boolean representation
|
||||
// (if the cluster operator sets it to 'false' it will be stomped)
|
||||
// - any changes to the spec made by the cluster operator will be
|
||||
// stomped, except for changes to the `nominalConcurrencyShares`
|
||||
// and `lendablePercent` fields of the PriorityLevelConfiguration
|
||||
// named "exempt".
|
||||
//
|
||||
// The kube-apiserver will apply updates on the suggested configuration if:
|
||||
// - the cluster operator has enabled auto-update by setting the annotation
|
||||
// (apf.kubernetes.io/autoupdate-spec: 'true') or
|
||||
// - the annotation key is missing but the generation is 1
|
||||
//
|
||||
// If the suggested configuration object is missing the annotation key,
|
||||
// kube-apiserver will update the annotation appropriately:
|
||||
// - it is set to 'true' if generation of the object is '1' which usually
|
||||
// indicates that the spec of the object has not been changed.
|
||||
// - it is set to 'false' if generation of the object is greater than 1.
|
||||
//
|
||||
// The goal is to enable the kube-apiserver to apply update on suggested
|
||||
// configuration objects installed by previous releases but not overwrite
|
||||
// changes made by the cluster operators.
|
||||
// Note that this distinction is imperfectly detected: in the case where an
|
||||
// operator deletes a suggested configuration object and later creates it
|
||||
// but with a variant spec and then does no updates of the object
|
||||
// (generation is 1), the technique outlined above will incorrectly
|
||||
// determine that the object should be auto-updated.
|
||||
#AutoUpdateAnnotationKey: "apf.kubernetes.io/autoupdate-spec"
|
||||
|
||||
// FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with
|
||||
// similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher".
|
||||
#FlowSchema: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `spec` is the specification of the desired behavior of a FlowSchema.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #FlowSchemaSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// `status` is the current status of a FlowSchema.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
status?: #FlowSchemaStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// FlowSchemaList is a list of FlowSchema objects.
|
||||
#FlowSchemaList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `items` is a list of FlowSchemas.
|
||||
items: [...#FlowSchema] @go(Items,[]FlowSchema) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowSchemaSpec describes how the FlowSchema's specification looks like.
|
||||
#FlowSchemaSpec: {
|
||||
// `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot
|
||||
// be resolved, the FlowSchema will be ignored and marked as invalid in its status.
|
||||
// Required.
|
||||
priorityLevelConfiguration: #PriorityLevelConfigurationReference @go(PriorityLevelConfiguration) @protobuf(1,bytes,opt)
|
||||
|
||||
// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen
|
||||
// FlowSchema is among those with the numerically lowest (which we take to be logically highest)
|
||||
// MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000].
|
||||
// Note that if the precedence is not specified, it will be set to 1000 as default.
|
||||
// +optional
|
||||
matchingPrecedence?: int32 @go(MatchingPrecedence) @protobuf(2,varint,opt)
|
||||
|
||||
// `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema.
|
||||
// `nil` specifies that the distinguisher is disabled and thus will always be the empty string.
|
||||
// +optional
|
||||
distinguisherMethod?: null | #FlowDistinguisherMethod @go(DistinguisherMethod,*FlowDistinguisherMethod) @protobuf(3,bytes,opt)
|
||||
|
||||
// `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if
|
||||
// at least one member of rules matches the request.
|
||||
// if it is an empty slice, there will be no requests matching the FlowSchema.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
rules?: [...#PolicyRulesWithSubjects] @go(Rules,[]PolicyRulesWithSubjects) @protobuf(4,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowDistinguisherMethodType is the type of flow distinguisher method
|
||||
#FlowDistinguisherMethodType: string // #enumFlowDistinguisherMethodType
|
||||
|
||||
#enumFlowDistinguisherMethodType:
|
||||
#FlowDistinguisherMethodByUserType |
|
||||
#FlowDistinguisherMethodByNamespaceType
|
||||
|
||||
// FlowDistinguisherMethodByUserType specifies that the flow distinguisher is the username in the request.
|
||||
// This type is used to provide some insulation between users.
|
||||
#FlowDistinguisherMethodByUserType: #FlowDistinguisherMethodType & "ByUser"
|
||||
|
||||
// FlowDistinguisherMethodByNamespaceType specifies that the flow distinguisher is the namespace of the
|
||||
// object that the request acts upon. If the object is not namespaced, or if the request is a non-resource
|
||||
// request, then the distinguisher will be the empty string. An example usage of this type is to provide
|
||||
// some insulation between tenants in a situation where there are multiple tenants and each namespace
|
||||
// is dedicated to a tenant.
|
||||
#FlowDistinguisherMethodByNamespaceType: #FlowDistinguisherMethodType & "ByNamespace"
|
||||
|
||||
// FlowDistinguisherMethod specifies the method of a flow distinguisher.
|
||||
#FlowDistinguisherMethod: {
|
||||
// `type` is the type of flow distinguisher method
|
||||
// The supported types are "ByUser" and "ByNamespace".
|
||||
// Required.
|
||||
type: #FlowDistinguisherMethodType @go(Type) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationReference contains information that points to the "request-priority" being used.
|
||||
#PriorityLevelConfigurationReference: {
|
||||
// `name` is the name of the priority level configuration being referenced
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject
|
||||
// making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches
|
||||
// a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member
|
||||
// of resourceRules or nonResourceRules matches the request.
|
||||
#PolicyRulesWithSubjects: {
|
||||
// subjects is the list of normal user, serviceaccount, or group that this rule cares about.
|
||||
// There must be at least one member in this slice.
|
||||
// A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request.
|
||||
// +listType=atomic
|
||||
// Required.
|
||||
subjects: [...#Subject] @go(Subjects,[]Subject) @protobuf(1,bytes,rep)
|
||||
|
||||
// `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the
|
||||
// target resource.
|
||||
// At least one of `resourceRules` and `nonResourceRules` has to be non-empty.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
resourceRules?: [...#ResourcePolicyRule] @go(ResourceRules,[]ResourcePolicyRule) @protobuf(2,bytes,opt)
|
||||
|
||||
// `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb
|
||||
// and the target non-resource URL.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
nonResourceRules?: [...#NonResourcePolicyRule] @go(NonResourceRules,[]NonResourcePolicyRule) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// Subject matches the originator of a request, as identified by the request authentication system. There are three
|
||||
// ways of matching an originator; by user, group, or service account.
|
||||
// +union
|
||||
#Subject: {
|
||||
// `kind` indicates which one of the other fields is non-empty.
|
||||
// Required
|
||||
// +unionDiscriminator
|
||||
kind: #SubjectKind @go(Kind) @protobuf(1,bytes,opt)
|
||||
|
||||
// `user` matches based on username.
|
||||
// +optional
|
||||
user?: null | #UserSubject @go(User,*UserSubject) @protobuf(2,bytes,opt)
|
||||
|
||||
// `group` matches based on user group name.
|
||||
// +optional
|
||||
group?: null | #GroupSubject @go(Group,*GroupSubject) @protobuf(3,bytes,opt)
|
||||
|
||||
// `serviceAccount` matches ServiceAccounts.
|
||||
// +optional
|
||||
serviceAccount?: null | #ServiceAccountSubject @go(ServiceAccount,*ServiceAccountSubject) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// SubjectKind is the kind of subject.
|
||||
#SubjectKind: string // #enumSubjectKind
|
||||
|
||||
#enumSubjectKind:
|
||||
#SubjectKindUser |
|
||||
#SubjectKindGroup |
|
||||
#SubjectKindServiceAccount
|
||||
|
||||
#SubjectKindUser: #SubjectKind & "User"
|
||||
#SubjectKindGroup: #SubjectKind & "Group"
|
||||
#SubjectKindServiceAccount: #SubjectKind & "ServiceAccount"
|
||||
|
||||
// UserSubject holds detailed information for user-kind subject.
|
||||
#UserSubject: {
|
||||
// `name` is the username that matches, or "*" to match all usernames.
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// GroupSubject holds detailed information for group-kind subject.
|
||||
#GroupSubject: {
|
||||
// name is the user group that matches, or "*" to match all user groups.
|
||||
// See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some
|
||||
// well-known group names.
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// ServiceAccountSubject holds detailed information for service-account-kind subject.
|
||||
#ServiceAccountSubject: {
|
||||
// `namespace` is the namespace of matching ServiceAccount objects.
|
||||
// Required.
|
||||
namespace: string @go(Namespace) @protobuf(1,bytes,opt)
|
||||
|
||||
// `name` is the name of matching ServiceAccount objects, or "*" to match regardless of name.
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// ResourcePolicyRule is a predicate that matches some resource
|
||||
// requests, testing the request's verb and the target resource. A
|
||||
// ResourcePolicyRule matches a resource request if and only if: (a)
|
||||
// at least one member of verbs matches the request, (b) at least one
|
||||
// member of apiGroups matches the request, (c) at least one member of
|
||||
// resources matches the request, and (d) either (d1) the request does
|
||||
// not specify a namespace (i.e., `Namespace==""`) and clusterScope is
|
||||
// true or (d2) the request specifies a namespace and least one member
|
||||
// of namespaces matches the request's namespace.
|
||||
#ResourcePolicyRule: {
|
||||
// `verbs` is a list of matching verbs and may not be empty.
|
||||
// "*" matches all verbs and, if present, must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// `apiGroups` is a list of matching API groups and may not be empty.
|
||||
// "*" matches all API groups and, if present, must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
apiGroups: [...string] @go(APIGroups,[]string) @protobuf(2,bytes,rep)
|
||||
|
||||
// `resources` is a list of matching resources (i.e., lowercase
|
||||
// and plural) with, if desired, subresource. For example, [
|
||||
// "services", "nodes/status" ]. This list may not be empty.
|
||||
// "*" matches all resources and, if present, must be the only entry.
|
||||
// Required.
|
||||
// +listType=set
|
||||
resources: [...string] @go(Resources,[]string) @protobuf(3,bytes,rep)
|
||||
|
||||
// `clusterScope` indicates whether to match requests that do not
|
||||
// specify a namespace (which happens either because the resource
|
||||
// is not namespaced or the request targets all namespaces).
|
||||
// If this field is omitted or false then the `namespaces` field
|
||||
// must contain a non-empty list.
|
||||
// +optional
|
||||
clusterScope?: bool @go(ClusterScope) @protobuf(4,varint,opt)
|
||||
|
||||
// `namespaces` is a list of target namespaces that restricts
|
||||
// matches. A request that specifies a target namespace matches
|
||||
// only if either (a) this list contains that target namespace or
|
||||
// (b) this list contains "*". Note that "*" matches any
|
||||
// specified namespace but does not match a request that _does
|
||||
// not specify_ a namespace (see the `clusterScope` field for
|
||||
// that).
|
||||
// This list may be empty, but only if `clusterScope` is true.
|
||||
// +optional
|
||||
// +listType=set
|
||||
namespaces?: [...string] @go(Namespaces,[]string) @protobuf(5,bytes,rep)
|
||||
}
|
||||
|
||||
// NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the
|
||||
// target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member
|
||||
// of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.
|
||||
#NonResourcePolicyRule: {
|
||||
// `verbs` is a list of matching verbs and may not be empty.
|
||||
// "*" matches all verbs. If it is present, it must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty.
|
||||
// For example:
|
||||
// - "/healthz" is legal
|
||||
// - "/hea*" is illegal
|
||||
// - "/hea" is legal but matches nothing
|
||||
// - "/hea/*" also matches nothing
|
||||
// - "/healthz/*" matches all per-component health checks.
|
||||
// "*" matches all non-resource urls. if it is present, it must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
nonResourceURLs: [...string] @go(NonResourceURLs,[]string) @protobuf(6,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowSchemaStatus represents the current state of a FlowSchema.
|
||||
#FlowSchemaStatus: {
|
||||
// `conditions` is a list of the current states of FlowSchema.
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
// +optional
|
||||
conditions?: [...#FlowSchemaCondition] @go(Conditions,[]FlowSchemaCondition) @protobuf(1,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowSchemaCondition describes conditions for a FlowSchema.
|
||||
#FlowSchemaCondition: {
|
||||
// `type` is the type of the condition.
|
||||
// Required.
|
||||
type?: #FlowSchemaConditionType @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `status` is the status of the condition.
|
||||
// Can be True, False, Unknown.
|
||||
// Required.
|
||||
status?: #ConditionStatus @go(Status) @protobuf(2,bytes,opt)
|
||||
|
||||
// `lastTransitionTime` is the last time the condition transitioned from one status to another.
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// `reason` is a unique, one-word, CamelCase reason for the condition's last transition.
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// `message` is a human-readable message indicating details about last transition.
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// FlowSchemaConditionType is a valid value for FlowSchemaStatusCondition.Type
|
||||
#FlowSchemaConditionType: string
|
||||
|
||||
// PriorityLevelConfiguration represents the configuration of a priority level.
|
||||
#PriorityLevelConfiguration: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `spec` is the specification of the desired behavior of a "request-priority".
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #PriorityLevelConfigurationSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// `status` is the current status of a "request-priority".
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
status?: #PriorityLevelConfigurationStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.
|
||||
#PriorityLevelConfigurationList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `items` is a list of request-priorities.
|
||||
items: [...#PriorityLevelConfiguration] @go(Items,[]PriorityLevelConfiguration) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationSpec specifies the configuration of a priority level.
|
||||
// +union
|
||||
#PriorityLevelConfigurationSpec: {
|
||||
// `type` indicates whether this priority level is subject to
|
||||
// limitation on request execution. A value of `"Exempt"` means
|
||||
// that requests of this priority level are not subject to a limit
|
||||
// (and thus are never queued) and do not detract from the
|
||||
// capacity made available to other priority levels. A value of
|
||||
// `"Limited"` means that (a) requests of this priority level
|
||||
// _are_ subject to limits and (b) some of the server's limited
|
||||
// capacity is made available exclusively to this priority level.
|
||||
// Required.
|
||||
// +unionDiscriminator
|
||||
type: #PriorityLevelEnablement @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `limited` specifies how requests are handled for a Limited priority level.
|
||||
// This field must be non-empty if and only if `type` is `"Limited"`.
|
||||
// +optional
|
||||
limited?: null | #LimitedPriorityLevelConfiguration @go(Limited,*LimitedPriorityLevelConfiguration) @protobuf(2,bytes,opt)
|
||||
|
||||
// `exempt` specifies how requests are handled for an exempt priority level.
|
||||
// This field MUST be empty if `type` is `"Limited"`.
|
||||
// This field MAY be non-empty if `type` is `"Exempt"`.
|
||||
// If empty and `type` is `"Exempt"` then the default values
|
||||
// for `ExemptPriorityLevelConfiguration` apply.
|
||||
// +optional
|
||||
exempt?: null | #ExemptPriorityLevelConfiguration @go(Exempt,*ExemptPriorityLevelConfiguration) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelEnablement indicates whether limits on execution are enabled for the priority level
|
||||
#PriorityLevelEnablement: string // #enumPriorityLevelEnablement
|
||||
|
||||
#enumPriorityLevelEnablement:
|
||||
#PriorityLevelEnablementExempt |
|
||||
#PriorityLevelEnablementLimited
|
||||
|
||||
// PriorityLevelEnablementExempt means that requests are not subject to limits
|
||||
#PriorityLevelEnablementExempt: #PriorityLevelEnablement & "Exempt"
|
||||
|
||||
// PriorityLevelEnablementLimited means that requests are subject to limits
|
||||
#PriorityLevelEnablementLimited: #PriorityLevelEnablement & "Limited"
|
||||
|
||||
// LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits.
|
||||
// It addresses two issues:
|
||||
// - How are requests for this priority level limited?
|
||||
// - What should be done with requests that exceed the limit?
|
||||
#LimitedPriorityLevelConfiguration: {
|
||||
// `assuredConcurrencyShares` (ACS) configures the execution
|
||||
// limit, which is a limit on the number of requests of this
|
||||
// priority level that may be executing at a given time. ACS must
|
||||
// be a positive number. The server's concurrency limit (SCL) is
|
||||
// divided among the concurrency-controlled priority levels in
|
||||
// proportion to their assured concurrency shares. This produces
|
||||
// the assured concurrency value (ACV) --- the number of requests
|
||||
// that may be executing at a time --- for each such priority
|
||||
// level:
|
||||
//
|
||||
// ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )
|
||||
//
|
||||
// bigger numbers of ACS mean more reserved concurrent requests (at the
|
||||
// expense of every other PL).
|
||||
// This field has a default value of 30.
|
||||
// +optional
|
||||
assuredConcurrencyShares?: int32 @go(AssuredConcurrencyShares) @protobuf(1,varint,opt)
|
||||
|
||||
// `limitResponse` indicates what to do with requests that can not be executed right now
|
||||
limitResponse?: #LimitResponse @go(LimitResponse) @protobuf(2,bytes,opt)
|
||||
|
||||
// `lendablePercent` prescribes the fraction of the level's NominalCL that
|
||||
// can be borrowed by other priority levels. The value of this
|
||||
// field must be between 0 and 100, inclusive, and it defaults to 0.
|
||||
// The number of seats that other levels can borrow from this level, known
|
||||
// as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.
|
||||
//
|
||||
// LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
|
||||
//
|
||||
// +optional
|
||||
lendablePercent?: null | int32 @go(LendablePercent,*int32) @protobuf(3,varint,opt)
|
||||
|
||||
// `borrowingLimitPercent`, if present, configures a limit on how many
|
||||
// seats this priority level can borrow from other priority levels.
|
||||
// The limit is known as this level's BorrowingConcurrencyLimit
|
||||
// (BorrowingCL) and is a limit on the total number of seats that this
|
||||
// level may borrow at any one time.
|
||||
// This field holds the ratio of that limit to the level's nominal
|
||||
// concurrency limit. When this field is non-nil, it must hold a
|
||||
// non-negative integer and the limit is calculated as follows.
|
||||
//
|
||||
// BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 )
|
||||
//
|
||||
// The value of this field can be more than 100, implying that this
|
||||
// priority level can borrow a number of seats that is greater than
|
||||
// its own nominal concurrency limit (NominalCL).
|
||||
// When this field is left `nil`, the limit is effectively infinite.
|
||||
// +optional
|
||||
borrowingLimitPercent?: null | int32 @go(BorrowingLimitPercent,*int32) @protobuf(4,varint,opt)
|
||||
}
|
||||
|
||||
// ExemptPriorityLevelConfiguration describes the configurable aspects
|
||||
// of the handling of exempt requests.
|
||||
// In the mandatory exempt configuration object the values in the fields
|
||||
// here can be modified by authorized users, unlike the rest of the `spec`.
|
||||
#ExemptPriorityLevelConfiguration: {
|
||||
// `nominalConcurrencyShares` (NCS) contributes to the computation of the
|
||||
// NominalConcurrencyLimit (NominalCL) of this level.
|
||||
// This is the number of execution seats nominally reserved for this priority level.
|
||||
// This DOES NOT limit the dispatching from this priority level
|
||||
// but affects the other priority levels through the borrowing mechanism.
|
||||
// The server's concurrency limit (ServerCL) is divided among all the
|
||||
// priority levels in proportion to their NCS values:
|
||||
//
|
||||
// NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs )
|
||||
// sum_ncs = sum[priority level k] NCS(k)
|
||||
//
|
||||
// Bigger numbers mean a larger nominal concurrency limit,
|
||||
// at the expense of every other priority level.
|
||||
// This field has a default value of zero.
|
||||
// +optional
|
||||
nominalConcurrencyShares?: null | int32 @go(NominalConcurrencyShares,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// `lendablePercent` prescribes the fraction of the level's NominalCL that
|
||||
// can be borrowed by other priority levels. This value of this
|
||||
// field must be between 0 and 100, inclusive, and it defaults to 0.
|
||||
// The number of seats that other levels can borrow from this level, known
|
||||
// as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.
|
||||
//
|
||||
// LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
|
||||
//
|
||||
// +optional
|
||||
lendablePercent?: null | int32 @go(LendablePercent,*int32) @protobuf(2,varint,opt)
|
||||
}
|
||||
|
||||
// LimitResponse defines how to handle requests that can not be executed right now.
|
||||
// +union
|
||||
#LimitResponse: {
|
||||
// `type` is "Queue" or "Reject".
|
||||
// "Queue" means that requests that can not be executed upon arrival
|
||||
// are held in a queue until they can be executed or a queuing limit
|
||||
// is reached.
|
||||
// "Reject" means that requests that can not be executed upon arrival
|
||||
// are rejected.
|
||||
// Required.
|
||||
// +unionDiscriminator
|
||||
type: #LimitResponseType @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `queuing` holds the configuration parameters for queuing.
|
||||
// This field may be non-empty only if `type` is `"Queue"`.
|
||||
// +optional
|
||||
queuing?: null | #QueuingConfiguration @go(Queuing,*QueuingConfiguration) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// LimitResponseType identifies how a Limited priority level handles a request that can not be executed right now
|
||||
#LimitResponseType: string // #enumLimitResponseType
|
||||
|
||||
#enumLimitResponseType:
|
||||
#LimitResponseTypeQueue |
|
||||
#LimitResponseTypeReject
|
||||
|
||||
// LimitResponseTypeQueue means that requests that can not be executed right now are queued until they can be executed or a queuing limit is hit
|
||||
#LimitResponseTypeQueue: #LimitResponseType & "Queue"
|
||||
|
||||
// LimitResponseTypeReject means that requests that can not be executed right now are rejected
|
||||
#LimitResponseTypeReject: #LimitResponseType & "Reject"
|
||||
|
||||
// QueuingConfiguration holds the configuration parameters for queuing
|
||||
#QueuingConfiguration: {
|
||||
// `queues` is the number of queues for this priority level. The
|
||||
// queues exist independently at each apiserver. The value must be
|
||||
// positive. Setting it to 1 effectively precludes
|
||||
// shufflesharding and thus makes the distinguisher method of
|
||||
// associated flow schemas irrelevant. This field has a default
|
||||
// value of 64.
|
||||
// +optional
|
||||
queues?: int32 @go(Queues) @protobuf(1,varint,opt)
|
||||
|
||||
// `handSize` is a small positive number that configures the
|
||||
// shuffle sharding of requests into queues. When enqueuing a request
|
||||
// at this priority level the request's flow identifier (a string
|
||||
// pair) is hashed and the hash value is used to shuffle the list
|
||||
// of queues and deal a hand of the size specified here. The
|
||||
// request is put into one of the shortest queues in that hand.
|
||||
// `handSize` must be no larger than `queues`, and should be
|
||||
// significantly smaller (so that a few heavy flows do not
|
||||
// saturate most of the queues). See the user-facing
|
||||
// documentation for more extensive guidance on setting this
|
||||
// field. This field has a default value of 8.
|
||||
// +optional
|
||||
handSize?: int32 @go(HandSize) @protobuf(2,varint,opt)
|
||||
|
||||
// `queueLengthLimit` is the maximum number of requests allowed to
|
||||
// be waiting in a given queue of this priority level at a time;
|
||||
// excess requests are rejected. This value must be positive. If
|
||||
// not specified, it will be defaulted to 50.
|
||||
// +optional
|
||||
queueLengthLimit?: int32 @go(QueueLengthLimit) @protobuf(3,varint,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationConditionType is a valid value for PriorityLevelConfigurationStatusCondition.Type
|
||||
#PriorityLevelConfigurationConditionType: string
|
||||
|
||||
// PriorityLevelConfigurationStatus represents the current state of a "request-priority".
|
||||
#PriorityLevelConfigurationStatus: {
|
||||
// `conditions` is the current state of "request-priority".
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
// +optional
|
||||
conditions?: [...#PriorityLevelConfigurationCondition] @go(Conditions,[]PriorityLevelConfigurationCondition) @protobuf(1,bytes,rep)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationCondition defines the condition of priority level.
|
||||
#PriorityLevelConfigurationCondition: {
|
||||
// `type` is the type of the condition.
|
||||
// Required.
|
||||
type?: #PriorityLevelConfigurationConditionType @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `status` is the status of the condition.
|
||||
// Can be True, False, Unknown.
|
||||
// Required.
|
||||
status?: #ConditionStatus @go(Status) @protobuf(2,bytes,opt)
|
||||
|
||||
// `lastTransitionTime` is the last time the condition transitioned from one status to another.
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// `reason` is a unique, one-word, CamelCase reason for the condition's last transition.
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// `message` is a human-readable message indicating details about last transition.
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// ConditionStatus is the status of the condition.
|
||||
#ConditionStatus: string // #enumConditionStatus
|
||||
|
||||
#enumConditionStatus:
|
||||
#ConditionTrue |
|
||||
#ConditionFalse |
|
||||
#ConditionUnknown
|
||||
|
||||
#ConditionTrue: #ConditionStatus & "True"
|
||||
#ConditionFalse: #ConditionStatus & "False"
|
||||
#ConditionUnknown: #ConditionStatus & "Unknown"
|
||||
@@ -0,0 +1,6 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/flowcontrol/v1beta2
|
||||
|
||||
// Package v1beta2 holds api types of version v1alpha1 for group "flowcontrol.apiserver.k8s.io".
|
||||
package v1beta2
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/flowcontrol/v1beta2
|
||||
|
||||
package v1beta2
|
||||
|
||||
#GroupName: "flowcontrol.apiserver.k8s.io"
|
||||
@@ -0,0 +1,634 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/flowcontrol/v1beta2
|
||||
|
||||
package v1beta2
|
||||
|
||||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
#APIGroupAll: "*"
|
||||
#ResourceAll: "*"
|
||||
#VerbAll: "*"
|
||||
#NonResourceAll: "*"
|
||||
#NameAll: "*"
|
||||
#NamespaceEvery: "*"
|
||||
|
||||
#PriorityLevelConfigurationNameExempt: "exempt"
|
||||
#PriorityLevelConfigurationNameCatchAll: "catch-all"
|
||||
#FlowSchemaNameExempt: "exempt"
|
||||
#FlowSchemaNameCatchAll: "catch-all"
|
||||
|
||||
#FlowSchemaConditionDangling: "Dangling"
|
||||
#PriorityLevelConfigurationConditionConcurrencyShared: "ConcurrencyShared"
|
||||
|
||||
#FlowSchemaMaxMatchingPrecedence: int32 & 10000
|
||||
|
||||
#ResponseHeaderMatchedPriorityLevelConfigurationUID: "X-Kubernetes-PF-PriorityLevel-UID"
|
||||
#ResponseHeaderMatchedFlowSchemaUID: "X-Kubernetes-PF-FlowSchema-UID"
|
||||
|
||||
// AutoUpdateAnnotationKey is the name of an annotation that enables
|
||||
// automatic update of the spec of the bootstrap configuration
|
||||
// object(s), if set to 'true'.
|
||||
//
|
||||
// On a fresh install, all bootstrap configuration objects will have auto
|
||||
// update enabled with the following annotation key:
|
||||
// apf.kubernetes.io/autoupdate-spec: 'true'
|
||||
//
|
||||
// The kube-apiserver periodically checks the bootstrap configuration
|
||||
// objects on the cluster and applies updates if necessary.
|
||||
//
|
||||
// kube-apiserver enforces an 'always auto-update' policy for the
|
||||
// mandatory configuration object(s). This implies:
|
||||
// - the auto-update annotation key is added with a value of 'true'
|
||||
// if it is missing.
|
||||
// - the auto-update annotation key is set to 'true' if its current value
|
||||
// is a boolean false or has an invalid boolean representation
|
||||
// (if the cluster operator sets it to 'false' it will be stomped)
|
||||
// - any changes to the spec made by the cluster operator will be
|
||||
// stomped, except for changes to the `nominalConcurrencyShares`
|
||||
// and `lendablePercent` fields of the PriorityLevelConfiguration
|
||||
// named "exempt".
|
||||
//
|
||||
// The kube-apiserver will apply updates on the suggested configuration if:
|
||||
// - the cluster operator has enabled auto-update by setting the annotation
|
||||
// (apf.kubernetes.io/autoupdate-spec: 'true') or
|
||||
// - the annotation key is missing but the generation is 1
|
||||
//
|
||||
// If the suggested configuration object is missing the annotation key,
|
||||
// kube-apiserver will update the annotation appropriately:
|
||||
// - it is set to 'true' if generation of the object is '1' which usually
|
||||
// indicates that the spec of the object has not been changed.
|
||||
// - it is set to 'false' if generation of the object is greater than 1.
|
||||
//
|
||||
// The goal is to enable the kube-apiserver to apply update on suggested
|
||||
// configuration objects installed by previous releases but not overwrite
|
||||
// changes made by the cluster operators.
|
||||
// Note that this distinction is imperfectly detected: in the case where an
|
||||
// operator deletes a suggested configuration object and later creates it
|
||||
// but with a variant spec and then does no updates of the object
|
||||
// (generation is 1), the technique outlined above will incorrectly
|
||||
// determine that the object should be auto-updated.
|
||||
#AutoUpdateAnnotationKey: "apf.kubernetes.io/autoupdate-spec"
|
||||
|
||||
// FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with
|
||||
// similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher".
|
||||
#FlowSchema: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `spec` is the specification of the desired behavior of a FlowSchema.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #FlowSchemaSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// `status` is the current status of a FlowSchema.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
status?: #FlowSchemaStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// FlowSchemaList is a list of FlowSchema objects.
|
||||
#FlowSchemaList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `items` is a list of FlowSchemas.
|
||||
items: [...#FlowSchema] @go(Items,[]FlowSchema) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowSchemaSpec describes how the FlowSchema's specification looks like.
|
||||
#FlowSchemaSpec: {
|
||||
// `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot
|
||||
// be resolved, the FlowSchema will be ignored and marked as invalid in its status.
|
||||
// Required.
|
||||
priorityLevelConfiguration: #PriorityLevelConfigurationReference @go(PriorityLevelConfiguration) @protobuf(1,bytes,opt)
|
||||
|
||||
// `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen
|
||||
// FlowSchema is among those with the numerically lowest (which we take to be logically highest)
|
||||
// MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000].
|
||||
// Note that if the precedence is not specified, it will be set to 1000 as default.
|
||||
// +optional
|
||||
matchingPrecedence?: int32 @go(MatchingPrecedence) @protobuf(2,varint,opt)
|
||||
|
||||
// `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema.
|
||||
// `nil` specifies that the distinguisher is disabled and thus will always be the empty string.
|
||||
// +optional
|
||||
distinguisherMethod?: null | #FlowDistinguisherMethod @go(DistinguisherMethod,*FlowDistinguisherMethod) @protobuf(3,bytes,opt)
|
||||
|
||||
// `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if
|
||||
// at least one member of rules matches the request.
|
||||
// if it is an empty slice, there will be no requests matching the FlowSchema.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
rules?: [...#PolicyRulesWithSubjects] @go(Rules,[]PolicyRulesWithSubjects) @protobuf(4,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowDistinguisherMethodType is the type of flow distinguisher method
|
||||
#FlowDistinguisherMethodType: string // #enumFlowDistinguisherMethodType
|
||||
|
||||
#enumFlowDistinguisherMethodType:
|
||||
#FlowDistinguisherMethodByUserType |
|
||||
#FlowDistinguisherMethodByNamespaceType
|
||||
|
||||
// FlowDistinguisherMethodByUserType specifies that the flow distinguisher is the username in the request.
|
||||
// This type is used to provide some insulation between users.
|
||||
#FlowDistinguisherMethodByUserType: #FlowDistinguisherMethodType & "ByUser"
|
||||
|
||||
// FlowDistinguisherMethodByNamespaceType specifies that the flow distinguisher is the namespace of the
|
||||
// object that the request acts upon. If the object is not namespaced, or if the request is a non-resource
|
||||
// request, then the distinguisher will be the empty string. An example usage of this type is to provide
|
||||
// some insulation between tenants in a situation where there are multiple tenants and each namespace
|
||||
// is dedicated to a tenant.
|
||||
#FlowDistinguisherMethodByNamespaceType: #FlowDistinguisherMethodType & "ByNamespace"
|
||||
|
||||
// FlowDistinguisherMethod specifies the method of a flow distinguisher.
|
||||
#FlowDistinguisherMethod: {
|
||||
// `type` is the type of flow distinguisher method
|
||||
// The supported types are "ByUser" and "ByNamespace".
|
||||
// Required.
|
||||
type: #FlowDistinguisherMethodType @go(Type) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationReference contains information that points to the "request-priority" being used.
|
||||
#PriorityLevelConfigurationReference: {
|
||||
// `name` is the name of the priority level configuration being referenced
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject
|
||||
// making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches
|
||||
// a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member
|
||||
// of resourceRules or nonResourceRules matches the request.
|
||||
#PolicyRulesWithSubjects: {
|
||||
// subjects is the list of normal user, serviceaccount, or group that this rule cares about.
|
||||
// There must be at least one member in this slice.
|
||||
// A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request.
|
||||
// +listType=atomic
|
||||
// Required.
|
||||
subjects: [...#Subject] @go(Subjects,[]Subject) @protobuf(1,bytes,rep)
|
||||
|
||||
// `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the
|
||||
// target resource.
|
||||
// At least one of `resourceRules` and `nonResourceRules` has to be non-empty.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
resourceRules?: [...#ResourcePolicyRule] @go(ResourceRules,[]ResourcePolicyRule) @protobuf(2,bytes,opt)
|
||||
|
||||
// `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb
|
||||
// and the target non-resource URL.
|
||||
// +listType=atomic
|
||||
// +optional
|
||||
nonResourceRules?: [...#NonResourcePolicyRule] @go(NonResourceRules,[]NonResourcePolicyRule) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// Subject matches the originator of a request, as identified by the request authentication system. There are three
|
||||
// ways of matching an originator; by user, group, or service account.
|
||||
// +union
|
||||
#Subject: {
|
||||
// `kind` indicates which one of the other fields is non-empty.
|
||||
// Required
|
||||
// +unionDiscriminator
|
||||
kind: #SubjectKind @go(Kind) @protobuf(1,bytes,opt)
|
||||
|
||||
// `user` matches based on username.
|
||||
// +optional
|
||||
user?: null | #UserSubject @go(User,*UserSubject) @protobuf(2,bytes,opt)
|
||||
|
||||
// `group` matches based on user group name.
|
||||
// +optional
|
||||
group?: null | #GroupSubject @go(Group,*GroupSubject) @protobuf(3,bytes,opt)
|
||||
|
||||
// `serviceAccount` matches ServiceAccounts.
|
||||
// +optional
|
||||
serviceAccount?: null | #ServiceAccountSubject @go(ServiceAccount,*ServiceAccountSubject) @protobuf(4,bytes,opt)
|
||||
}
|
||||
|
||||
// SubjectKind is the kind of subject.
|
||||
#SubjectKind: string // #enumSubjectKind
|
||||
|
||||
#enumSubjectKind:
|
||||
#SubjectKindUser |
|
||||
#SubjectKindGroup |
|
||||
#SubjectKindServiceAccount
|
||||
|
||||
#SubjectKindUser: #SubjectKind & "User"
|
||||
#SubjectKindGroup: #SubjectKind & "Group"
|
||||
#SubjectKindServiceAccount: #SubjectKind & "ServiceAccount"
|
||||
|
||||
// UserSubject holds detailed information for user-kind subject.
|
||||
#UserSubject: {
|
||||
// `name` is the username that matches, or "*" to match all usernames.
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// GroupSubject holds detailed information for group-kind subject.
|
||||
#GroupSubject: {
|
||||
// name is the user group that matches, or "*" to match all user groups.
|
||||
// See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some
|
||||
// well-known group names.
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(1,bytes,opt)
|
||||
}
|
||||
|
||||
// ServiceAccountSubject holds detailed information for service-account-kind subject.
|
||||
#ServiceAccountSubject: {
|
||||
// `namespace` is the namespace of matching ServiceAccount objects.
|
||||
// Required.
|
||||
namespace: string @go(Namespace) @protobuf(1,bytes,opt)
|
||||
|
||||
// `name` is the name of matching ServiceAccount objects, or "*" to match regardless of name.
|
||||
// Required.
|
||||
name: string @go(Name) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// ResourcePolicyRule is a predicate that matches some resource
|
||||
// requests, testing the request's verb and the target resource. A
|
||||
// ResourcePolicyRule matches a resource request if and only if: (a)
|
||||
// at least one member of verbs matches the request, (b) at least one
|
||||
// member of apiGroups matches the request, (c) at least one member of
|
||||
// resources matches the request, and (d) either (d1) the request does
|
||||
// not specify a namespace (i.e., `Namespace==""`) and clusterScope is
|
||||
// true or (d2) the request specifies a namespace and least one member
|
||||
// of namespaces matches the request's namespace.
|
||||
#ResourcePolicyRule: {
|
||||
// `verbs` is a list of matching verbs and may not be empty.
|
||||
// "*" matches all verbs and, if present, must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// `apiGroups` is a list of matching API groups and may not be empty.
|
||||
// "*" matches all API groups and, if present, must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
apiGroups: [...string] @go(APIGroups,[]string) @protobuf(2,bytes,rep)
|
||||
|
||||
// `resources` is a list of matching resources (i.e., lowercase
|
||||
// and plural) with, if desired, subresource. For example, [
|
||||
// "services", "nodes/status" ]. This list may not be empty.
|
||||
// "*" matches all resources and, if present, must be the only entry.
|
||||
// Required.
|
||||
// +listType=set
|
||||
resources: [...string] @go(Resources,[]string) @protobuf(3,bytes,rep)
|
||||
|
||||
// `clusterScope` indicates whether to match requests that do not
|
||||
// specify a namespace (which happens either because the resource
|
||||
// is not namespaced or the request targets all namespaces).
|
||||
// If this field is omitted or false then the `namespaces` field
|
||||
// must contain a non-empty list.
|
||||
// +optional
|
||||
clusterScope?: bool @go(ClusterScope) @protobuf(4,varint,opt)
|
||||
|
||||
// `namespaces` is a list of target namespaces that restricts
|
||||
// matches. A request that specifies a target namespace matches
|
||||
// only if either (a) this list contains that target namespace or
|
||||
// (b) this list contains "*". Note that "*" matches any
|
||||
// specified namespace but does not match a request that _does
|
||||
// not specify_ a namespace (see the `clusterScope` field for
|
||||
// that).
|
||||
// This list may be empty, but only if `clusterScope` is true.
|
||||
// +optional
|
||||
// +listType=set
|
||||
namespaces?: [...string] @go(Namespaces,[]string) @protobuf(5,bytes,rep)
|
||||
}
|
||||
|
||||
// NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the
|
||||
// target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member
|
||||
// of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.
|
||||
#NonResourcePolicyRule: {
|
||||
// `verbs` is a list of matching verbs and may not be empty.
|
||||
// "*" matches all verbs. If it is present, it must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
verbs: [...string] @go(Verbs,[]string) @protobuf(1,bytes,rep)
|
||||
|
||||
// `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty.
|
||||
// For example:
|
||||
// - "/healthz" is legal
|
||||
// - "/hea*" is illegal
|
||||
// - "/hea" is legal but matches nothing
|
||||
// - "/hea/*" also matches nothing
|
||||
// - "/healthz/*" matches all per-component health checks.
|
||||
// "*" matches all non-resource urls. if it is present, it must be the only entry.
|
||||
// +listType=set
|
||||
// Required.
|
||||
nonResourceURLs: [...string] @go(NonResourceURLs,[]string) @protobuf(6,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowSchemaStatus represents the current state of a FlowSchema.
|
||||
#FlowSchemaStatus: {
|
||||
// `conditions` is a list of the current states of FlowSchema.
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
// +optional
|
||||
conditions?: [...#FlowSchemaCondition] @go(Conditions,[]FlowSchemaCondition) @protobuf(1,bytes,rep)
|
||||
}
|
||||
|
||||
// FlowSchemaCondition describes conditions for a FlowSchema.
|
||||
#FlowSchemaCondition: {
|
||||
// `type` is the type of the condition.
|
||||
// Required.
|
||||
type?: #FlowSchemaConditionType @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `status` is the status of the condition.
|
||||
// Can be True, False, Unknown.
|
||||
// Required.
|
||||
status?: #ConditionStatus @go(Status) @protobuf(2,bytes,opt)
|
||||
|
||||
// `lastTransitionTime` is the last time the condition transitioned from one status to another.
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// `reason` is a unique, one-word, CamelCase reason for the condition's last transition.
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// `message` is a human-readable message indicating details about last transition.
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// FlowSchemaConditionType is a valid value for FlowSchemaStatusCondition.Type
|
||||
#FlowSchemaConditionType: string
|
||||
|
||||
// PriorityLevelConfiguration represents the configuration of a priority level.
|
||||
#PriorityLevelConfiguration: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ObjectMeta @go(ObjectMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `spec` is the specification of the desired behavior of a "request-priority".
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
spec?: #PriorityLevelConfigurationSpec @go(Spec) @protobuf(2,bytes,opt)
|
||||
|
||||
// `status` is the current status of a "request-priority".
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
status?: #PriorityLevelConfigurationStatus @go(Status) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.
|
||||
#PriorityLevelConfigurationList: {
|
||||
metav1.#TypeMeta
|
||||
|
||||
// `metadata` is the standard object's metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
||||
// +optional
|
||||
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
|
||||
|
||||
// `items` is a list of request-priorities.
|
||||
items: [...#PriorityLevelConfiguration] @go(Items,[]PriorityLevelConfiguration) @protobuf(2,bytes,rep)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationSpec specifies the configuration of a priority level.
|
||||
// +union
|
||||
#PriorityLevelConfigurationSpec: {
|
||||
// `type` indicates whether this priority level is subject to
|
||||
// limitation on request execution. A value of `"Exempt"` means
|
||||
// that requests of this priority level are not subject to a limit
|
||||
// (and thus are never queued) and do not detract from the
|
||||
// capacity made available to other priority levels. A value of
|
||||
// `"Limited"` means that (a) requests of this priority level
|
||||
// _are_ subject to limits and (b) some of the server's limited
|
||||
// capacity is made available exclusively to this priority level.
|
||||
// Required.
|
||||
// +unionDiscriminator
|
||||
type: #PriorityLevelEnablement @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `limited` specifies how requests are handled for a Limited priority level.
|
||||
// This field must be non-empty if and only if `type` is `"Limited"`.
|
||||
// +optional
|
||||
limited?: null | #LimitedPriorityLevelConfiguration @go(Limited,*LimitedPriorityLevelConfiguration) @protobuf(2,bytes,opt)
|
||||
|
||||
// `exempt` specifies how requests are handled for an exempt priority level.
|
||||
// This field MUST be empty if `type` is `"Limited"`.
|
||||
// This field MAY be non-empty if `type` is `"Exempt"`.
|
||||
// If empty and `type` is `"Exempt"` then the default values
|
||||
// for `ExemptPriorityLevelConfiguration` apply.
|
||||
// +optional
|
||||
exempt?: null | #ExemptPriorityLevelConfiguration @go(Exempt,*ExemptPriorityLevelConfiguration) @protobuf(3,bytes,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelEnablement indicates whether limits on execution are enabled for the priority level
|
||||
#PriorityLevelEnablement: string // #enumPriorityLevelEnablement
|
||||
|
||||
#enumPriorityLevelEnablement:
|
||||
#PriorityLevelEnablementExempt |
|
||||
#PriorityLevelEnablementLimited
|
||||
|
||||
// PriorityLevelEnablementExempt means that requests are not subject to limits
|
||||
#PriorityLevelEnablementExempt: #PriorityLevelEnablement & "Exempt"
|
||||
|
||||
// PriorityLevelEnablementLimited means that requests are subject to limits
|
||||
#PriorityLevelEnablementLimited: #PriorityLevelEnablement & "Limited"
|
||||
|
||||
// LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits.
|
||||
// It addresses two issues:
|
||||
// - How are requests for this priority level limited?
|
||||
// - What should be done with requests that exceed the limit?
|
||||
#LimitedPriorityLevelConfiguration: {
|
||||
// `assuredConcurrencyShares` (ACS) configures the execution
|
||||
// limit, which is a limit on the number of requests of this
|
||||
// priority level that may be executing at a given time. ACS must
|
||||
// be a positive number. The server's concurrency limit (SCL) is
|
||||
// divided among the concurrency-controlled priority levels in
|
||||
// proportion to their assured concurrency shares. This produces
|
||||
// the assured concurrency value (ACV) --- the number of requests
|
||||
// that may be executing at a time --- for each such priority
|
||||
// level:
|
||||
//
|
||||
// ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )
|
||||
//
|
||||
// bigger numbers of ACS mean more reserved concurrent requests (at the
|
||||
// expense of every other PL).
|
||||
// This field has a default value of 30.
|
||||
// +optional
|
||||
assuredConcurrencyShares?: int32 @go(AssuredConcurrencyShares) @protobuf(1,varint,opt)
|
||||
|
||||
// `limitResponse` indicates what to do with requests that can not be executed right now
|
||||
limitResponse?: #LimitResponse @go(LimitResponse) @protobuf(2,bytes,opt)
|
||||
|
||||
// `lendablePercent` prescribes the fraction of the level's NominalCL that
|
||||
// can be borrowed by other priority levels. The value of this
|
||||
// field must be between 0 and 100, inclusive, and it defaults to 0.
|
||||
// The number of seats that other levels can borrow from this level, known
|
||||
// as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.
|
||||
//
|
||||
// LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
|
||||
//
|
||||
// +optional
|
||||
lendablePercent?: null | int32 @go(LendablePercent,*int32) @protobuf(3,varint,opt)
|
||||
|
||||
// `borrowingLimitPercent`, if present, configures a limit on how many
|
||||
// seats this priority level can borrow from other priority levels.
|
||||
// The limit is known as this level's BorrowingConcurrencyLimit
|
||||
// (BorrowingCL) and is a limit on the total number of seats that this
|
||||
// level may borrow at any one time.
|
||||
// This field holds the ratio of that limit to the level's nominal
|
||||
// concurrency limit. When this field is non-nil, it must hold a
|
||||
// non-negative integer and the limit is calculated as follows.
|
||||
//
|
||||
// BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 )
|
||||
//
|
||||
// The value of this field can be more than 100, implying that this
|
||||
// priority level can borrow a number of seats that is greater than
|
||||
// its own nominal concurrency limit (NominalCL).
|
||||
// When this field is left `nil`, the limit is effectively infinite.
|
||||
// +optional
|
||||
borrowingLimitPercent?: null | int32 @go(BorrowingLimitPercent,*int32) @protobuf(4,varint,opt)
|
||||
}
|
||||
|
||||
// ExemptPriorityLevelConfiguration describes the configurable aspects
|
||||
// of the handling of exempt requests.
|
||||
// In the mandatory exempt configuration object the values in the fields
|
||||
// here can be modified by authorized users, unlike the rest of the `spec`.
|
||||
#ExemptPriorityLevelConfiguration: {
|
||||
// `nominalConcurrencyShares` (NCS) contributes to the computation of the
|
||||
// NominalConcurrencyLimit (NominalCL) of this level.
|
||||
// This is the number of execution seats nominally reserved for this priority level.
|
||||
// This DOES NOT limit the dispatching from this priority level
|
||||
// but affects the other priority levels through the borrowing mechanism.
|
||||
// The server's concurrency limit (ServerCL) is divided among all the
|
||||
// priority levels in proportion to their NCS values:
|
||||
//
|
||||
// NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs )
|
||||
// sum_ncs = sum[priority level k] NCS(k)
|
||||
//
|
||||
// Bigger numbers mean a larger nominal concurrency limit,
|
||||
// at the expense of every other priority level.
|
||||
// This field has a default value of zero.
|
||||
// +optional
|
||||
nominalConcurrencyShares?: null | int32 @go(NominalConcurrencyShares,*int32) @protobuf(1,varint,opt)
|
||||
|
||||
// `lendablePercent` prescribes the fraction of the level's NominalCL that
|
||||
// can be borrowed by other priority levels. This value of this
|
||||
// field must be between 0 and 100, inclusive, and it defaults to 0.
|
||||
// The number of seats that other levels can borrow from this level, known
|
||||
// as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.
|
||||
//
|
||||
// LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
|
||||
//
|
||||
// +optional
|
||||
lendablePercent?: null | int32 @go(LendablePercent,*int32) @protobuf(2,varint,opt)
|
||||
}
|
||||
|
||||
// LimitResponse defines how to handle requests that can not be executed right now.
|
||||
// +union
|
||||
#LimitResponse: {
|
||||
// `type` is "Queue" or "Reject".
|
||||
// "Queue" means that requests that can not be executed upon arrival
|
||||
// are held in a queue until they can be executed or a queuing limit
|
||||
// is reached.
|
||||
// "Reject" means that requests that can not be executed upon arrival
|
||||
// are rejected.
|
||||
// Required.
|
||||
// +unionDiscriminator
|
||||
type: #LimitResponseType @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `queuing` holds the configuration parameters for queuing.
|
||||
// This field may be non-empty only if `type` is `"Queue"`.
|
||||
// +optional
|
||||
queuing?: null | #QueuingConfiguration @go(Queuing,*QueuingConfiguration) @protobuf(2,bytes,opt)
|
||||
}
|
||||
|
||||
// LimitResponseType identifies how a Limited priority level handles a request that can not be executed right now
|
||||
#LimitResponseType: string // #enumLimitResponseType
|
||||
|
||||
#enumLimitResponseType:
|
||||
#LimitResponseTypeQueue |
|
||||
#LimitResponseTypeReject
|
||||
|
||||
// LimitResponseTypeQueue means that requests that can not be executed right now are queued until they can be executed or a queuing limit is hit
|
||||
#LimitResponseTypeQueue: #LimitResponseType & "Queue"
|
||||
|
||||
// LimitResponseTypeReject means that requests that can not be executed right now are rejected
|
||||
#LimitResponseTypeReject: #LimitResponseType & "Reject"
|
||||
|
||||
// QueuingConfiguration holds the configuration parameters for queuing
|
||||
#QueuingConfiguration: {
|
||||
// `queues` is the number of queues for this priority level. The
|
||||
// queues exist independently at each apiserver. The value must be
|
||||
// positive. Setting it to 1 effectively precludes
|
||||
// shufflesharding and thus makes the distinguisher method of
|
||||
// associated flow schemas irrelevant. This field has a default
|
||||
// value of 64.
|
||||
// +optional
|
||||
queues?: int32 @go(Queues) @protobuf(1,varint,opt)
|
||||
|
||||
// `handSize` is a small positive number that configures the
|
||||
// shuffle sharding of requests into queues. When enqueuing a request
|
||||
// at this priority level the request's flow identifier (a string
|
||||
// pair) is hashed and the hash value is used to shuffle the list
|
||||
// of queues and deal a hand of the size specified here. The
|
||||
// request is put into one of the shortest queues in that hand.
|
||||
// `handSize` must be no larger than `queues`, and should be
|
||||
// significantly smaller (so that a few heavy flows do not
|
||||
// saturate most of the queues). See the user-facing
|
||||
// documentation for more extensive guidance on setting this
|
||||
// field. This field has a default value of 8.
|
||||
// +optional
|
||||
handSize?: int32 @go(HandSize) @protobuf(2,varint,opt)
|
||||
|
||||
// `queueLengthLimit` is the maximum number of requests allowed to
|
||||
// be waiting in a given queue of this priority level at a time;
|
||||
// excess requests are rejected. This value must be positive. If
|
||||
// not specified, it will be defaulted to 50.
|
||||
// +optional
|
||||
queueLengthLimit?: int32 @go(QueueLengthLimit) @protobuf(3,varint,opt)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationConditionType is a valid value for PriorityLevelConfigurationStatusCondition.Type
|
||||
#PriorityLevelConfigurationConditionType: string
|
||||
|
||||
// PriorityLevelConfigurationStatus represents the current state of a "request-priority".
|
||||
#PriorityLevelConfigurationStatus: {
|
||||
// `conditions` is the current state of "request-priority".
|
||||
// +listType=map
|
||||
// +listMapKey=type
|
||||
// +optional
|
||||
conditions?: [...#PriorityLevelConfigurationCondition] @go(Conditions,[]PriorityLevelConfigurationCondition) @protobuf(1,bytes,rep)
|
||||
}
|
||||
|
||||
// PriorityLevelConfigurationCondition defines the condition of priority level.
|
||||
#PriorityLevelConfigurationCondition: {
|
||||
// `type` is the type of the condition.
|
||||
// Required.
|
||||
type?: #PriorityLevelConfigurationConditionType @go(Type) @protobuf(1,bytes,opt)
|
||||
|
||||
// `status` is the status of the condition.
|
||||
// Can be True, False, Unknown.
|
||||
// Required.
|
||||
status?: #ConditionStatus @go(Status) @protobuf(2,bytes,opt)
|
||||
|
||||
// `lastTransitionTime` is the last time the condition transitioned from one status to another.
|
||||
lastTransitionTime?: metav1.#Time @go(LastTransitionTime) @protobuf(3,bytes,opt)
|
||||
|
||||
// `reason` is a unique, one-word, CamelCase reason for the condition's last transition.
|
||||
reason?: string @go(Reason) @protobuf(4,bytes,opt)
|
||||
|
||||
// `message` is a human-readable message indicating details about last transition.
|
||||
message?: string @go(Message) @protobuf(5,bytes,opt)
|
||||
}
|
||||
|
||||
// ConditionStatus is the status of the condition.
|
||||
#ConditionStatus: string // #enumConditionStatus
|
||||
|
||||
#enumConditionStatus:
|
||||
#ConditionTrue |
|
||||
#ConditionFalse |
|
||||
#ConditionUnknown
|
||||
|
||||
#ConditionTrue: #ConditionStatus & "True"
|
||||
#ConditionFalse: #ConditionStatus & "False"
|
||||
#ConditionUnknown: #ConditionStatus & "Unknown"
|
||||
@@ -0,0 +1,6 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go k8s.io/api/flowcontrol/v1beta3
|
||||
|
||||
// Package v1beta3 holds api types of version v1beta3 for group "flowcontrol.apiserver.k8s.io".
|
||||
package v1beta3
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user