Skip to content

Commit 67bf363

Browse files
committed
doc/tutorial/kubernetes: update k8s version
Change-Id: I54f13715bb8c7f0c67a3bec85f57543ed27f22d0 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9941 Reviewed-by: CUE cueckoo <cueckoo@gmail.com> Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
1 parent ec427f9 commit 67bf363

File tree

9 files changed

+213
-50
lines changed

9 files changed

+213
-50
lines changed

doc/tutorial/kubernetes/quick/cue.mod/gen/k8s.io/api/apps/v1/types_go_gen.cue

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -486,19 +486,41 @@ import (
486486
// The maximum number of DaemonSet pods that can be unavailable during the
487487
// update. Value can be an absolute number (ex: 5) or a percentage of total
488488
// number of DaemonSet pods at the start of the update (ex: 10%). Absolute
489-
// number is calculated from percentage by rounding up.
490-
// This cannot be 0.
489+
// number is calculated from percentage by rounding down to a minimum of one.
490+
// This cannot be 0 if MaxSurge is 0
491491
// Default value is 1.
492492
// Example: when this is set to 30%, at most 30% of the total number of nodes
493493
// that should be running the daemon pod (i.e. status.desiredNumberScheduled)
494-
// can have their pods stopped for an update at any given
495-
// time. The update starts by stopping at most 30% of those DaemonSet pods
496-
// and then brings up new DaemonSet pods in their place. Once the new pods
497-
// are available, it then proceeds onto other DaemonSet pods, thus ensuring
498-
// that at least 70% of original number of DaemonSet pods are available at
499-
// all times during the update.
494+
// can have their pods stopped for an update at any given time. The update
495+
// starts by stopping at most 30% of those DaemonSet pods and then brings
496+
// up new DaemonSet pods in their place. Once the new pods are available,
497+
// it then proceeds onto other DaemonSet pods, thus ensuring that at least
498+
// 70% of original number of DaemonSet pods are available at all times during
499+
// the update.
500500
// +optional
501501
maxUnavailable?: null | intstr.#IntOrString @go(MaxUnavailable,*intstr.IntOrString) @protobuf(1,bytes,opt)
502+
503+
// The maximum number of nodes with an existing available DaemonSet pod that
504+
// can have an updated DaemonSet pod during during an update.
505+
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
506+
// This can not be 0 if MaxUnavailable is 0.
507+
// Absolute number is calculated from percentage by rounding up to a minimum of 1.
508+
// Default value is 0.
509+
// Example: when this is set to 30%, at most 30% of the total number of nodes
510+
// that should be running the daemon pod (i.e. status.desiredNumberScheduled)
511+
// can have their a new pod created before the old pod is marked as deleted.
512+
// The update starts by launching new pods on 30% of nodes. Once an updated
513+
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
514+
// on that node is marked deleted. If the old pod becomes unavailable for any
515+
// reason (Ready transitions to false, is evicted, or is drained) an updated
516+
// pod is immediatedly created on that node without considering surge limits.
517+
// Allowing surge implies the possibility that the resources consumed by the
518+
// daemonset on any given node can double if the readiness check fails, and
519+
// so resource intensive daemonsets should take into account that they may
520+
// cause evictions during disruption.
521+
// This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate.
522+
// +optional
523+
maxSurge?: null | intstr.#IntOrString @go(MaxSurge,*intstr.IntOrString) @protobuf(2,bytes,opt)
502524
}
503525

504526
// DaemonSetSpec is the specification of a daemon set.

doc/tutorial/kubernetes/quick/cue.mod/gen/k8s.io/api/core/v1/annotation_key_constants_go_gen.cue

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,31 @@ _#kubectlPrefix: "kubectl.kubernetes.io/"
109109
// https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md
110110
#EndpointsLastChangeTriggerTime: "endpoints.kubernetes.io/last-change-trigger-time"
111111

