Skip to content

Commit

Permalink
fix: controller-gen 0.9.2 panics with go1.22 (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkdchen authored Sep 30, 2024
1 parent 9f4b0f3 commit eae1a15
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 46 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
CONTROLLER_TOOLS_VERSION ?= v0.9.2
CONTROLLER_TOOLS_VERSION ?= v0.16.3

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand Down
1 change: 0 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 41 additions & 34 deletions config/crd/bases/appstudio.redhat.com_imagerepositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.3
name: imagerepositories.appstudio.redhat.com
spec:
group: appstudio.redhat.com
Expand All @@ -28,14 +27,19 @@ spec:
description: ImageRepository is the Schema for the imagerepositories 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
Expand All @@ -46,29 +50,33 @@ spec:
description: Credentials management.
properties:
regenerate-token:
description: RegenerateToken defines a request to refresh image
accessing credentials. Refreshes both, push and pull tokens.
description: |-
RegenerateToken defines a request to refresh image accessing credentials.
Refreshes both, push and pull tokens.
The field gets cleared after the refresh.
type: boolean
verify-linking:
description: VerifyLinking defines a request to verify and fix
secret linking in pipeline service account. The field gets cleared
after fixing.
description: |-
VerifyLinking defines a request to verify and fix
secret linking in pipeline service account.
The field gets cleared after fixing.
type: boolean
type: object
image:
description: Requested image repository configuration.
properties:
name:
description: Name of the image within configured Quay organization.
If ommited, then defaults to "cr-namespace/cr-name". This field
cannot be changed after the resource creation.
description: |-
Name of the image within configured Quay organization.
If ommited, then defaults to "cr-namespace/cr-name".
This field cannot be changed after the resource creation.
pattern: ^[a-z0-9][.a-z0-9_-]*(/[a-z0-9][.a-z0-9_-]*)*$
type: string
visibility:
description: Visibility defines whether the image is publicly
visible. Allowed values are public and private. "public" is
the default.
description: |-
Visibility defines whether the image is publicly visible.
Allowed values are public and private.
"public" is the default.
enum:
- public
- private
Expand Down Expand Up @@ -116,18 +124,15 @@ spec:
format: date-time
type: string
pull-robot-account:
description: PullRobotAccountName is present only if ImageRepository
has labels that connect it to Application and Component. Holds
name of the quay robot account with real (pull only) permissions
from the generated repository.
description: |-
PullRobotAccountName is present only if ImageRepository has labels that connect it to Application and Component.
Holds name of the quay robot account with real (pull only) permissions from the generated repository.
type: string
pull-secret:
description: PullSecretName is present only if ImageRepository
has labels that connect it to Application and Component. Holds
name of the dockerconfig secret with credentials to pull only
from the generated repository. The secret might not be present
in the same namespace as ImageRepository, but created in other
environments.
description: |-
PullSecretName is present only if ImageRepository has labels that connect it to Application and Component.
Holds name of the dockerconfig secret with credentials to pull only from the generated repository.
The secret might not be present in the same namespace as ImageRepository, but created in other environments.
type: string
push-robot-account:
description: PushRobotAccountName holds name of the quay robot
Expand Down Expand Up @@ -159,8 +164,9 @@ spec:
type: string
type: object
message:
description: Message shows error information for the request. It could
contain non critical error, like failed to change image visibility,
description: |-
Message shows error information for the request.
It could contain non critical error, like failed to change image visibility,
while the state is ready and image resitory could be used.
type: string
notifications:
Expand All @@ -176,9 +182,10 @@ spec:
type: object
type: array
state:
description: State shows if image repository could be used. "ready"
means repository was created and usable, "failed" means that the
image repository creation request failed.
description: |-
State shows if image repository could be used.
"ready" means repository was created and usable,
"failed" means that the image repository creation request failed.
type: string
type: object
type: object
Expand Down
19 changes: 9 additions & 10 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- update
- watch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -63,12 +71,3 @@ rules:
- get
- patch
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- update
- watch

0 comments on commit eae1a15

Please sign in to comment.