-
Notifications
You must be signed in to change notification settings - Fork 62
Proposal helmfile for deployment #7879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: 'Setup helmfile' | ||
| description: 'Sets up helmfile in /usr/local/bin/helmfile' | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: install helmfile | ||
| run: | | ||
| curl -L https://github.com/helmfile/helmfile/releases/download/v1.1.3/helmfile_1.1.3_linux_amd64.tar.gz -o helmfile.tar.gz | ||
| tar -xvf /tmp/helmfile.tar.gz | ||
| mv helmfile /usr/local/bin | ||
| chmod +x /usr/local/bin/helmfile | ||
| working-directory: /tmp | ||
| shell: bash |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| .env | ||
| /env.yaml | ||
| /charts | ||
| /values.out.yaml | ||
| /values.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| .env | ||
| /deploy.sh | ||
| /values.out.yaml | ||
| /values.yaml | ||
| /values.yaml.gotmpl | ||
| /env.yaml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,12 +5,7 @@ ecamp3 is running. | |
|
|
||
| ## Prerequisites | ||
|
|
||
| You need to add the fluent helm repository: | ||
|
|
||
| ```shell | ||
| helm repo add fluent https://fluent.github.io/helm-charts | ||
| helm repo update | ||
| ``` | ||
| You need the helmfile in addition to kubectl and helm. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instructions or a link on how to install the helmfile command might be useful. But maybe the wiki is a better place for that.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can link the action in the wiki as soon as this is merged: |
||
|
|
||
| ## Provisioning of Kibana Configuration | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,39 +5,29 @@ set -ea | |
| SCRIPT_DIR=$(realpath "$(dirname "$0")") | ||
| cd $SCRIPT_DIR | ||
|
|
||
| ELASTIC_NODE_REQUESTS_MEMORY=1000Mi | ||
| ELASTIC_NODE_LIMITS_MEMORY=1000Mi | ||
| ELASTIC_NODE_MAX_INDEX_AGE=15 | ||
| RANDOM_STRING=$(uuidgen) | ||
|
|
||
| if [ -f $SCRIPT_DIR/.env ]; then | ||
| . $SCRIPT_DIR/.env | ||
| fi | ||
|
|
||
| if [ -z "${ELASTIC_NODE_STORAGE_SIZE}" ]; then | ||
| echo "Please define ELASTIC_NODE_STORAGE_SIZE. There is no good default value." | ||
| echo "It can also not be automatically enlarged, see: https://github.com/kubernetes/enhancements/pull/4651 and https://github.com/kubernetes/kubernetes/issues/68737" | ||
| exit 1 | ||
| fi | ||
|
|
||
| envsubst < $SCRIPT_DIR/values.yaml > $SCRIPT_DIR/values.out.yaml | ||
| echo "ELASTIC_NODE_STORAGE_SIZE can not be automatically enlarged, see: https://github.com/kubernetes/enhancements/pull/4651 and https://github.com/kubernetes/kubernetes/issues/68737" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So now we always output this warning, but what can be done about it?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is just a warning that you hopefully find if you accidentally changed the size and now the statefulset does not come up again. |
||
|
|
||
| helm dep build | ||
| helmfile deps | ||
carlobeltrame marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| helmfile write-values --environment default --output-file-template values.yaml | ||
|
|
||
| if [ $1 = "deploy" ]; then | ||
| # to debug: --dry-run --debug | ||
| helm upgrade --install ecamp3-logging \ | ||
| --namespace ecamp3-logging \ | ||
| --create-namespace \ | ||
| $SCRIPT_DIR \ | ||
| --values $SCRIPT_DIR/values.out.yaml | ||
| --values $SCRIPT_DIR/values.yaml | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [ $1 = "diff" ]; then | ||
| helm template \ | ||
| --namespace ecamp3-logging --no-hooks --skip-tests ecamp3-logging \ | ||
| --namespace ecamp3-logging --no-hooks --skip-tests ecamp3-logging \ | ||
| $SCRIPT_DIR \ | ||
| --values $SCRIPT_DIR/values.out.yaml | kubectl diff --namespace ecamp3-logging -f - | ||
| --values $SCRIPT_DIR/values.yaml | kubectl diff --namespace ecamp3-logging -f - | ||
| exit 0 | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| environments: | ||
| default: | ||
| values: | ||
| - ./env.yaml | ||
| --- | ||
| repositories: | ||
| - name: fluent | ||
| url: https://fluent.github.io/helm-charts | ||
|
|
||
| releases: | ||
| - name: "" | ||
| chart: . | ||
| values: | ||
| - ./values.yaml.gotmpl |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| fluent-operator: | ||
| containerRuntime: containerd | ||
| operator: | ||
| annotations: | ||
| trigger-recreate: ${RANDOM_STRING} | ||
| container: | ||
| annotations: | ||
| trigger-recreate: {{ exec "uuidgen" (list) }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand any of the changes in this file. Care to explain?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The operator is implemented well enough to survive in dev and to recreate the fluentd and fluentbits when we deploy. |
||
| container: | ||
| tag: 3.3.0 | ||
| fluentbit: | ||
| enable: true | ||
|
|
@@ -26,7 +26,7 @@ fluent-operator: | |
| - ingress-nginx | ||
| envVars: | ||
| - name: TRIGGER_FLUENTD_RECREATE | ||
| value: ${RANDOM_STRING} | ||
| value: {{ exec "uuidgen" (list) }} | ||
| enable: true | ||
|
|
||
| fluentd: | ||
|
|
@@ -46,16 +46,16 @@ elasticsearch: | |
| elasticNode: | ||
| resources: | ||
| requests: | ||
| memory: ${ELASTIC_NODE_REQUESTS_MEMORY} | ||
| memory: {{ .Environment.Values | get "ELASTIC_NODE_REQUESTS_MEMORY" "1000Mi" }} | ||
| limits: | ||
| memory: ${ELASTIC_NODE_LIMITS_MEMORY} | ||
| memory: {{ .Environment.Values | get "ELASTIC_NODE_LIMITS_MEMORY" "1000Mi"}} | ||
| persistence: | ||
| storageClassName: do-block-storage | ||
| resources: | ||
| requests: | ||
| storage: ${ELASTIC_NODE_STORAGE_SIZE} | ||
| storage: {{ .Environment.Values | get "ELASTIC_NODE_STORAGE_SIZE" nil | required "Please define ELASTIC_NODE_STORAGE_SIZE. There is no good default value." }} | ||
| removeOldIndexes: | ||
| maxIndexAge: ${ELASTIC_NODE_MAX_INDEX_AGE} | ||
| maxIndexAge: {{ .Environment.Values | get "ELASTIC_NODE_MAX_INDEX_AGE" "15" }} | ||
| image: node:24.8.0 | ||
|
|
||
| kibana: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.