Move CRDs to apiextensions.k8s.io/v1

Closes: #18
Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: I76c75b19fb0055db70f2377b91212ff76108c5f9
This commit is contained in:
Sean Eagan 2021-04-21 11:39:31 -05:00
parent 068afe5bb9
commit f5faa72150
4 changed files with 275 additions and 274 deletions

View File

@ -1,7 +1,7 @@
ARG BASE_IMAGE=gcr.io/distroless/static:nonroot ARG BASE_IMAGE=gcr.io/distroless/static:nonroot
# Build the manager binary # Build the manager binary
FROM gcr.io/gcp-runtimes/go1-builder:1.13 as builder FROM gcr.io/gcp-runtimes/go1-builder:1.14 as builder
ENV PATH "/usr/local/go/bin:$PATH" ENV PATH "/usr/local/go/bin:$PATH"

View File

@ -16,8 +16,8 @@ SIP_BASE_IMAGE ?= gcr.io/distroless/static:nonroot
JUMP_HOST_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_PREFIX)/$(JUMP_HOST_IMAGE_NAME):$(DOCKER_IMAGE_TAG) JUMP_HOST_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_PREFIX)/$(JUMP_HOST_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
SIP_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_PREFIX)/$(SIP_IMAGE_NAME):$(DOCKER_IMAGE_TAG) SIP_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_PREFIX)/$(SIP_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion) # Produce CRDs that work back to Kubernetes 1.16
CRD_OPTIONS ?= "crd:trivialVersions=true" CRD_OPTIONS ?= crd:crdVersions=v1
TOOLBINDIR := tools/bin TOOLBINDIR := tools/bin

View File

