diff --git a/charts/log-router/crds/crd.yaml b/charts/log-router/templates/crd.yaml similarity index 73% rename from charts/log-router/crds/crd.yaml rename to charts/log-router/templates/crd.yaml index 17dfd060..e26cde73 100644 --- a/charts/log-router/crds/crd.yaml +++ b/charts/log-router/templates/crd.yaml @@ -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 @@ -26,3 +35,4 @@ spec: type: object served: true storage: true +{{ end }} \ No newline at end of file diff --git a/charts/log-router/values.yaml b/charts/log-router/values.yaml index 882cc4ac..6ac76940 100755 --- a/charts/log-router/values.yaml +++ b/charts/log-router/values.yaml @@ -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: