Skip to content

Commit

Permalink
- Helm3 suppport (#281)
Browse files Browse the repository at this point in the history
* - Helm3 suppport
  • Loading branch information
ahma authored and pepov committed Dec 6, 2019
1 parent 12ea5bd commit 94b8d28
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ deploy: manifests
# Generate manifests e.g. CRD, RBAC etc.
manifests: controller-gen
cd pkg/sdk && $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=../../config/crd/bases output:webhook:artifacts:config=../../config/webhook
cp config/crd/bases/* charts/logging-operator/templates/
cp config/crd/bases/* charts/logging-operator/crds/

# Run go fmt against code
fmt:
Expand Down
6 changes: 5 additions & 1 deletion charts/logging-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ To install the chart with the release name `my-release`:
$ helm install --name my-release banzaicloud-stable/logging-operator
```

### CRDs
Use `createCustomResource=false` with Helm v3 to avoid trying to create CRDs from the `crds` folder and from templates at the same time.

The command deploys **logging-operator** on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.

## Uninstalling the Chart
Expand Down Expand Up @@ -58,7 +61,8 @@ The following tables lists the configurable parameters of the logging-operator c
| `nodeSelector` | Define which Nodes the Pods are scheduled on. | `{}` |
| `annotations` | Define annotations for logging-operator pods | `{}` |
| `podSecurityContext` | Pod SecurityContext for Logging operator. [More info](https://kubernetes.io/docs/concepts/policy/security-context/) | `{"runAsNonRoot": true, "runAsUser": 1000, "fsGroup": 2000}` |
| `securityContext` | Container SecurityContext for Logging operator. [More info](https://kubernetes.io/docs/concepts/policy/security-context/) | `{"allowPrivilegeEscalation": false, "readOnlyRootFilesystem": true}` |
| `securityContext` | Container SecurityContext for Logging operator. [More info](https://kubernetes.io/docs/concepts/policy/security-context/) | `{"allowPrivilegeEscalation": false, "readOnlyRootFilesystem": true}` |
| `createCustomResource` | Create CRDs. | `true` |

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example:

Expand Down
6 changes: 6 additions & 0 deletions charts/logging-operator/templates/crds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{- if .Values.createCustomResource -}}
{{- range $path, $bytes := .Files.Glob "crds/*.yaml" }}
{{ $.Files.Get $path }}
---
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/logging-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

## Deploy CRDs used by Logging Operator.
##
createCustomResource: true

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down

0 comments on commit 94b8d28

Please sign in to comment.