Skip to content

Commit

Permalink
Merge pull request #84 from adrianludwin/cr10
Browse files Browse the repository at this point in the history
Use controller-runtime 0.10.1 and Go 16
  • Loading branch information
k8s-ci-robot committed Sep 26, 2021
2 parents 334c3e8 + 3561cba commit 08b31cf
Show file tree
Hide file tree
Showing 2,779 changed files with 336,387 additions and 72,982 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.14 as builder
FROM golang:1.16 as builder

WORKDIR /workspace
# Copy the Go Modules manifests and all third-party libraries that are unlikely to change frequently
Expand Down
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ endif

CONTROLLER_GEN ?= ${CURDIR}/bin/controller-gen

# Enable CRD per-version validation. As of Kubernetes 1.13, we can have multiple
# versions of the Kind defined in the CRD, and use a webhook to convert between
# them. By default, KubeBuilder disables generating different validation for
# different versions of the Kind in the CRD, to be compatible with older
# Kubernetes versions.
CRD_OPTIONS ?= "crd:trivialVersions=false"

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
GOBIN ?= $(shell go env GOPATH)/bin

Expand Down Expand Up @@ -150,7 +143,7 @@ run: build
manifests: controller-gen
@echo "Building manifests with image ${HNC_IMG}"
@# See the comment above about the 'paths' arguments
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./api/..." paths="./cmd/..." paths="./internal/..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) crd rbac:roleName=manager-role webhook paths="./api/..." paths="./cmd/..." paths="./internal/..." output:crd:artifacts:config=config/crd/bases
./hack/crd_patches/singleton-enum-patch.sh
-rm -rf manifests/
mkdir manifests
Expand Down Expand Up @@ -187,7 +180,7 @@ generate: controller-gen

check-generate: generate
@if [ $(shell git status --untracked-files=no --porcelain | wc -l ) != 0 ]; then \
echo "Error: generated files are out of sync, please run 'make generate' before committing" && exit 1; \
echo "Error: generated files are out of sync, please run 'make generate' before committing" && git diff && exit 1; \
fi

# Use the version of controller-gen that's checked into vendor/ (see
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ steps:
echo Checking out hnc-$_HNC_IMG_TAG
git checkout hnc-$_HNC_IMG_TAG
# Build the manifests and the kubectl plugin
- name: golang:1.14
- name: golang:1.16
entrypoint: 'bash'
args:
- '-c'
Expand Down
54 changes: 43 additions & 11 deletions config/crd/bases/hnc.x-k8s.io_hierarchyconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
name: hierarchyconfigurations.hnc.x-k8s.io
spec:
Expand All @@ -22,10 +22,14 @@ spec:
description: Hierarchy is the Schema for the hierarchies API
properties:
apiVersion:
description: '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'
description: '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'
type: string
kind:
description: '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'
description: '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'
type: string
metadata:
# This is patched by hack/crd_patches/singleton-enum-patch.sh
Expand All @@ -39,7 +43,8 @@ spec:
description: HierarchySpec defines the desired state of Hierarchy
properties:
allowCascadingDeletion:
description: AllowCascadingDeletion indicates if the subnamespaces of this namespace are allowed to cascading delete.
description: AllowCascadingDeletion indicates if the subnamespaces
of this namespace are allowed to cascading delete.
type: boolean
parent:
description: Parent indicates the parent of this namespace, if any.
Expand All @@ -49,30 +54,53 @@ spec:
description: HierarchyStatus defines the observed state of Hierarchy
properties:
children:
description: Children indicates the direct children of this namespace, if any.
description: Children indicates the direct children of this namespace,
if any.
items:
type: string
type: array
conditions:
description: Conditions describes the errors, if any.
items:
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are:
\"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
\ // +patchStrategy=merge // +listType=map // +listMapKey=type
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
\n // other fields }"
properties:
lastTransitionTime:
description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be when
the underlying condition changed. If that is not known, then
using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: message is a human readable message indicating details about the transition. This may be an empty string.
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if .metadata.generation
is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the current
state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values and
meanings for this field, and whether the values are considered
a guaranteed API. The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
Expand All @@ -85,7 +113,11 @@ spec:
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across resources
like Available, but because arbitrary conditions can be useful
(see .node.status.conditions), the ability to deconflict is
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down
Loading

0 comments on commit 08b31cf

Please sign in to comment.