Skip to content

Commit

Permalink
Merge pull request #1832 from cmontemuino/crds-in-subchart
Browse files Browse the repository at this point in the history
feat: install CRDs from a subchart
  • Loading branch information
pepov authored Oct 24, 2024
2 parents 3880c95 + f49ea99 commit 5d8c774
Show file tree
Hide file tree
Showing 24 changed files with 86,911 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ manifests: ${CONTROLLER_GEN} ## Generate manifests e.g. CRD, RBAC etc.
cd pkg/sdk && $(CONTROLLER_GEN) $(CRD_OPTIONS) webhook paths="./..." output:crd:artifacts:config=../../config/crd/bases output:webhook:artifacts:config=../../config/webhook
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role paths="./controllers/..." output:rbac:artifacts:config=./config/rbac
cp config/crd/bases/* charts/logging-operator/crds/
for f in config/crd/bases/*.yaml; do sed '/controller-gen.kubebuilder.io\/version/ r hack/crds.annotations.snippet.txt' $${f} > charts/logging-operator/charts/crds/templates/$${f##*/}; done
echo "{{- if .Values.rbac.enabled }}" > ./charts/logging-operator/templates/clusterrole.yaml
cat config/rbac/role.yaml | sed -e 's@manager-role@{{ template "logging-operator.fullname" . }}@' | sed -e '/creationTimestamp/d' | cat >> ./charts/logging-operator/templates/clusterrole.yaml
echo "{{- end }}" >> ./charts/logging-operator/templates/clusterrole.yaml
Expand Down
4 changes: 4 additions & 0 deletions charts/logging-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ home: https://kube-logging.github.io
sources:
- https://github.com/kube-logging/logging-operator
- https://github.com/kube-logging/helm-charts/tree/main/charts/logging-operator
dependencies:
- name: crds
version: 0.0.0
condition: crds.install
2 changes: 2 additions & 0 deletions charts/logging-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Use `createCustomResource=false` with Helm v3 to avoid trying to create CRDs fro
| namespaceOverride | string | `""` | A namespace override for the app. |
| annotations | object | `{}` | Define annotations for logging-operator pods. |
| createCustomResource | bool | `false` | Deploy CRDs used by Logging Operator. |
| crds.install | bool | `false` | Toggle to install and upgrade CRDs from a subchart. Make sure to use it with `--skip-crds` to avoid conflicts. [More info about limitations on CRDs in Helm 3](https://helm.sh/docs/topics/charts/#limitations-on-crds) |
| crds.annotations | object | `{}` | Annotations to be added to all CRDs |
| http.port | int | `8080` | HTTP listen port number. |
| http.service | object | `{"annotations":{},"clusterIP":"None","labels":{},"type":"ClusterIP"}` | Service definition for query http service. |
| rbac.enabled | bool | `true` | Create rbac service account and roles. |
Expand Down
3 changes: 3 additions & 0 deletions charts/logging-operator/charts/crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: v2
name: crds
version: 0.0.0
12 changes: 12 additions & 0 deletions charts/logging-operator/charts/crds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# crds

![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square)

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| annotations | object | `{}` | Define annotations for CRDs |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Loading

0 comments on commit 5d8c774

Please sign in to comment.