Skip to content

Commit

Permalink
Adds installCrd flag to helm chart values.
Browse files Browse the repository at this point in the history
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 <aberlin@vmware.com>
  • Loading branch information
berlin-ab committed Oct 21, 2022
1 parent bfe8a2c commit 3485024
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{{ if .Values.installCrd }}
{{- /* if we need the CRD, install it */ -}}

{{/*
this CRD needs to live in the template directory because CRDs within the
chart crds/ directory are not processed as templates
*/}}

#
# log-router CRD resource:
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -26,3 +35,4 @@ spec:
type: object
served: true
storage: true
{{ end }}
3 changes: 3 additions & 0 deletions charts/log-router/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ datasource: default
# together with the specified legacy datasource to facilitate the migration process to CRDs.
crdMigrationMode: false

# default to installing the CRD along with the helm chart
installCrd: true

defaultConfigmap: "fluentd-config"

image:
Expand Down

0 comments on commit 3485024

Please sign in to comment.