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

Fix the make generate crds in Makefile #4

Merged
merged 2 commits into from
Oct 20, 2023
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
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform

##@ Deployment

## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)

.PHONY: install
install: kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/crd | kubectl apply -f -
Expand Down Expand Up @@ -272,10 +277,11 @@ bump-chart-operator:
.PHONY: bump-chart
bump-chart: bump-chart-operator ## Bump version accross the project

crds=`ls charts/tenant-operator/crds/`
.PHONY: generate-crds
generate-crds: generate manifests kustomize-and-generate-crds list ## Update auto-generated files and charts/tenant-operator/crds

kustomize-and-generate-crds: kustomize
mkdir -p charts/tenant-operator/crds
./bin/kustomize build config/crd -o charts/tenant-operator/crds/
mkdir -p charts/grafana-oncall/crds
$(KUSTOMIZE) build config/crd -o charts/grafana-oncall/crds/

crds=`ls charts/grafana-oncall/crds/`
.PHONY: generate-crds
generate-crds: kustomize-and-generate-crds
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ spec:
kind: GrafanaCloudOperator
listKind: GrafanaCloudOperatorList
plural: grafanacloudoperators
singular: grafanacloudoperator
shortNames:
- gco
- gco
singular: grafanacloudoperator
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: GrafanaCloudOperator is the Schema for the grafanacloudoperators API
description: GrafanaCloudOperator is the Schema for the grafanacloudoperators
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand All @@ -32,64 +33,67 @@ spec:
type: object
spec:
description: Spec defines the desired state of GrafanaCloudOperator
type: object
properties:
enabled:
description: Flag to enable or disable grafana integration creation
type: boolean
provisionMode:
description: Determines the provision type of the cluster on which the operator is running
type: string
enum:
- hubAndSpoke
- standalone
clusterDeploymentLabelSelector:
description: Optional label selector to select specific ClusterDeployments for Grafana On Call integration.
type: object
description: Optional label selector to select specific ClusterDeployments
for Grafana On Call integration.
properties:
matchLabels:
type: object
additionalProperties:
type: string
matchExpressions:
type: array
items:
type: object
properties:
key:
type: string
operator:
type: string
values:
type: array
items:
type: string
grafanaAPIToken:
description: Secret reference to the Grafana API token. Avoid putting the token directly.
type: array
type: object
type: array
matchLabels:
additionalProperties:
type: string
type: object
type: object
enabled:
description: Flag to enable or disable grafana integration creation
type: boolean
grafanaAPIToken:
description: Secret reference to the Grafana API token. Avoid putting
the token directly.
properties:
secretName:
type: string
key:
type: string
secretName:
type: string
type: object
provisionMode:
description: Determines the provision type of the cluster on which
the operator is running
enum:
- hubAndSpoke
- standalone
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: Status defines the observed state of GrafanaCloudOperator
type: object
properties:
lastUpdated:
description: Timestamp for when the status was last updated
format: date-time
type: string
description: Timestamp for when the status was last updated
phase:
message:
description: Detailed message about the current state
type: string
phase:
description: High-level phase of the operator processing
reason:
type: string
reason:
description: More detailed reason for the current phase
message:
type: string
description: Detailed message about the current state
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
served: true
Expand Down