112+
// EndpointsOverCapacity will be set on an Endpoints resource when it
113+
// exceeds the maximum capacity of 1000 addresses. Inititially the Endpoints
114+
// controller will set this annotation with a value of "warning". In a
115+
// future release, the controller may set this annotation with a value of
116+
// "truncated" to indicate that any addresses exceeding the limit of 1000
117+
// have been truncated from the Endpoints resource.
118+
#EndpointsOverCapacity: "endpoints.kubernetes.io/over-capacity"
119+
112120
// MigratedPluginsAnnotationKey is the annotation key, set for CSINode objects, that is a comma-separated
113121
// list of in-tree plugins that will be serviced by the CSI backend on the Node represented by CSINode.
114122
// This annotation is used by the Attach Detach Controller to determine whether to use the in-tree or
115123
// CSI Backend for a volume plugin on a specific node.
116124
#MigratedPluginsAnnotationKey: "storage.alpha.kubernetes.io/migrated-plugins"
125+
126+
// PodDeletionCost can be used to set to an int32 that represent the cost of deleting
127+
// a pod compared to other pods belonging to the same ReplicaSet. Pods with lower
128+
// deletion cost are preferred to be deleted before pods with higher deletion cost.
129+
// Note that this is honored on a best-effort basis, and so it does not offer guarantees on
130+
// pod deletion order.
131+
// The implicit deletion cost for pods that don't set the annotation is 0, negative values are permitted.
132+
//
133+
// This annotation is alpha-level and is only honored when PodDeletionCost feature is enabled.
134+
#PodDeletionCost: "controller.kubernetes.io/pod-deletion-cost"
135+
136+
// AnnotationTopologyAwareHints can be used to enable or disable Topology
137+
// Aware Hints for a Service. This may be set to "Auto" or "Disabled". Any
138+
// other value is treated as "Disabled".
139+
#AnnotationTopologyAwareHints: "service.kubernetes.io/topology-aware-hints"

doc/tutorial/kubernetes/quick/cue.mod/gen/k8s.io/api/core/v1/types_go_gen.cue

