Skip to content

Commit 3485024

Browse files
committed
Adds installCrd flag to helm chart values.
This solves the user experience problem of reading the documentation about the CRD, running helm install, and not being able to see the CRD in the api-resources. Previously the CRD was only installed if the datasource was crd, or the crdMigrationMode was turned on, which was a confusing experience for me as a newcomer. Authored-by: Adam Berlin <[email protected]>
1 parent bfe8a2c commit 3485024

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

charts/log-router/crds/crd.yaml renamed to charts/log-router/templates/crd.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
{{ if .Values.installCrd }}
2+
{{- /* if we need the CRD, install it */ -}}
3+
4+
{{/*
5+
this CRD needs to live in the template directory because CRDs within the
6+
chart crds/ directory are not processed as templates
7+
*/}}
8+
9+
#
110
# log-router CRD resource:
211
apiVersion: apiextensions.k8s.io/v1
312
kind: CustomResourceDefinition
@@ -26,3 +35,4 @@ spec:
2635
type: object
2736
served: true
2837
storage: true
38+
{{ end }}

charts/log-router/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ datasource: default
2121
# together with the specified legacy datasource to facilitate the migration process to CRDs.
2222
crdMigrationMode: false
2323

24+
# default to installing the CRD along with the helm chart
25+
installCrd: true
26+
2427
defaultConfigmap: "fluentd-config"
2528

2629
image:

0 commit comments

Comments
 (0)