Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
doc/tutorial/kubernetes: update to latest
Browse files Browse the repository at this point in the history
Change-Id: I7ecef4cc9dbc2d8514200b7e578d90489b692a0d
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/4203
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
  • Loading branch information
mpvl committed Dec 2, 2019
1 parent 6ffe55d commit 0e038f6
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ NamespaceAll :: ""
// NamespaceNodeLease is the namespace where we place node lease objects (used for node heartbeats)
NamespaceNodeLease :: "kube-node-lease"

// TopologyKeyAny is the service topology key that matches any node
TopologyKeyAny :: "*"

// Volume represents a named volume in a pod that may be accessed by any container in the pod.
Volume :: {
// Volume's name.
Expand Down Expand Up @@ -2096,7 +2099,7 @@ EnvVar :: {
// EnvVarSource represents a source for the value of an EnvVar.
EnvVarSource :: {
// Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations,
// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.
// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
// +optional
fieldRef?: null | ObjectFieldSelector @go(FieldRef,*ObjectFieldSelector) @protobuf(1,bytes,opt)

Expand Down Expand Up @@ -3291,7 +3294,6 @@ PodSpec :: {
// in the same pod, and the first process in each container will not be assigned PID 1.
// HostPID and ShareProcessNamespace cannot both be set.
// Optional: Default to false.
// This field is beta-level and may be disabled with the PodShareProcessNamespace feature.
// +k8s:conversion-gen=false
// +optional
shareProcessNamespace?: null | bool @go(ShareProcessNamespace,*bool) @protobuf(27,varint,opt)
Expand Down Expand Up @@ -4229,6 +4231,9 @@ IPv4Protocol :: IPFamily & "IPv4"
// IPv6Protocol indicates that this IP is IPv6 protocol
IPv6Protocol :: IPFamily & "IPv6"

// MaxServiceTopologyKeys is the largest number of topology keys allowed on a service
MaxServiceTopologyKeys :: 16

// ServiceSpec describes the attributes that a user creates on a service.
ServiceSpec :: {
// The list of ports that are exposed by this service.
Expand Down Expand Up @@ -4355,6 +4360,21 @@ ServiceSpec :: {
// cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment.
// +optional
ipFamily?: null | IPFamily @go(IPFamily,*IPFamily) @protobuf(15,bytes,opt,Configcasttype=IPFamily)

// topologyKeys is a preference-order list of topology keys which
// implementations of services should use to preferentially sort endpoints
// when accessing this Service, it can not be used at the same time as
// externalTrafficPolicy=Local.
// Topology keys must be valid label keys and at most 16 keys may be specified.
// Endpoints are chosen based on the first topology key with available backends.
// If this field is specified and all entries have no backends that match
// the topology of the client, the service has no backends for that client
// and connections should fail.
// The special value "*" may be used to mean "any topology". This catch-all
// value, if used, only makes sense as the last value in the list.
// If this is not specified or empty, no topology constraints will be applied.
// +optional
topologyKeys?: [...string] @go(TopologyKeys,[]string) @protobuf(16,bytes,opt)
}

// ServicePort contains information on service's port.
Expand Down Expand Up @@ -5100,6 +5120,10 @@ NamespaceActive :: NamespacePhase & "Active"
// NamespaceTerminating means the namespace is undergoing graceful termination
NamespaceTerminating :: NamespacePhase & "Terminating"

// NamespaceTerminatingCause is returned as a defaults.cause item when a change is
// forbidden due to the namespace being terminated.
NamespaceTerminatingCause :: metav1.CauseType & "NamespaceTerminating"

NamespaceConditionType :: string // enumNamespaceConditionType

enumNamespaceConditionType ::
Expand Down Expand Up @@ -6277,7 +6301,7 @@ WindowsSecurityContextOptions :: {
// Defaults to the user specified in image metadata if unspecified.
// May also be set in PodSecurityContext. If set in both SecurityContext and
// PodSecurityContext, the value specified in SecurityContext takes precedence.
// This field is alpha-level and it is only honored by servers that enable the WindowsRunAsUserName feature flag.
// This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag.
// +optional
runAsUserName?: null | string @go(RunAsUserName,*string) @protobuf(3,bytes,opt)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@

package v1

LabelHostname :: "kubernetes.io/hostname"
LabelZoneFailureDomain :: "failure-domain.beta.kubernetes.io/zone"
LabelZoneRegion :: "failure-domain.beta.kubernetes.io/region"
LabelInstanceType :: "beta.kubernetes.io/instance-type"
LabelOSStable :: "kubernetes.io/os"
LabelArchStable :: "kubernetes.io/arch"
LabelHostname :: "kubernetes.io/hostname"
LabelZoneFailureDomain :: "failure-domain.beta.kubernetes.io/zone"
LabelZoneRegion :: "failure-domain.beta.kubernetes.io/region"
LabelZoneFailureDomainStable :: "topology.kubernetes.io/zone"
LabelZoneRegionStable :: "topology.kubernetes.io/region"
LabelInstanceType :: "beta.kubernetes.io/instance-type"
LabelInstanceTypeStable :: "node.kubernetes.io/instance-type"
LabelOSStable :: "kubernetes.io/os"
LabelArchStable :: "kubernetes.io/arch"

// LabelWindowsBuild is used on Windows nodes to specify the Windows build number starting with v1.17.0.
// It's in the format MajorVersion.MinorVersion.BuildNumber (for ex: 10.0.17763)
LabelWindowsBuild :: "node.kubernetes.io/windows-build"

// LabelNamespaceSuffixKubelet is an allowed label namespace suffix kubelets can self-set ([*.]kubelet.kubernetes.io/*)
LabelNamespaceSuffixKubelet :: "kubelet.kubernetes.io"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Code generated by cue get go. DO NOT EDIT.

//cue:generate cue get go k8s.io/api/core/v1

package v1

// TaintNodeNotReady will be added when node is not ready
// and feature-gate for TaintBasedEvictions flag is enabled,
// and removed when node becomes ready.
TaintNodeNotReady :: "node.kubernetes.io/not-ready"

// TaintNodeUnreachable will be added when node becomes unreachable
// (corresponding to NodeReady status ConditionUnknown)
// and feature-gate for TaintBasedEvictions flag is enabled,
// and removed when node becomes reachable (NodeReady status ConditionTrue).
TaintNodeUnreachable :: "node.kubernetes.io/unreachable"

// TaintNodeUnschedulable will be added when node becomes unschedulable
// and feature-gate for TaintNodesByCondition flag is enabled,
// and removed when node becomes scheduable.
TaintNodeUnschedulable :: "node.kubernetes.io/unschedulable"

// TaintNodeMemoryPressure will be added when node has memory pressure
// and feature-gate for TaintNodesByCondition flag is enabled,
// and removed when node has enough memory.
TaintNodeMemoryPressure :: "node.kubernetes.io/memory-pressure"

// TaintNodeDiskPressure will be added when node has disk pressure
// and feature-gate for TaintNodesByCondition flag is enabled,
// and removed when node has enough disk.
TaintNodeDiskPressure :: "node.kubernetes.io/disk-pressure"

// TaintNodeNetworkUnavailable will be added when node's network is unavailable
// and feature-gate for TaintNodesByCondition flag is enabled,
// and removed when network becomes ready.
TaintNodeNetworkUnavailable :: "node.kubernetes.io/network-unavailable"

// TaintNodePIDPressure will be added when node has pid pressure
// and feature-gate for TaintNodesByCondition flag is enabled,
// and removed when node has enough disk.
TaintNodePIDPressure :: "node.kubernetes.io/pid-pressure"
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ DeleteOptions :: {

// Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be
// returned.
// +k8s:conversion-gen=false
// +optional
preconditions?: null | Preconditions @go(Preconditions,*Preconditions) @protobuf(2,bytes,opt)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ StreamSerializerInfo :: {
// that performs HTTP content negotiation to accept multiple formats.
NegotiatedSerializer :: _

// ClientNegotiator handles turning an HTTP content type into the appropriate encoder.
// Use NewClientNegotiator or NewVersionedClientNegotiator to create this interface from
// a NegotiatedSerializer.
ClientNegotiator :: _

// StorageSerializer is an interface used for obtaining encoders, decoders, and serializers
// that can read and write data at rest. This would commonly be used by client tools that must
// read files, or server side storage interfaces that persist restful objects.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Code generated by cue get go. DO NOT EDIT.

//cue:generate cue get go k8s.io/apimachinery/pkg/runtime

package runtime

// NegotiateError is returned when a ClientNegotiator is unable to locate
// a serializer for the requested operation.
NegotiateError :: {
ContentType: string
Stream: bool
}

0 comments on commit 0e038f6

Please sign in to comment.