Lines changed: 88 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ import (
171171
// +optional
172172
csi?: null | #CSIVolumeSource @go(CSI,*CSIVolumeSource) @protobuf(28,bytes,opt)
173173

174-
// Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature).
174+
// Ephemeral represents a volume that is handled by a cluster storage driver.
175175
// The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts,
176176
// and deleted when the pod is removed.
177177
//
@@ -196,6 +196,9 @@ import (
196196
// A pod can use both types of ephemeral volumes and
197197
// persistent volumes at the same time.
198198
//
199+
// This is a beta feature and only available when the GenericEphemeralVolume
200+
// feature gate is enabled.
201+
//
199202
// +optional
200203
ephemeral?: null | #EphemeralVolumeSource @go(Ephemeral,*EphemeralVolumeSource) @protobuf(29,bytes,opt)
201204
}
@@ -2033,11 +2036,6 @@ import (
20332036
//
20342037
// Required, must not be nil.
20352038
volumeClaimTemplate?: null | #PersistentVolumeClaimTemplate @go(VolumeClaimTemplate,*PersistentVolumeClaimTemplate) @protobuf(1,bytes,opt)
2036-
2037-
// Specifies a read-only configuration for the volume.
2038-
// Defaults to false (read/write).
2039-
// +optional
2040-
readOnly?: bool @go(ReadOnly) @protobuf(2,varint,opt)
20412039
}
20422040

20432041
// PersistentVolumeClaimTemplate is used to produce
@@ -2392,6 +2390,18 @@ import (
23922390
// Defaults to 3. Minimum value is 1.
23932391
// +optional
23942392
failureThreshold?: int32 @go(FailureThreshold) @protobuf(6,varint,opt)
2393+
2394+
// Optional duration in seconds the pod needs to terminate gracefully upon probe failure.
2395+
// The grace period is the duration in seconds after the processes running in the pod are sent
2396+
// a termination signal and the time when the processes are forcibly halted with a kill signal.
2397+
// Set this value longer than the expected cleanup time for your process.
2398+
// If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this
2399+
// value overrides the value provided by the pod spec.
2400+
// Value must be non-negative integer. The value zero indicates stop immediately via
2401+
// the kill signal (no opportunity to shut down).
2402+
// This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate.
2403+
// +optional
2404+
terminationGracePeriodSeconds?: null | int64 @go(TerminationGracePeriodSeconds,*int64) @protobuf(7,varint,opt)
23952405
}
23962406

23972407
// PullPolicy describes a policy for if/when to pull a container image
@@ -2457,14 +2467,14 @@ import (
24572467
// ResourceRequirements describes the compute resource requirements.
24582468
#ResourceRequirements: {
24592469
// Limits describes the maximum amount of compute resources allowed.
2460-
// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
2470+
// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
24612471
// +optional
24622472
limits?: #ResourceList @go(Limits) @protobuf(1,bytes,rep,casttype=ResourceList,castkey=ResourceName)
24632473

24642474
// Requests describes the minimum amount of compute resources required.
24652475
// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
24662476
// otherwise to an implementation-defined value.
2467-
// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
2477+
// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
24682478
// +optional
24692479
requests?: #ResourceList @go(Requests) @protobuf(2,bytes,rep,casttype=ResourceList,castkey=ResourceName)
24702480
}
@@ -2548,7 +2558,7 @@ import (
25482558

25492559
// Compute Resources required by this container.
25502560
// Cannot be updated.
2551-
// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
2561+
// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
25522562
// +optional
25532563
resources?: #ResourceRequirements @go(Resources) @protobuf(8,bytes,opt)
25542564

@@ -3112,8 +3122,10 @@ import (
31123122
// +optional
31133123
labelSelector?: null | metav1.#LabelSelector @go(LabelSelector,*metav1.LabelSelector) @protobuf(1,bytes,opt)
31143124

3115-
// namespaces specifies which namespaces the labelSelector applies to (matches against);
3116-
// null or empty list means "this pod's namespace"
3125+
// namespaces specifies a static list of namespace names that the term applies to.
3126+
// The term is applied to the union of the namespaces listed in this field
3127+
// and the ones selected by namespaceSelector.
3128+
// null or empty namespaces list and null namespaceSelector means "this pod's namespace"
31173129
// +optional
31183130
namespaces?: [...string] @go(Namespaces,[]string) @protobuf(2,bytes,rep)
31193131

@@ -3123,6 +3135,15 @@ import (
31233135
// selected pods is running.
31243136
// Empty topologyKey is not allowed.
31253137
topologyKey: string @go(TopologyKey) @protobuf(3,bytes,opt)
3138+
3139+
// A label query over the set of namespaces that the term applies to.
3140+
// The term is applied to the union of the namespaces selected by this field
3141+
// and the ones listed in the namespaces field.
3142+
// null selector and null or empty namespaces list means "this pod's namespace".
3143+
// An empty selector ({}) matches all namespaces.
3144+
// This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled.
3145+
// +optional
3146+
namespaceSelector?: null | metav1.#LabelSelector @go(NamespaceSelector,*metav1.LabelSelector) @protobuf(4,bytes,opt)
31263147
}
31273148

31283149
// Node affinity is a group of node affinity scheduling rules.
@@ -3302,7 +3323,8 @@ import (
33023323
restartPolicy?: #RestartPolicy @go(RestartPolicy) @protobuf(3,bytes,opt,casttype=RestartPolicy)
33033324

33043325
// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
3305-
// Value must be non-negative integer. The value zero indicates delete immediately.
3326+
// Value must be non-negative integer. The value zero indicates stop immediately via
3327+
// the kill signal (no opportunity to shut down).
33063328
// If this value is nil, the default grace period will be used instead.
33073329
// The grace period is the duration in seconds after the processes running in the pod are sent
33083330
// a termination signal and the time when the processes are forcibly halted with a kill signal.
@@ -4339,6 +4361,21 @@ import (
43394361
// record, with no exposing or proxying of any pods involved.
43404362
#ServiceTypeExternalName: #ServiceType & "ExternalName"
43414363

4364+
// ServiceInternalTrafficPolicyType describes the type of traffic routing for
4365+
// internal traffic
4366+
#ServiceInternalTrafficPolicyType: string // #enumServiceInternalTrafficPolicyType
4367+
4368+
#enumServiceInternalTrafficPolicyType:
4369+
#ServiceInternalTrafficPolicyCluster |
4370+
#ServiceInternalTrafficPolicyLocal
4371+
4372+
// ServiceInternalTrafficPolicyCluster routes traffic to all endpoints
4373+
#ServiceInternalTrafficPolicyCluster: #ServiceInternalTrafficPolicyType & "Cluster"
4374+
4375+
// ServiceInternalTrafficPolicyLocal only routes to node-local
4376+
// endpoints, otherwise drops the traffic
4377+
#ServiceInternalTrafficPolicyLocal: #ServiceInternalTrafficPolicyType & "Local"
4378+
43424379
// Service External Traffic Policy Type string
43434380
#ServiceExternalTrafficPolicyType: string // #enumServiceExternalTrafficPolicyType
43444381

@@ -4566,7 +4603,7 @@ import (
45664603
// externalName is the external reference that discovery mechanisms will
45674604
// return as an alias for this service (e.g. a DNS CNAME record). No
45684605
// proxying will be involved. Must be a lowercase RFC-1123 hostname
4569-
// (https://tools.ietf.org/html/rfc1123) and requires Type to be
4606+
// (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName".
45704607
// +optional
45714608
externalName?: string @go(ExternalName) @protobuf(10,bytes,opt)
45724609

@@ -4619,6 +4656,7 @@ import (
46194656
// value, if used, only makes sense as the last value in the list.
46204657
// If this is not specified or empty, no topology constraints will be applied.
46214658
// This field is alpha-level and is only honored by servers that enable the ServiceTopology feature.
4659+
// This field is deprecated and will be removed in a future version.
46224660
// +optional
46234661
topologyKeys?: [...string] @go(TopologyKeys,[]string) @protobuf(16,bytes,opt)
46244662

@@ -4663,6 +4701,30 @@ import (
46634701
// This field is alpha-level and is only honored by servers that enable the ServiceLBNodePortControl feature.
46644702
// +optional
46654703
allocateLoadBalancerNodePorts?: null | bool @go(AllocateLoadBalancerNodePorts,*bool) @protobuf(20,bytes,opt)
4704+
4705+
// loadBalancerClass is the class of the load balancer implementation this Service belongs to.
4706+
// If specified, the value of this field must be a label-style identifier, with an optional prefix,
4707+
// e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users.
4708+
// This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load
4709+
// balancer implementation is used, today this is typically done through the cloud provider integration,
4710+
// but should apply for any default implementation. If set, it is assumed that a load balancer
4711+
// implementation is watching for Services with a matching class. Any default load balancer
4712+
// implementation (e.g. cloud providers) should ignore Services that set this field.
4713+
// This field can only be set when creating or updating a Service to type 'LoadBalancer'.
4714+
// Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.
4715+
// +featureGate=LoadBalancerClass
4716+
// +optional
4717+
loadBalancerClass?: null | string @go(LoadBalancerClass,*string) @protobuf(21,bytes,opt)
4718+
4719+
// InternalTrafficPolicy specifies if the cluster internal traffic
4720+
// should be routed to all endpoints or node-local endpoints only.
4721+
// "Cluster" routes internal traffic to a Service to all endpoints.
4722+
// "Local" routes traffic to node-local endpoints only, traffic is
4723+
// dropped if no node-local endpoints are ready.
4724+
// The default value is "Cluster".
4725+
// +featureGate=ServiceInternalTrafficPolicy
4726+
// +optional
4727+
internalTrafficPolicy?: null | #ServiceInternalTrafficPolicyType @go(InternalTrafficPolicy,*ServiceInternalTrafficPolicyType) @protobuf(22,bytes,opt)
46664728
}
46674729

46684730
// ServicePort contains information on service's port.
@@ -4677,6 +4739,7 @@ import (
46774739

46784740
// The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".
46794741
// Default is TCP.
4742+
// +default="TCP"
46804743
// +optional
46814744
protocol?: #Protocol @go(Protocol) @protobuf(2,bytes,opt,casttype=Protocol)
46824745

@@ -6007,7 +6070,7 @@ import (
60076070
metadata?: metav1.#ListMeta @go(ListMeta) @protobuf(1,bytes,opt)
60086071

60096072
// Items is a list of LimitRange objects.
6010-
// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
6073+
// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
60116074
items: [...#LimitRange] @go(Items,[]LimitRange) @protobuf(2,bytes,rep)
60126075
}
60136076

@@ -6074,12 +6137,13 @@ import (
60746137
#ResourceQuotaScopeNotTerminating |
60756138
#ResourceQuotaScopeBestEffort |
60766139
#ResourceQuotaScopeNotBestEffort |
6077-
#ResourceQuotaScopePriorityClass
6140+
#ResourceQuotaScopePriorityClass |
6141+
#ResourceQuotaScopeCrossNamespacePodAffinity
60786142

6079-
// Match all pod objects where spec.activeDeadlineSeconds
6143+
// Match all pod objects where spec.activeDeadlineSeconds >=0
60806144
#ResourceQuotaScopeTerminating: #ResourceQuotaScope & "Terminating"
60816145

6082-
// Match all pod objects where !spec.activeDeadlineSeconds
6146+
// Match all pod objects where spec.activeDeadlineSeconds is nil
60836147
#ResourceQuotaScopeNotTerminating: #ResourceQuotaScope & "NotTerminating"
60846148

60856149
// Match all pod objects that have best effort quality of service
@@ -6091,6 +6155,10 @@ import (
60916155
// Match all pod objects that have priority class mentioned
60926156
#ResourceQuotaScopePriorityClass: #ResourceQuotaScope & "PriorityClass"
60936157

6158+
// Match all pod objects that have cross-namespace pod (anti)affinity mentioned.
6159+
// This is an alpha feature enabled by the PodAffinityNamespaceSelector feature flag.
6160+
#ResourceQuotaScopeCrossNamespacePodAffinity: #ResourceQuotaScope & "CrossNamespacePodAffinity"
6161+
60946162
// ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
60956163
#ResourceQuotaSpec: {
60966164
// hard is the set of desired hard limits for each named resource.
@@ -6211,7 +6279,6 @@ import (
62116279
// be updated (only object metadata can be modified).
62126280
// If not set to true, the field can be modified at any time.
62136281
// Defaulted to nil.
6214-
// This is a beta field enabled by ImmutableEphemeralVolumes feature gate.
62156282
// +optional
62166283
immutable?: null | bool @go(Immutable,*bool) @protobuf(5,varint,opt)
62176284

@@ -6223,9 +6290,9 @@ import (
62236290
data?: {[string]: bytes} @go(Data,map[string][]byte) @protobuf(2,bytes,rep)
62246291

62256292
// stringData allows specifying non-binary secret data in string form.
6226-
// It is provided as a write-only convenience method.
6293+
// It is provided as a write-only input field for convenience.
62276294
// All keys and values are merged into the data field on write, overwriting any existing values.
6228-
// It is never output when reading from the API.
6295+
// The stringData field is never output when reading from the API.
62296296
// +k8s:conversion-gen=false
62306297
// +optional
62316298
stringData?: {[string]: string} @go(StringData,map[string]string) @protobuf(4,bytes,rep)
@@ -6366,7 +6433,6 @@ import (
63666433
// be updated (only object metadata can be modified).
63676434
// If not set to true, the field can be modified at any time.
63686435
// Defaulted to nil.
6369-
// This is a beta field enabled by ImmutableEphemeralVolumes feature gate.
63706436
// +optional
63716437
immutable?: null | bool @go(Immutable,*bool) @protobuf(4,varint,opt)
63726438

@@ -6665,7 +6731,7 @@ import (
66656731
data: bytes @go(Data,[]byte) @protobuf(3,bytes,opt)
66666732
}
66676733

6668-
// "default-scheduler" is the name of default scheduler.
6734+
// DefaultSchedulerName defines the name of default scheduler.
66696735
#DefaultSchedulerName: "default-scheduler"
66706736

66716737
// RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule

0 commit comments

Comments
 (0)