Skip to content

Commit

Permalink
Add app=stash label to crd yamls
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Oct 6, 2019
1 parent b50b47c commit 8bb3ef3
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 20 deletions.
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ openapi-%:
--report-filename api/api-rules/violation_exceptions.list

# Generate CRD manifests
.PHONY: manifests
manifests:
.PHONY: gen-crds
gen-crds:
@echo "Generating CRD manifests"
@docker run --rm -ti \
-u $$(id -u):$$(id -g) \
Expand All @@ -219,6 +219,17 @@ manifests:
paths="./apis/..." \
output:crd:artifacts:config=api/crds

.PHONY: label-crds
label-crds: $(BUILD_DIRS)
@for f in api/crds/*.yaml; do \
echo "applying app=stash label to $$f"; \
kubectl label --overwrite -f $$f --local=true -o yaml app=stash > bin/crd.yaml; \
mv bin/crd.yaml $$f; \
done

.PHONY: manifests
manifests: gen-crds label-crds

.PHONY: gen
gen: clientset openapi manifests

Expand Down
4 changes: 2 additions & 2 deletions api/crds/stash.appscode.com_backupblueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: stash
name: backupblueprints.stash.appscode.com
spec:
additionalPrinterColumns:
Expand Down
4 changes: 2 additions & 2 deletions api/crds/stash.appscode.com_backupconfigurations.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: stash
name: backupconfigurations.stash.appscode.com
spec:
additionalPrinterColumns:
Expand Down
4 changes: 2 additions & 2 deletions api/crds/stash.appscode.com_backupsessions.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: stash
name: backupsessions.stash.appscode.com
spec:
additionalPrinterColumns:
Expand Down
4 changes: 2 additions & 2 deletions api/crds/stash.appscode.com_functions.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: stash
name: functions.stash.appscode.com
spec:
additionalPrinterColumns:
Expand Down
4 changes: 2 additions & 2 deletions api/crds/stash.appscode.com_recoveries.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: stash
name: recoveries.stash.appscode.com
spec:
additionalPrinterColumns:
Expand Down
4 changes: 2 additions & 2 deletions api/crds/stash.appscode.com_repositories.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: stash
name: repositories.stash.appscode.com
spec:
additionalPrinterColumns:
Expand Down
4 changes: 2 additions & 2 deletions api/crds/stash.appscode.com_restics.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: stash
name: restics.stash.appscode.com
spec:
additionalPrinterColumns:
Expand Down
4 changes: 2 additions & 2 deletions api/crds/stash.appscode.com_restoresessions.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: stash
name: restoresessions.stash.appscode.com
spec:
additionalPrinterColumns:
Expand Down
4 changes: 2 additions & 2 deletions api/crds/stash.appscode.com_tasks.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
app: stash
name: tasks.stash.appscode.com
spec:
additionalPrinterColumns:
Expand Down

0 comments on commit 8bb3ef3

Please sign in to comment.