Skip to content

Commit

Permalink
Helm docs
Browse files Browse the repository at this point in the history
Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
  • Loading branch information
jkremser committed Nov 19, 2024
1 parent a06c139 commit 2a96256
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 9 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/helm-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Helm docs
on:
push:
branches:
- 'main'
paths:
- 'helmchart/otel-add-on/**'
permissions:
contents: read

jobs:
build-helm-doc:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
name: Update Helm Doc
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Generate docs for helm chart - helmchart/otel-add-on/README.md
uses: docker://jnorwood/helm-docs@sha256:7e562b49ab6b1dbc50c3da8f2dd6ffa8a5c6bba327b1c6335cc15ce29267979c
with:
args: --template-files=_helm-docs-template.gotmpl --sort-values-order=file --ignore-non-descriptions
- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
id: cpr
with:
title: "Update Helm Docs"
branch: ci-helm-doc
delete-branch: true
base: main
signoff: true
token: ${{ secrets.GITHUB_TOKEN }}
body: |
:package: helmchart/otel-add-on/README.md update :package:
### automated change
Running helm-docs tool on latest values.yaml.
This automated PR was created by [this action](https://github.com/kedify/otel-add-on/actions/runs/${{ github.run_id }}).
- name: Check PR
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | tee -a "$GITHUB_STEP_SUMMARY"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | tee -a "$GITHUB_STEP_SUMMARY"
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
echo "oldVersion=${maybe_old_version}" >> ${GITHUB_OUTPUT}
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@b4d51739f96fca8047ad065eccef63442d8e99f7 # tag=v4
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
id: cpr
with:
title: "Update chart.yaml"
Expand Down
81 changes: 81 additions & 0 deletions helmchart/otel-add-on/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# otel-add-on

![Version: v0.0.1-2](https://img.shields.io/badge/Version-v0.0.1--2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.0.1-2](https://img.shields.io/badge/AppVersion-v0.0.1--2-informational?style=flat-square)

A Helm chart for KEDA otel-add-on

```
:::^. .::::^: ::::::::::::::: .:::::::::. .^.
7???~ .^7????~. 7??????????????. :?????????77!^. .7?7.
7???~ ^7???7~. ~!!!!!!!!!!!!!!. :????!!!!7????7~. .7???7.
7???~^7????~. :????: :~7???7. :7?????7.
7???7????!. ::::::::::::. :????: .7???! :7??77???7.
7????????7: 7???????????~ :????: :????: :???7?5????7.
7????!~????^ !77777777777^ :????: :????: ^???7?#P7????7.
7???~ ^????~ :????: :7???! ^???7J#@J7?????7.
7???~ :7???!. :????: .:~7???!. ~???7Y&@#7777????7.
7???~ .7???7: !!!!!!!!!!!!!!! :????7!!77????7^ ~??775@@@GJJYJ?????7.
7???~ .!????^ 7?????????????7. :?????????7!~: !????G@@@@@@@@5??????7:
::::. ::::: ::::::::::::::: .::::::::.. .::::JGGGB@@@&7:::::::::
_ _ _ _ ?@@#~
___ | |_ ___| | __ _ __| | __| | ___ _ __ P@B^
/ _ \| __/ _ \ | / _` |/ _` |/ _` |___ / _ \| '_ \ :&G:
| (_) | || __/ | | (_| | (_| | (_| |___| (_) | | | | !5.
\___/ \__\___|_| \__,_|\__,_|\__,_| \___/|_| |_| ,
.
```

**Homepage:** <https://github.com/kedify/otel-add-on>

## Source Code

* <https://github.com/kedify/otel-add-on>
* <https://github.com/open-telemetry/opentelemetry-helm-charts>

## Requirements

Kubernetes: `>= 1.19.0-0`

| Repository | Name | Version |
|------------|------|---------|
| https://open-telemetry.github.io/opentelemetry-helm-charts | opentelemetry-collector | 0.108.0 |

## OTEL Collector Sub-Chart

This helm chart, if not disabled by `--set opentelemetry-collector.enabled=false`, installs the OTEL collector using
its upstream [helm chart](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-collector).

To check all the possible values for this dependent helm chart, consult [values.yaml](https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/values.yaml)
or [docs](https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/README.md).

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| image.repository | string | `"ghcr.io/kedify/otel-add-on"` | Image to use for the Deployment |
| image.pullPolicy | string | `"Always"` | Image pull policy, consult https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy |
| image.tag | string | `""` | Image version to use for the Deployment, if not specified, it defaults to `.Chart.AppVersion` |
| settings.metricStoreRetentionSeconds | int | `120` | how long the metrics should be kept in the short term (in memory) storage |
| settings.isActivePollingIntervalMilliseconds | int | `500` | how often (in milliseconds) should the IsActive method be tried |
| settings.internalMetricsPort | int | `8080` | internal (mostly golang) metrics will be exposed on `:8080/metrics` |
| settings.restApiPort | int | `9090` | port where rest api should be listening |
| settings.logs.logLvl | string | `"info"` | Can be one of 'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity |
| settings.logs.stackTracesLvl | string | `"error"` | one of: info, error, panic |
| settings.logs.noColor | bool | `false` | if anything else than 'false', the log will not contain colors |
| settings.logs.noBanner | bool | `false` | if anything else than 'false', the log will not print the ascii logo |
| asciiArt | bool | `true` | should the ascii logo be printed when this helm chart is installed |
| imagePullSecrets | list | `[]` | details: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod |
| serviceAccount.create | bool | `true` | should the service account be also created and linked in the deployment |
| serviceAccount.annotations | object | `{}` | further custom annotation that will be added on the service account |
| serviceAccount.name | string | `""` | name of the service account, defaults to `otel-add-on.fullname` ~ release name if not overriden |
| podAnnotations | object | `{}` | additional custom pod annotations that will be used for pod |
| podLabels | object | `{}` | additional custom pod labels that will be used for pod |
| podSecurityContext | object | `{}` | details: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod |
| securityContext | object | `{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":1000}` | details: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container |
| service.type | string | `"ClusterIP"` | Under this service, the otel add on needs to be reachable by KEDA operator and OTEL collector, details: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types |
| service.otlpReceiverPort | int | `4317` | OTLP receiver will be opened on this port. OTEL exporter configured in the OTEL collector needs to have this value set. |
| service.kedaExternalScalerPort | int | `4318` | KEDA external scaler will be opened on this port. ScaledObject's `.spec.triggers[].metadata.scalerAddress` needs to be set to this svc and this port. |
| resources | object | `{"limits":{"cpu":"500m","memory":"256Mi"},"requests":{"cpu":"500m","memory":"128Mi"}}` | https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
| nodeSelector | object | `{}` | details: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector |
| tolerations | list | `[]` | details: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
| affinity | object | `{}` | details: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity |
46 changes: 46 additions & 0 deletions helmchart/otel-add-on/_helm-docs-template.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{{ template "chart.header" . }}

{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

```
:::^. .::::^: ::::::::::::::: .:::::::::. .^.
7???~ .^7????~. 7??????????????. :?????????77!^. .7?7.
7???~ ^7???7~. ~!!!!!!!!!!!!!!. :????!!!!7????7~. .7???7.
7???~^7????~. :????: :~7???7. :7?????7.
7???7????!. ::::::::::::. :????: .7???! :7??77???7.
7????????7: 7???????????~ :????: :????: :???7?5????7.
7????!~????^ !77777777777^ :????: :????: ^???7?#P7????7.
7???~ ^????~ :????: :7???! ^???7J#@J7?????7.
7???~ :7???!. :????: .:~7???!. ~???7Y&@#7777????7.
7???~ .7???7: !!!!!!!!!!!!!!! :????7!!77????7^ ~??775@@@GJJYJ?????7.
7???~ .!????^ 7?????????????7. :?????????7!~: !????G@@@@@@@@5??????7:
::::. ::::: ::::::::::::::: .::::::::.. .::::JGGGB@@@&7:::::::::
_ _ _ _ ?@@#~
___ | |_ ___| | __ _ __| | __| | ___ _ __ P@B^
/ _ \| __/ _ \ | / _` |/ _` |/ _` |___ / _ \| '_ \ :&G:
| (_) | || __/ | | (_| | (_| | (_| |___| (_) | | | | !5.
\___/ \__\___|_| \__,_|\__,_|\__,_| \___/|_| |_| ,
.
```

{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

## OTEL Collector Sub-Chart

This helm chart, if not disabled by `--set opentelemetry-collector.enabled=false`, installs the OTEL collector using
its upstream [helm chart](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-collector).

To check all the possible values for this dependent helm chart, consult [values.yaml](https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/values.yaml)
or [docs](https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/README.md).

{{ template "chart.valuesSection" . }}
40 changes: 32 additions & 8 deletions helmchart/otel-add-on/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,67 @@
replicaCount: 1

image:
# -- Image to use for the Deployment
repository: ghcr.io/kedify/otel-add-on
# -- Image pull policy, consult https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
pullPolicy: Always
# -- Image version to use for the Deployment, if not specified, it defaults to `.Chart.AppVersion`
tag: ""

settings:
# how long the metrics should be kept in the short term (in memory) storage
# -- how long the metrics should be kept in the short term (in memory) storage
metricStoreRetentionSeconds: 120

# how often (in milliseconds) should the IsActive method be tried
# -- how often (in milliseconds) should the IsActive method be tried
isActivePollingIntervalMilliseconds: 500

# internal (mostly golang) metrics will be exposed on :8080/metrics
# -- internal (mostly golang) metrics will be exposed on `:8080/metrics`
internalMetricsPort: 8080

# port where rest api should be listening
# -- port where rest api should be listening
restApiPort: 9090

logs:
# Can be one of 'debug', 'info', 'error', or any integer value > 0
# -- Can be one of 'debug', 'info', 'error', or any integer value > 0
# which corresponds to custom debug levels of increasing verbosity
logLvl: info

# one of: info, error, panic
# -- one of: info, error, panic
stackTracesLvl: error

# if anything else than 'false', the log will not contain colors
# -- if anything else than 'false', the log will not contain colors
noColor: false

# if anything else than 'false', the log will not print the ascii logo
# -- if anything else than 'false', the log will not print the ascii logo
noBanner: false

# -- should the ascii logo be printed when this helm chart is installed
asciiArt: true

# -- details: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
# -- should the service account be also created and linked in the deployment
create: true
automount: true
# -- further custom annotation that will be added on the service account
annotations: {}
# -- name of the service account, defaults to `otel-add-on.fullname` ~ release name if not overriden
name: ""

# -- additional custom pod annotations that will be used for pod
podAnnotations: {}

# -- additional custom pod labels that will be used for pod
podLabels: {}

# -- details: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
podSecurityContext: {}

# -- details: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
securityContext:
capabilities:
drop:
Expand All @@ -59,10 +73,15 @@ securityContext:
runAsUser: 1000

service:
# -- Under this service, the otel add on needs to be reachable by KEDA operator and OTEL collector,
# details: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
type: ClusterIP
# -- OTLP receiver will be opened on this port. OTEL exporter configured in the OTEL collector needs to have this value set.
otlpReceiverPort: 4317
# -- KEDA external scaler will be opened on this port. ScaledObject's `.spec.triggers[].metadata.scalerAddress` needs to be set to this svc and this port.
kedaExternalScalerPort: 4318

# -- https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources:
limits:
cpu: 500m
Expand All @@ -82,8 +101,13 @@ volumeMounts: []
# mountPath: "/etc/foo"
# readOnly: true

# -- details: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
nodeSelector: {}

# -- details: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []

# -- details: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity
affinity: {}

#otel collector helm chart:
Expand Down

0 comments on commit 2a96256

Please sign in to comment.