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 files of Kubernetes demo
Browse files Browse the repository at this point in the history
This reduces diffs down the line.

Change-Id: I42f0e694a098956a872d39ddbf8cc336eb83ad93
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8235
Reviewed-by: CUE cueckoo <[email protected]>
Reviewed-by: Marcel van Lohuizen <[email protected]>
  • Loading branch information
mpvl committed Jan 20, 2021
1 parent f0c025c commit ca5d2db
Show file tree
Hide file tree
Showing 8 changed files with 251 additions and 61 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
package v1

#LabelHostname: "kubernetes.io/hostname"
#LabelFailureDomainBetaZone: "failure-domain.beta.kubernetes.io/zone"
#LabelFailureDomainBetaRegion: "failure-domain.beta.kubernetes.io/region"
#LabelTopologyZone: "topology.kubernetes.io/zone"
#LabelTopologyRegion: "topology.kubernetes.io/region"

// Legacy names for compat.
#LabelZoneFailureDomain: "failure-domain.beta.kubernetes.io/zone"
#LabelZoneRegion: "failure-domain.beta.kubernetes.io/region"
#LabelZoneFailureDomainStable: "topology.kubernetes.io/zone"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ package resource
#Tera: #Scale & 12
#Peta: #Scale & 15
#Exa: #Scale & 18

// infDecAmount implements common operations over an inf.Dec that are specific to the quantity
// representation.
_#infDecAmount: string
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Code generated by cue get go. DO NOT EDIT.

//cue:generate cue get go k8s.io/apimachinery/pkg/api/resource

package resource

_#suffix: string

// suffixer can interpret and construct suffixes.
_#suffixer: _
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,7 @@ import (
// A label selector is a label query over a set of resources. The result of matchLabels and
// matchExpressions are ANDed. An empty label selector matches all objects. A null
// label selector matches no objects.
// +structType=atomic
#LabelSelector: {
// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

package runtime

// codec binds an encoder and decoder.
_#codec: {
Encoder: #Encoder
Decoder: #Decoder
}

// NoopEncoder converts an Decoder to a Serializer or Codec for code that expects them but only uses decoding.
#NoopEncoder: {
Decoder: #Decoder
Expand All @@ -16,5 +22,16 @@ _#noopEncoderIdentifier: #Identifier & "noop"
Encoder: #Encoder
}

_#base64Serializer: {
Encoder: #Encoder
Decoder: #Decoder
}

_#internalGroupVersionerIdentifier: "internal"
_#disabledGroupVersionerIdentifier: "disabled"

_#internalGroupVersioner: {
}

_#disabledGroupVersioner: {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Code generated by cue get go. DO NOT EDIT.

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

package runtime

_#encodable: _
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ package runtime
// MultiObjectTyper returns the types of objects across multiple schemes in order.
#MultiObjectTyper: [...#ObjectTyper]

_#defaultFramer: {
}

// WithVersionEncoder serializes an object and ensures the GVK is set.
#WithVersionEncoder: {
Version: #GroupVersioner
Expand Down

0 comments on commit ca5d2db

Please sign in to comment.