Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#885] Add ready printer column to ActiveMQArtemis CRD #886

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ ifeq ($(ENABLE_WEBHOOKS),true)
## v2alpha3, v2alpha4 and v2alpha3 requires allowDangerousTypes=true because they use float32 type
cd config/manager && $(KUSTOMIZE) edit add resource webhook_secret.yaml
$(CONTROLLER_GEN) rbac:roleName=$(OPERATOR_CLUSTER_ROLE_NAME) crd:allowDangerousTypes=true webhook paths="./..." output:crd:artifacts:config=config/crd/bases
find config -type f -exec sed -i.bak -e '/creationTimestamp/d' {} \; -exec rm {}.bak \;
find config -type f -exec sed -i.bak -e '/creationTimestamp:/d' {} \; -exec rm {}.bak \;
else
## Generate ClusterRole and CustomResourceDefinition objects.
## v2alpha3, v2alpha4 and v2alpha3 requires allowDangerousTypes=true because they use float32 type
cd config/manager && $(KUSTOMIZE) edit remove resource webhook_secret.yaml
$(CONTROLLER_GEN) rbac:roleName=$(OPERATOR_CLUSTER_ROLE_NAME) crd:allowDangerousTypes=true paths="./..." output:crd:artifacts:config=config/crd/bases
find config -type f -exec sed -i.bak -e '/creationTimestamp/d' {} \; -exec rm {}.bak \;
find config -type f -exec sed -i.bak -e '/creationTimestamp:/d' {} \; -exec rm {}.bak \;
endif

.PHONY: generate
Expand Down Expand Up @@ -281,7 +281,7 @@ bundle: manifests operator-sdk kustomize ## Generate bundle manifests and metada
$(OPERATOR_SDK) generate kustomize manifests -q --package $(BUNDLE_PACKAGE)
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle --package $(BUNDLE_PACKAGE) $(BUNDLE_GEN_FLAGS)
sed -i.bak '/creationTimestamp/d' ./bundle/manifests/*.yaml && rm ./bundle/manifests/*.bak
sed -i.bak '/creationTimestamp:/d' ./bundle/manifests/*.yaml && rm ./bundle/manifests/*.bak
sed -i.bak '/createdAt/d' ./bundle/manifests/*.yaml && rm ./bundle/manifests/*.bak
sed 's/annotations://' config/metadata/$(BUNDLE_PACKAGE).annotations.yaml >> bundle/metadata/annotations.yaml
sed -e 's/annotations://' -e 's/ /LABEL /g' -e 's/: /=/g' config/metadata/$(BUNDLE_PACKAGE).annotations.yaml >> bundle.Dockerfile
Expand Down
2 changes: 2 additions & 0 deletions api/v1beta1/activemqartemis_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,8 @@ type ExternalConfigStatus struct {
//+kubebuilder:storageversion
//+kubebuilder:resource:path=activemqartemises
//+kubebuilder:resource:path=activemqartemises,shortName=aa
//+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status",description="The state of the resource"
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The age of the resource"
//+operator-sdk:csv:customresourcedefinitions:resources={{"Service", "v1"}}
//+operator-sdk:csv:customresourcedefinitions:resources={{"Secret", "v1"}}
//+operator-sdk:csv:customresourcedefinitions:resources={{"ConfigMap", "v1"}}
Expand Down
11 changes: 10 additions & 1 deletion bundle/manifests/broker.amq.io_activemqartemises.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ spec:
singular: activemqartemis
scope: Namespaced
versions:
- name: v1beta1
- additionalPrinterColumns:
- description: The state of the resource
jsonPath: .status.conditions[?(@.type=='Ready')].status
name: Ready
type: string
- description: The age of the resource
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: A stateful deployment of one or more brokers
Expand Down
11 changes: 10 additions & 1 deletion config/crd/bases/broker.amq.io_activemqartemises.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@ spec:
singular: activemqartemis
scope: Namespaced
versions:
- name: v1beta1
- additionalPrinterColumns:
- description: The state of the resource
jsonPath: .status.conditions[?(@.type=='Ready')].status
name: Ready
type: string
- description: The age of the resource
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: A stateful deployment of one or more brokers
Expand Down
11 changes: 10 additions & 1 deletion deploy/activemq-artemis-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,16 @@ spec:
singular: activemqartemis
scope: Namespaced
versions:
- name: v1beta1
- additionalPrinterColumns:
- description: The state of the resource
jsonPath: .status.conditions[?(@.type=='Ready')].status
name: Ready
type: string
- description: The age of the resource
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: A stateful deployment of one or more brokers
Expand Down
11 changes: 10 additions & 1 deletion deploy/crds/broker_activemqartemis_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ spec:
singular: activemqartemis
scope: Namespaced
versions:
- name: v1beta1
- additionalPrinterColumns:
- description: The state of the resource
jsonPath: .status.conditions[?(@.type=='Ready')].status
name: Ready
type: string
- description: The age of the resource
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: A stateful deployment of one or more brokers
Expand Down
Loading