Skip to content

Commit 95221a3

Browse files
authored
Move helm/temporal-worker-controller/templates/crds to helm/temporal-worker-controller/crds (#153)
<!--- Note to EXTERNAL Contributors --> <!-- Thanks for opening a PR! If it is a significant code change, please **make sure there is an open issue** for this. We work best with you when we have accepted the idea first before you code. --> <!--- For ALL Contributors 👇 --> ## What was changed Move helm/temporal-worker-controller/templates/crds to helm/temporal-worker-controller/crds ## Why? The specially-handled helm `crds/` directory is supposed to be next to `templates/`, not inside of it. https://helm.sh/docs/topics/charts/ https://helm.sh/docs/chart_best_practices/custom_resource_definitions/ Upgrading CRDs is dangerous, so placing the CRDs outside of `templates/` allows helm to handle them safely, as described in their page on Custom Resource Definitions. ## Checklist <!--- add/delete as needed ---> 1. Closes <!-- add issue number here --> 2. How was this tested: <!--- Please describe how you tested your changes/how we can test them --> 3. Any docs updates needed? <!--- update README if applicable or point out where to update docs.temporal.io -->
1 parent c1bd540 commit 95221a3

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ help: ## Display this help.
152152
.PHONY: manifests
153153
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
154154
GOWORK=off GO111MODULE=on $(CONTROLLER_GEN) rbac:roleName=manager-role crd:allowDangerousTypes=true,maxDescLen=0,generateEmbeddedObjectMeta=true webhook paths=./api/... paths=./internal/... paths=./cmd/... \
155-
output:crd:artifacts:config=helm/temporal-worker-controller/templates/crds
155+
output:crd:artifacts:config=helm/temporal-worker-controller/crds
156156

157157
.PHONY: generate
158158
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -253,11 +253,11 @@ endif
253253

254254
.PHONY: install
255255
install: manifests ## Install CRDs into the K8s cluster specified in ~/.kube/config.
256-
$(KUBECTL) apply --context $(K8S_CONTEXT) -f helm/temporal-worker-controller/templates/crds
256+
$(KUBECTL) apply --context $(K8S_CONTEXT) -f helm/temporal-worker-controller/crds
257257

258258
.PHONY: uninstall
259259
uninstall: manifests ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
260-
$(KUBECTL) delete --context $(K8S_CONTEXT) --ignore-not-found=$(ignore-not-found) -f helm/temporal-worker-controller/templates/crds
260+
$(KUBECTL) delete --context $(K8S_CONTEXT) --ignore-not-found=$(ignore-not-found) -f helm/temporal-worker-controller/crds
261261

262262
.PHONY: deploy
263263
deploy: manifests helm ## Deploy controller to the K8s cluster specified in ~/.kube/config.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ When you update the image, the controller automatically:
7474
7575
### Prerequisites
7676
77-
- Kubernetes cluster (1.19+)
77+
- Kubernetes cluster (1.19+)
78+
- Helm [v3.0+](https://github.com/helm/helm/releases) if deploying via our Helm chart
7879
- [Temporal Server](https://docs.temporal.io/) (Cloud or self-hosted [v1.28.1](https://github.com/temporalio/temporal/releases/tag/v1.28.1))
7980
- Basic familiarity with Temporal [Workers](https://docs.temporal.io/workers), [Workflows](https://docs.temporal.io/workflows), and [Worker Versioning](https://docs.temporal.io/production-deployment/worker-deployments/worker-versioning)
8081

internal/tests/internal/env_helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func setupTestEnvironment(t *testing.T) (*rest.Config, client.Client, manager.Ma
113113
t.Log("bootstrapping test environment")
114114
testEnv := &envtest.Environment{
115115
CRDDirectoryPaths: []string{
116-
filepath.Join(getRepoRoot(t), "helm", "temporal-worker-controller", "templates", "crds"),
116+
filepath.Join(getRepoRoot(t), "helm", "temporal-worker-controller", "crds"),
117117
},
118118
ErrorIfCRDPathMissing: true,
119119
}

0 commit comments

Comments
 (0)