@ -1,6 +1,6 @@
--- ---
apiVersion: apiextensions.k8s.io/v1beta1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
@ -15,9 +15,9 @@ spec:
plural: sipclusters plural: sipclusters
singular: sipcluster singular: sipcluster
scope: Namespaced scope: Namespaced
subresources: versions:
status: {} - name: v1
validation: schema:
openAPIV3Schema: openAPIV3Schema:
description: SIPCluster is the Schema for the sipclusters API description: SIPCluster is the Schema for the sipclusters API
properties: properties:
@ -38,11 +38,11 @@ spec:
properties: properties:
nodes: nodes:
additionalProperties: additionalProperties:
description: 'NodeSet are the the list of Nodes objects workers, or description: 'NodeSet are the the list of Nodes objects workers,
ControlPlane that define expectations for the Tenant Clusters Includes or ControlPlane that define expectations for the Tenant Clusters
artifacts to associate with each defined namespace Such as : - Roles Includes artifacts to associate with each defined namespace Such
for the Nodes - Flavor for the Nodes image - Anti-affinity expectations as : - Roles for the Nodes - Flavor for the Nodes image - Anti-affinity
- Scale of the group of Nodes' expectations - Scale of the group of Nodes'
properties: properties:
count: count:
description: Count defines the scale expectations for the Nodes description: Count defines the scale expectations for the Nodes
@ -76,11 +76,11 @@ spec:
Exists and DoesNotExist. Exists and DoesNotExist.
type: string type: string
values: values:
description: values is an array of string values. If description: values is an array of string values.
the operator is In or NotIn, the values array must If the operator is In or NotIn, the values array
be non-empty. If the operator is Exists or DoesNotExist, must be non-empty. If the operator is Exists or
the values array must be empty. This array is replaced DoesNotExist, the values array must be empty. This
during a strategic merge patch. array is replaced during a strategic merge patch.
items: items:
type: string type: string
type: array type: array
@ -92,27 +92,27 @@ spec:
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
description: matchLabels is a map of {key,value} pairs. A description: matchLabels is a map of {key,value} pairs.
single {key,value} in the matchLabels map is equivalent A single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is "key", to an element of matchExpressions, whose key field is
the operator is "In", and the values array contains only "key", the operator is "In", and the values array contains
"value". The requirements are ANDed. only "value". The requirements are ANDed.
type: object type: object
type: object type: object
topologyKey: topologyKey:
description: TopologyKey is similar to the same named field in description: TopologyKey is similar to the same named field
the kubernetes Pod anti-affinity API. If two BMHs are labeled in the kubernetes Pod anti-affinity API. If two BMHs are labeled
with this key and have identical values for that label, they with this key and have identical values for that label, they
are considered to be in the same topology domain, and thus only are considered to be in the same topology domain, and thus
one will be scheduled. only one will be scheduled.
type: string type: string
type: object type: object
description: Nodes defines the set of nodes to schedule for each BMH description: Nodes defines the set of nodes to schedule for each BMH
role. role.
type: object type: object
services: services:
description: Services defines the services that are deployed when a description: Services defines the services that are deployed when
SIPCluster is provisioned. a SIPCluster is provisioned.
properties: properties:
jumpHost: jumpHost:
description: JumpHost defines the sub-cluster jump host services. description: JumpHost defines the sub-cluster jump host services.
@ -140,12 +140,12 @@ spec:
type: integer type: integer
nodeSSHPrivateKeys: nodeSSHPrivateKeys:
description: NodeSSHPrivateKeys holds the name of a Secret description: NodeSSHPrivateKeys holds the name of a Secret
in the same namespace as the SIPCluster CR, whose key values in the same namespace as the SIPCluster CR, whose key
each represent an ssh private key that can be used to access values each represent an ssh private key that can be used
the cluster nodes. They are mounted into the jumphost with to access the cluster nodes. They are mounted into the
the secret keys serving as file names relative to a common jumphost with the secret keys serving as file names relative
directory, and then configured as identity files in the to a common directory, and then configured as identity
SSH config file of the default user. files in the SSH config file of the default user.
type: string type: string
sshAuthorizedKeys: sshAuthorizedKeys:
items: items:
@ -162,7 +162,8 @@ spec:
services. services.
items: items:
description: LoadBalancerServiceControlPlane is an infrastructure description: LoadBalancerServiceControlPlane is an infrastructure
service type that represents the sub-cluster load balancer service. service type that represents the sub-cluster load balancer
service.
properties: properties:
clusterIP: clusterIP:
type: string type: string
@ -185,8 +186,9 @@ spec:
description: ' LoadBalancer defines the sub-cluster load balancer description: ' LoadBalancer defines the sub-cluster load balancer
services.' services.'
items: items:
description: LoadBalancerServiceWorker is an infrastructure service description: LoadBalancerServiceWorker is an infrastructure
type that represents the sub-cluster load balancer service. service type that represents the sub-cluster load balancer
service.
properties: properties:
clusterIP: clusterIP:
type: string type: string
@ -217,10 +219,10 @@ spec:
description: "Condition contains details for one aspect of the current description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example, use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a foo's type FooStatus struct{ // Represents the observations of a
current state. // Known .status.conditions.type are: \"Available\", foo's current state. // Known .status.conditions.type are:
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
+patchStrategy=merge // +listType=map // +listMapKey=type \ // +patchStrategy=merge // +listType=map // +listMapKey=type
\ Conditions []metav1.Condition `json:\"conditions,omitempty\" \ Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
\n // other fields }" \n // other fields }"
@ -233,8 +235,8 @@ spec:
format: date-time format: date-time
type: string type: string
message: message:
description: message is a human readable message indicating details description: message is a human readable message indicating
about the transition. This may be an empty string. details about the transition. This may be an empty string.
maxLength: 32768 maxLength: 32768
type: string type: string
observedGeneration: observedGeneration:
@ -248,11 +250,11 @@ spec:
type: integer type: integer
reason: reason:
description: reason contains a programmatic identifier indicating description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers of the reason for the condition's last transition. Producers
specific condition types may define expected values and meanings of specific condition types may define expected values and
for this field, and whether the values are considered a guaranteed meanings for this field, and whether the values are considered
API. The value should be a CamelCase string. This field may a guaranteed API. The value should be a CamelCase string.
not be empty. This field may not be empty.
maxLength: 1024 maxLength: 1024
minLength: 1 minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
@ -283,11 +285,10 @@ spec:
type: array type: array
type: object type: object
type: object type: object
version: v1
versions:
- name: v1
served: true served: true
storage: true storage: true
subresources:
status: {}
status: status:
acceptedNames: acceptedNames:
kind: "" kind: ""

2
go.mod
View File

@ -1,6 +1,6 @@
module sipcluster module sipcluster
go 1.13 go 1.14
require ( require (
github.com/PaesslerAG/jsonpath v0.1.1 github.com/PaesslerAG/jsonpath v0.1.1