Skip to content

Commit

Permalink
Merge pull request #36 from wallrj/build-tools-upgrade
Browse files Browse the repository at this point in the history
Update to latest version of controller-gen
  • Loading branch information
jetstack-bot authored Apr 14, 2023
2 parents 41b1a6d + fa84e4e commit 15d40eb
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 41 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ DOCKER_REGISTRY ?= ghcr.io
DOCKER_IMAGE_NAME ?= cert-manager/sample-external-issuer/controller
# Image URL to use all building/pushing image targets
IMG ?= ${DOCKER_REGISTRY}/${DOCKER_IMAGE_NAME}:${VERSION}
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true"

# BIN is the directory where tools will be installed
export BIN ?= ${CURDIR}/bin
Expand All @@ -31,7 +29,7 @@ K8S_CLUSTER_NAME := sample-external-issuer-e2e
CERT_MANAGER_VERSION ?= 1.11.1

# Controller tools
CONTROLLER_GEN_VERSION := 0.5.0
CONTROLLER_GEN_VERSION := 0.11.3
CONTROLLER_GEN := ${BIN}/controller-gen

INSTALL_YAML ?= build/install.yaml
Expand Down Expand Up @@ -86,7 +84,7 @@ deploy: ${INSTALL_YAML}
# Generate manifests e.g. CRD, RBAC etc.
.PHONY: manifests
manifests: ${CONTROLLER_GEN}
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) rbac:roleName=manager-role webhook crd paths="./..." output:crd:artifacts:config=config/crd/bases

# Run go fmt against code
.PHONY: fmt
Expand Down
44 changes: 26 additions & 18 deletions config/crd/bases/sample-issuer.example.com_clusterissuers.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
name: clusterissuers.sample-issuer.example.com
spec:
Expand All @@ -22,21 +21,30 @@ spec:
description: ClusterIssuer is the Schema for the clusterissuers 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:
type: object
spec:
description: IssuerSpec defines the desired state of Issuer
properties:
authSecretName:
description: A reference to a Secret in the same namespace as the referent. If the referent is a ClusterIssuer, the reference instead refers to the resource with the given name in the configured 'cluster resource namespace', which is set as a flag on the controller component (and defaults to the namespace that the controller runs in).
description: A reference to a Secret in the same namespace as the
referent. If the referent is a ClusterIssuer, the reference instead
refers to the resource with the given name in the configured 'cluster
resource namespace', which is set as a flag on the controller component
(and defaults to the namespace that the controller runs in).
type: string
url:
description: 'URL is the base URL for the endpoint of the signing service, for example: "https://sample-signer.example.com/api".'
description: 'URL is the base URL for the endpoint of the signing
service, for example: "https://sample-signer.example.com/api".'
type: string
required:
- authSecretName
Expand All @@ -46,22 +54,28 @@ spec:
description: IssuerStatus defines the observed state of Issuer
properties:
conditions:
description: List of status conditions to indicate the status of a CertificateRequest. Known condition types are `Ready`.
description: List of status conditions to indicate the status of a
CertificateRequest. Known condition types are `Ready`.
items:
description: IssuerCondition contains condition information for an Issuer.
description: IssuerCondition contains condition information for
an Issuer.
properties:
lastTransitionTime:
description: LastTransitionTime is the timestamp corresponding to the last status change of this condition.
description: LastTransitionTime is the timestamp corresponding
to the last status change of this condition.
format: date-time
type: string
message:
description: Message is a human readable description of the details of the last transition, complementing reason.
description: Message is a human readable description of the
details of the last transition, complementing reason.
type: string
reason:
description: Reason is a brief machine readable explanation for the condition's last transition.
description: Reason is a brief machine readable explanation
for the condition's last transition.
type: string
status:
description: Status of the condition, one of ('True', 'False', 'Unknown').
description: Status of the condition, one of ('True', 'False',
'Unknown').
enum:
- "True"
- "False"
Expand All @@ -81,9 +95,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
44 changes: 26 additions & 18 deletions config/crd/bases/sample-issuer.example.com_issuers.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
name: issuers.sample-issuer.example.com
spec:
Expand All @@ -22,21 +21,30 @@ spec:
description: Issuer is the Schema for the issuers 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:
type: object
spec:
description: IssuerSpec defines the desired state of Issuer
properties:
authSecretName:
description: A reference to a Secret in the same namespace as the referent. If the referent is a ClusterIssuer, the reference instead refers to the resource with the given name in the configured 'cluster resource namespace', which is set as a flag on the controller component (and defaults to the namespace that the controller runs in).
description: A reference to a Secret in the same namespace as the
referent. If the referent is a ClusterIssuer, the reference instead
refers to the resource with the given name in the configured 'cluster
resource namespace', which is set as a flag on the controller component
(and defaults to the namespace that the controller runs in).
type: string
url:
description: 'URL is the base URL for the endpoint of the signing service, for example: "https://sample-signer.example.com/api".'
description: 'URL is the base URL for the endpoint of the signing
service, for example: "https://sample-signer.example.com/api".'
type: string
required:
- authSecretName
Expand All @@ -46,22 +54,28 @@ spec:
description: IssuerStatus defines the observed state of Issuer
properties:
conditions:
description: List of status conditions to indicate the status of a CertificateRequest. Known condition types are `Ready`.
description: List of status conditions to indicate the status of a
CertificateRequest. Known condition types are `Ready`.
items:
description: IssuerCondition contains condition information for an Issuer.
description: IssuerCondition contains condition information for
an Issuer.
properties:
lastTransitionTime:
description: LastTransitionTime is the timestamp corresponding to the last status change of this condition.
description: LastTransitionTime is the timestamp corresponding
to the last status change of this condition.
format: date-time
type: string
message:
description: Message is a human readable description of the details of the last transition, complementing reason.
description: Message is a human readable description of the
details of the last transition, complementing reason.
type: string
reason:
description: Reason is a brief machine readable explanation for the condition's last transition.
description: Reason is a brief machine readable explanation
for the condition's last transition.
type: string
status:
description: Status of the condition, one of ('True', 'False', 'Unknown').
description: Status of the condition, one of ('True', 'False',
'Unknown').
enum:
- "True"
- "False"
Expand All @@ -81,9 +95,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
1 change: 0 additions & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down

0 comments on commit 15d40eb

Please sign in to comment.