diff --git a/.github/linters/ct.yaml b/.github/linters/ct.yaml deleted file mode 100644 index 455467a..0000000 --- a/.github/linters/ct.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# See https://github.com/helm/chart-testing#configuration -remote: origin -target-branch: main -chart-dirs: - - charts -chart-repos: - - devops-ia=https://devops-ia.github.io/helm-charts/ -helm-extra-args: --timeout 600s -additional-commands: - - helm unittest --helm3 --strict --file unittests/*.yaml --file 'unittests/**/*.yaml' {{ .Path }} \ No newline at end of file diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index a2446a2..9291528 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -1,4 +1,4 @@ -name: Lint and test Charts +name: Lint and Test Charts on: pull_request @@ -6,43 +6,40 @@ jobs: lint-test: runs-on: ubuntu-latest steps: - - name: Checkout Code + - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Helm - uses: azure/setup-helm@v2.0 + uses: azure/setup-helm@v3 with: - version: v3.8.1 + version: v3.11.2 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: '3.9' + check-latest: true - name: Set up chart-testing - uses: helm/chart-testing-action@v2.2.1 + uses: helm/chart-testing-action@v2.4.0 - name: Run chart-testing (list-changed) id: list-changed run: | - changed=$(ct list-changed --config .github/linters/ct.yaml) + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" + echo "changed=true" >> "$GITHUB_OUTPUT" fi - - name: install helm unittest plugin - if: steps.list-changed.outputs.changed == 'true' - run: | - helm env - helm plugin install https://github.com/quintush/helm-unittest.git --version 0.2.8 - - name: Run chart-testing (lint) - run: ct lint --config .github/linters/ct.yaml + if: steps.list-changed.outputs.changed == 'true' + run: ct lint --target-branch ${{ github.event.repository.default_branch }} --debug - name: Create kind cluster - uses: helm/kind-action@v1.2.0 if: steps.list-changed.outputs.changed == 'true' + uses: helm/kind-action@v1.4.0 - name: Run chart-testing (install) - run: ct install --config .github/linters/ct.yaml + if: steps.list-changed.outputs.changed == 'true' + run: ct install --target-branch ${{ github.event.repository.default_branch }} --debug \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bf842c4..eda2ecb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,9 +19,9 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - name: Set up Helm - uses: azure/setup-helm@v2.0 + uses: azure/setup-helm@v3 with: - version: v3.10.1 + version: v3.11.2 - name: Run chart-releaser uses: helm/chart-releaser-action@v1.5.0 diff --git a/charts/steampipe/.helmignore b/charts/steampipe/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/steampipe/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/steampipe/Chart.yaml b/charts/steampipe/Chart.yaml new file mode 100644 index 0000000..26f5809 --- /dev/null +++ b/charts/steampipe/Chart.yaml @@ -0,0 +1,28 @@ +apiVersion: v2 +name: steampipe +description: A Helm chart for Kubernetes + +maintainers: + - name: amartingarcia + email: adrianmg231189@gmail.com + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "0.20.2" diff --git a/charts/steampipe/README.md b/charts/steampipe/README.md new file mode 100644 index 0000000..4fbd874 --- /dev/null +++ b/charts/steampipe/README.md @@ -0,0 +1,72 @@ +# steampipe + +![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.20.2](https://img.shields.io/badge/AppVersion-0.20.2-informational?style=flat-square) + +A Helm chart for Kubernetes + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| amartingarcia | | | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| args[0] | string | `"--foreground"` | | +| args[1] | string | `"--show-password"` | | +| command | list | `[]` | | +| configProbe | object | `{}` | | +| dashboard.enabled | bool | `false` | | +| dashboard.listen | string | `"network"` | | +| dashboard.port | int | `9194` | | +| db.enabled | bool | `false` | | +| db.listen | string | `"local"` | | +| db.port | int | `9193` | | +| envFrom | list | `[]` | | +| env[0].name | string | `"STEAMPIPE_LOG_LEVEL"` | | +| env[0].value | string | `"TRACE"` | | +| extraConfig.configMaps.data | string | `nil` | | +| extraConfig.configMaps.enabled | bool | `false` | | +| extraConfig.secrets.data | string | `nil` | | +| extraConfig.secrets.enabled | bool | `false` | | +| extraVolumeMount | string | `nil` | | +| extraVolumes | list | `[]` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"ghcr.io/turbot/steampipe"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| initContainer.extraInitVolumeMount | list | `[]` | | +| initContainer.image.pullPolicy | string | `"IfNotPresent"` | | +| initContainer.image.repository | string | `"ghcr.io/turbot/steampipe"` | | +| initContainer.image.tag | string | `""` | | +| initContainer.mods | list | `[]` | | +| initContainer.plugins | list | `[]` | | +| initContainer.resources | object | `{}` | | +| initContainer.securityContext | object | `{}` | | +| livenessProbe | object | `{}` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe | object | `{}` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/charts/steampipe/templates/NOTES.txt b/charts/steampipe/templates/NOTES.txt new file mode 100644 index 0000000..cc4cfaf --- /dev/null +++ b/charts/steampipe/templates/NOTES.txt @@ -0,0 +1,11 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "steampipe.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/charts/steampipe/templates/_helpers.tpl b/charts/steampipe/templates/_helpers.tpl new file mode 100644 index 0000000..dfede7b --- /dev/null +++ b/charts/steampipe/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "steampipe.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "steampipe.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "steampipe.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "steampipe.labels" -}} +helm.sh/chart: {{ include "steampipe.chart" . }} +{{ include "steampipe.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "steampipe.selectorLabels" -}} +app.kubernetes.io/name: {{ include "steampipe.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "steampipe.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "steampipe.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/steampipe/templates/configmap-init-scripts.yaml b/charts/steampipe/templates/configmap-init-scripts.yaml new file mode 100644 index 0000000..2225572 --- /dev/null +++ b/charts/steampipe/templates/configmap-init-scripts.yaml @@ -0,0 +1,23 @@ +{{- if or (.Values.initContainer.plugins) (.Values.initContainer.mods) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "steampipe.fullname" . }}-scripts + labels: + {{- include "steampipe.labels" . | nindent 4 }} +data: + init.sh: |- + set -e +{{- with .Values.initContainer.plugins }} + echo "Steampipe - Install Plugins" + {{- range $key, $value := . }} + steampipe plugin install {{ $value }} + {{- end }} +{{- end }} +{{- with .Values.initContainer.mods }} + echo "Steampipe - Install Mods" + {{- range $key, $value := . }} + steampipe mod install {{ $value }} + {{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/steampipe/templates/configmap.yaml b/charts/steampipe/templates/configmap.yaml new file mode 100644 index 0000000..4098284 --- /dev/null +++ b/charts/steampipe/templates/configmap.yaml @@ -0,0 +1,14 @@ +{{- if .Values.extraConfig.configMaps.enabled }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "steampipe.fullname" . }}-config + labels: + {{- include "steampipe.labels" . | nindent 4 }} +data: +{{- range $key, $value := .Values.extraConfig.configMaps.data }} + {{ $key }}: |- +{{ tpl $value $| indent 4 }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/steampipe/templates/deployment.yaml b/charts/steampipe/templates/deployment.yaml new file mode 100644 index 0000000..4fca3bc --- /dev/null +++ b/charts/steampipe/templates/deployment.yaml @@ -0,0 +1,190 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "steampipe.fullname" . }} + labels: + {{- include "steampipe.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "steampipe.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "steampipe.selectorLabels" . | nindent 8 }} + spec: + {{- if or (.Values.initContainer.plugins) (.Values.initContainer.mods) }} + initContainers: + - name: init + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.initContainer.image.pullPolicy }} + securityContext: + {{- toYaml .Values.initContainer.securityContext | nindent 12 }} + command: [ "sh", "/var/steampipe_scripts/init.sh" ] + resources: + {{- toYaml .Values.initContainer.resources | nindent 12 }} + volumeMounts: + - name: scripts + mountPath: /var/steampipe_scripts + - name: config + mountPath: /home/steampipe/.steampipe/config + - name: dashboard + mountPath: /home/steampipe/.steampipe/dashboard + - name: internal + mountPath: /home/steampipe/.steampipe/internal + - name: logs + mountPath: /home/steampipe/.steampipe/logs + - name: plugins + mountPath: /home/steampipe/.steampipe/plugins + - name: workspace + mountPath: /workspace + {{- with .Values.extraInitVolumeMount }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.command }} + command: + {{- toYaml .Values.command | nindent 12 }} + {{- end }} + args: + - "steampipe" + - "service" + - "start" + {{- if .Values.args }} + {{- toYaml .Values.args | nindent 12 }} + {{- if .Values.db.enabled }} + - --database-listen={{ .Values.db.listen }} + - --database-port={{ .Values.db.port }} + {{- end }} + {{- if .Values.dashboard.enabled }} + - --dashboard + - --dashboard-listen={{ .Values.dashboard.listen }} + - --dashboard-port={{ .Values.dashboard.port }} + {{- end }} + {{- end }} + {{- if .Values.env }} + env: + {{- toYaml .Values.env | nindent 12 }} + {{- end }} + {{- if .Values.envFrom }} + envFrom: + {{- toYaml .Values.envFrom | nindent 12 }} + {{- end }} + ports: + {{- if .Values.db.enabled }} + - name: db + containerPort: {{ .Values.db.port }} + protocol: TCP + {{- end }} + {{- if .Values.dashboard.enabled }} + - name: dashboard + containerPort: {{ .Values.dashboard.port }} + protocol: TCP + {{- end }} + {{- if .Values.livenessProbe }} + livenessProbe: + {{- toYaml .Values.livenessProbe | nindent 12 }} + {{- else if .Values.dashboard.enabled }} + livenessProbe: + failureThreshold: 5 + httpGet: + path: '/' + port: dashboard + initialDelaySeconds: 5 + timeoutSeconds: 10 + {{- end }} + {{- if .Values.readinessProbe }} + readinessProbe: + {{- toYaml .Values.readinessProbe | nindent 12 }} + {{- else if .Values.dashboard.enabled }} + readinessProbe: + failureThreshold: 3 + httpGet: + path: '/' + port: dashboard + initialDelaySeconds: 10 + timeoutSeconds: 5 + {{- end }} + {{- if .Values.startupProbe }} + startupProbe: + {{- toYaml .Values.startupProbe | nindent 12 }} + {{- else if .Values.dashboard.enabled }} + startupProbe: + httpGet: + path: '/' + port: dashboard + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 12 + {{- end }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + {{- if or (.Values.initContainer.plugins) (.Values.initContainer.mods) }} + - name: config + mountPath: /home/steampipe/.steampipe/config + - name: dashboard + mountPath: /home/steampipe/.steampipe/dashboard + - name: internal + mountPath: /home/steampipe/.steampipe/internal + - name: logs + mountPath: /home/steampipe/.steampipe/logs + - name: plugins + mountPath: /home/steampipe/.steampipe/plugins + - name: workspace + mountPath: /workspace + {{- end }} + {{- with .Values.extraVolumeMount }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "steampipe.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + {{- if or (.Values.initContainer.plugins) (.Values.initContainer.mods) }} + - name: scripts + configMap: + name: {{ template "steampipe.fullname" . }}-scripts + - name: config + emptyDir: {} + - name: dashboard + emptyDir: {} + - name: internal + emptyDir: {} + - name: logs + emptyDir: {} + - name: plugins + emptyDir: {} + - name: workspace + emptyDir: {} + {{- end }} + {{- with .Values.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} \ No newline at end of file diff --git a/charts/steampipe/templates/ingress.yaml b/charts/steampipe/templates/ingress.yaml new file mode 100644 index 0000000..26d29b0 --- /dev/null +++ b/charts/steampipe/templates/ingress.yaml @@ -0,0 +1,60 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "steampipe.fullname" . -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }}-dashboard + labels: + {{- include "steampipe.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ .port }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ .port }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/steampipe/templates/secret.yaml b/charts/steampipe/templates/secret.yaml new file mode 100644 index 0000000..59f20b5 --- /dev/null +++ b/charts/steampipe/templates/secret.yaml @@ -0,0 +1,15 @@ +{{- if .Values.extraConfig.secrets.enabled }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "steampipe.fullname" . }}-secrets + labels: + {{- include "steampipe.labels" . | nindent 4 }} +data: +{{- range $key, $value := .Values.extraConfig.secrets.data }} + {{ $key }}: |- +{{ tpl $value $| indent 4 }} + +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/steampipe/templates/service.yaml b/charts/steampipe/templates/service.yaml new file mode 100644 index 0000000..86a98a5 --- /dev/null +++ b/charts/steampipe/templates/service.yaml @@ -0,0 +1,25 @@ +{{- if or (.Values.db.enabled) (.Values.db.enabled) }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "steampipe.fullname" . }} + labels: + {{- include "steampipe.labels" . | nindent 4 }} +spec: + type: ClusterIP + ports: + {{- if .Values.db.enabled }} + - port: {{ .Values.db.port }} + targetPort: db + protocol: TCP + name: db + {{- end }} + {{- if .Values.dashboard.enabled }} + - port: {{ .Values.dashboard.port }} + targetPort: dashboard + protocol: TCP + name: dashboard + {{- end }} + selector: + {{- include "steampipe.selectorLabels" . | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/charts/steampipe/templates/serviceaccount.yaml b/charts/steampipe/templates/serviceaccount.yaml new file mode 100644 index 0000000..3e8b379 --- /dev/null +++ b/charts/steampipe/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "steampipe.serviceAccountName" . }} + labels: + {{- include "steampipe.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/steampipe/values.yaml b/charts/steampipe/values.yaml new file mode 100644 index 0000000..19eae5b --- /dev/null +++ b/charts/steampipe/values.yaml @@ -0,0 +1,211 @@ +# Default values for steampipe. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +--- +replicaCount: 1 + +image: + repository: ghcr.io/turbot/steampipe + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} +# capabilities: +# drop: +# - ALL +# readOnlyRootFilesystem: true +# runAsNonRoot: true +# runAsUser: 1000 + +command: [] +# - "steampipe" +# - "service" +# - "start" +# - "--foreground" +# - "--show-password" +# - "--database-password=1234" + +args: + - "--foreground" + - "--show-password" + +env: + - name: STEAMPIPE_LOG_LEVEL + value: "TRACE" + +envFrom: [] + +livenessProbe: {} +# httpGet: +# path: '/health/live' +# port: http +# initialDelaySeconds: 0 +# timeoutSeconds: 5 + +readinessProbe: {} +# httpGet: +# path: '/health/ready' +# port: http +# initialDelaySeconds: 10 +# timeoutSeconds: 1 + +configProbe: {} +# httpGet: +# path: '/health' +# port: http +# initialDelaySeconds: 15 +# timeoutSeconds: 1 +# failureThreshold: 60 +# periodSeconds: 5 + +db: + enabled: false + port: 9193 + listen: "local" + +dashboard: + enabled: false + port: 9194 + listen: "network" + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +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 + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +extraVolumes: [] +# - name: configmap +# configMap: +# name: steampipe-config +# - name: secret +# secret: +# secretname: steampipe-secret + + +extraVolumeMount: +# - name: configmap +# mountPath: "/home/steampipe/.steampipe/config/azure.spc" +# subPath: azure.spc +# readOnly: true +# - name: secret +# mountPath: "/home/steampipe/.steampipe/config/azure.spc" +# readOnly: true +# subPath: azure.spc + +extraConfig: + configMaps: + enabled: false + data: + # conections.spc: | + # connection "azure_all" { + # type = "aggregator" + # plugin = "azure" + # connections = ["azure_*"] + # } + # connection "azure_sub_1" { + # plugin = "azure" + # subscription_id = "azure_01" + # } + # connection "azure_sub_2" { + # plugin = "azure" + # subscription_id = "azure_02" + # } + + secrets: + enabled: false + data: + # azure.spc: | + # connection "azure" { + # plugin = "azure" + # environment = "AZUREPUBLICCLOUD" + # tenant_id = "00000000-0000-0000-0000-000000000000" + # subscription_id = "00000000-0000-0000-0000-000000000000" + # client_id = "00000000-0000-0000-0000-000000000000" + # client_secret = "~dummy@3password" + # } + +initContainer: + image: + repository: ghcr.io/turbot/steampipe + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + # Ref: https://hub.steampipe.io/plugins + plugins: [] + # - "azure" + # - "azuread" + + # Ref: https://hub.steampipe.io/mods + mods: [] + # - "github.com/turbot/steampipe-mod-azure-insights" + + 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 + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + extraInitVolumeMount: []