Skip to content
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

chore (move): charts from private to public #26

Merged
merged 84 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
9404e63
feat: add extension-manager-operator and crds charts with initial tem…
akafazov Nov 22, 2024
d63aaaf
fix: update extension-content-operator references to extension-manage…
akafazov Nov 22, 2024
5723bd8
bump versions
akafazov Nov 22, 2024
142fc30
fix: update extension-manager-operator dependencies to version 0.1.3 …
akafazov Nov 22, 2024
913275c
fix: enable read-only root filesystem for manager container in deploy…
akafazov Nov 22, 2024
9952f93
fix: enable read-only root filesystem for account-operator manager co…
akafazov Nov 22, 2024
ee29b95
fix: enable read-only root filesystem in deployment test snapshots fo…
akafazov Nov 22, 2024
936eb3a
fix: bump account-operator and portal chart versions to 0.4.17 and 0.…
akafazov Nov 22, 2024
ff9b496
fix: update .gitignore to exclude bin directory and add kube-lint set…
akafazov Nov 22, 2024
92c1f3d
trigger ci
akafazov Nov 22, 2024
dae31ad
Add chart READMEs
akafazov Nov 22, 2024
245cb8f
feat (values): annotate parameters
akafazov Nov 22, 2024
091f4f7
fix: update common chart version to 0.1.5 and adjust related dependen…
akafazov Nov 22, 2024
d60948e
fix: update workflow to skip vulnerability scan in pipeline-chart.yml
akafazov Nov 22, 2024
2a8ced8
signoff commit
akafazov Nov 22, 2024
3ab471c
fix: update workflow to use the main branch for pipeline-chart.yml
akafazov Nov 22, 2024
de0971f
migrate _deploymentHelpers and use common.security in template
akafazov Nov 25, 2024
7af46aa
fix: update health probe configurations and remove unnecessary namesp…
akafazov Nov 25, 2024
ed77a43
fix: update health probe paths and configurations in deployment tests
akafazov Nov 25, 2024
076cd6e
fix: add common termination grace period to deployment templates
akafazov Nov 25, 2024
0e9cecb
feat: add support for customizable deployment template labels
akafazov Nov 25, 2024
1490183
feat: add support for customizable annotations in deployment templates
akafazov Nov 25, 2024
d7af046
feat: add support for customizable image pull policy in deployment te…
akafazov Nov 25, 2024
6883e75
fix: remove namespace from deployment metadata in templates
akafazov Nov 25, 2024
a0166b7
feat: update portal release name in templates and tests
akafazov Nov 25, 2024
156528e
feat: add optional image pull secret configuration in templates and t…
akafazov Nov 25, 2024
c2860ca
Merge remote-tracking branch 'origin/main' into chore/move-charts
akafazov Nov 25, 2024
69ce62e
feat: add namespace to ServiceAccount in cluster role binding and upd…
akafazov Nov 25, 2024
bd09ded
fix lint
akafazov Nov 25, 2024
69406bf
lint
akafazov Nov 25, 2024
7d84109
chore: bump portal chart version to 0.69.100
akafazov Nov 25, 2024
b03aaaa
chore: bump account-operator chart version to 0.4.19
akafazov Nov 25, 2024
557ba35
fix: update image pull policy logic in deployment helpers template
akafazov Nov 25, 2024
0c6af2c
fix: refactor security context inclusion in deployment templates and …
akafazov Nov 25, 2024
566ff49
fix: refactor health probe configuration and update image pull policy…
akafazov Nov 25, 2024
0e0b3ae
fix: refactor deployment templates to use common port definitions and…
akafazov Nov 25, 2024
8f7d087
fix lint
akafazov Nov 25, 2024
bc3a3eb
fix: refactor deployment templates to use common resource definitions
akafazov Nov 25, 2024
f926aee
fix: update resource limits and requests in deployment tests for acco…
akafazov Nov 25, 2024
1d89306
Merge remote-tracking branch 'origin/main' into chore/move-charts
akafazov Nov 26, 2024
1da5eba
Bump version to 0.69.106 in charts/portal/Chart.yaml
akafazov Nov 26, 2024
0b22cc7
WIP: lookup function
akafazov Nov 26, 2024
f024a44
fix (reuse): lookup functions fix
akafazov Nov 27, 2024
b66cfab
refactor: rename _getKeyValue.tpl to _getKeyLookup.tpl and add detail…
akafazov Nov 27, 2024
c98efbb
refactor: update getKeyValue function documentation and adjust key lo…
akafazov Nov 27, 2024
dff2053
refactor: update resource limits and requests to use cpuOverride and …
akafazov Nov 27, 2024
d146424
chore: remove .tgz files from .gitignore to allow tracking of package…
akafazov Nov 27, 2024
ec97426
fix lint
akafazov Nov 27, 2024
ffc3cc9
Merge remote-tracking branch 'origin/main' into chore/move-charts
akafazov Nov 27, 2024
478ec46
chore: bump chart versions for account-operator and portal
akafazov Nov 27, 2024
4e0b905
feat: update and automate README generation
akafazov Nov 27, 2024
7d43342
feat: enhance health probe configuration
akafazov Nov 27, 2024
62938f4
refactor (values.yaml): cleanup charts' values
akafazov Nov 27, 2024
a33cb13
feat: enhance values.yaml and README documentation for account-operat…
akafazov Nov 27, 2024
59d6f72
Merge remote-tracking branch 'origin/main' into chore/move-charts
akafazov Nov 27, 2024
f5555f8
chore: bump chart versions for account-operator and openmfp-crds
akafazov Nov 27, 2024
790870c
chore: bump chart versions for account-operator and openmfp-crds to 0…
akafazov Nov 27, 2024
dcc3cec
feat (tasks): update only changed charts
akafazov Nov 27, 2024
dbe4008
chore: bump chart versions for example-content to 0.110.5 and openmfp…
akafazov Nov 27, 2024
7f83a7a
update helm-docs
akafazov Nov 28, 2024
f739b94
feat: refactor Istio configuration and update security context handling
akafazov Nov 28, 2024
988fd0e
Merge remote-tracking branch 'origin/main' into chore/move-charts
akafazov Nov 28, 2024
fedff7b
chore: update version numbers for openmfp and portal charts
akafazov Nov 28, 2024
b856f4e
feat: enable external secrets and refactor deployment configuration
akafazov Nov 28, 2024
5d813dc
Add 4 layered lookup
TobiasOetzel Nov 28, 2024
ed47971
Merge branch 'main' into chore/move-charts
tobias-oetzel Nov 28, 2024
57eca3f
add generated docs
TobiasOetzel Nov 29, 2024
120f95d
Merge branch 'main' into chore/move-charts
tobias-oetzel Nov 29, 2024
8026042
update readmes
TobiasOetzel Nov 29, 2024
42e6d44
update readmes
TobiasOetzel Nov 29, 2024
a6f1a33
update readme
TobiasOetzel Nov 29, 2024
750287a
update readme
TobiasOetzel Nov 29, 2024
90b7500
update readmes
TobiasOetzel Nov 29, 2024
52c2b1e
update readmes
TobiasOetzel Nov 29, 2024
5d8e447
Merge remote-tracking branch 'origin/chore/move-charts' into chore/mo…
TobiasOetzel Nov 29, 2024
8837f23
version bump
TobiasOetzel Nov 29, 2024
038361f
update common docs
TobiasOetzel Nov 29, 2024
35c0892
getting rid of double docs tables
TobiasOetzel Nov 29, 2024
4fee5ea
Merge branch 'main' into chore/move-charts
tobias-oetzel Dec 2, 2024
2e1e0bc
Merge remote-tracking branch 'origin/main' into chore/move-charts
akafazov Dec 3, 2024
f7b7f72
feat(charts): update app versions and add new portal chart
akafazov Dec 3, 2024
d62c340
Merge branch 'main' into chore/move-charts
nexus49 Dec 3, 2024
0badde6
update docs of getKeyLookup.tpl
akafazov Dec 3, 2024
67d223a
feat(charts): bump chart versions for example-content, openmfp, and p…
akafazov Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
chartName: common
additionalTestFilesCommand: ''
chartRepos: 'bitnami=https://charts.bitnami.com/bitnami,openfga=https://openfga.github.io/helm-charts'
skipVulnerabilityScan: true
secrets: inherit

updateVersionFile:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/extension-manager-operator-crds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build extension-manager-operator-crds Workflow
on:
push:
paths:
- 'charts/extension-manager-operator-crds/**'
- '.github/workflows/extension-manager-operator-crds.yaml'

jobs:
pipeline:
concurrency:
group: extension-manager-operator-crds-${{ github.ref }}
cancel-in-progress: true
uses: openmfp/gha/.github/workflows/pipeline-chart.yml@main
with:
chartFolder: charts
chartName: extension-manager-operator-crds
additionalTestFilesCommand: ''
chartRepos: 'bitnami=https://charts.bitnami.com/bitnami,openfga=https://openfga.github.io/helm-charts'
secrets: inherit

updateVersionFile:
if: ${{ github.ref == 'refs/heads/main' }}
needs: [pipeline]
uses: openmfp/gha/.github/workflows/job-update-version-file.yml@main
secrets: inherit
with:
componentVersionKey: "extension-manager-operator-crds"
version: ${{ needs.pipeline.outputs.version }}
28 changes: 28 additions & 0 deletions .github/workflows/extension-manager-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build extension-manager-operator Workflow
on:
push:
paths:
- 'charts/extension-manager-operator/**'
- '.github/workflows/extension-manager-operator.yaml'

jobs:
pipeline:
concurrency:
group: extension-manager-operator-${{ github.ref }}
cancel-in-progress: true
uses: openmfp/gha/.github/workflows/pipeline-chart.yml@main
with:
chartFolder: charts
chartName: extension-manager-operator
additionalTestFilesCommand: ''
chartRepos: 'bitnami=https://charts.bitnami.com/bitnami,openfga=https://openfga.github.io/helm-charts'
secrets: inherit

updateVersionFile:
if: ${{ github.ref == 'refs/heads/main' }}
needs: [pipeline]
uses: openmfp/gha/.github/workflows/job-update-version-file.yml@main
secrets: inherit
with:
componentVersionKey: "extension-manager-operator"
version: ${{ needs.pipeline.outputs.version }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
.vscode/settings.json
bin/
1 change: 1 addition & 0 deletions .helmdocsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts/common/test-chart
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# helm-charts

This repository contains public helm charts for the OpenMFP project.

## Taskfile
It uses Taskfile and task command to local dev tooling. The following tasks are available: `lint, helmtest, test, update, validate, vulnerability, helm-docs`.

## Updating charts
If a chart is changed, it could be dependency of other chart or its dependencies must be updated. To do it, run `task update`.

## Helm-docs
Using https://github.com/norwoodj/helm-docs to generate charts documentation. Documentation can be updated by running `task helm-docs` command.

## Github Actions
Each chart is automatically tested, packaged and published to github repository. Workflows are located in the [.github/workflows](.github/workflows) folder.

## OWASP vulnerability scanning
Kube-linter and kube-score can be run locally with `task vulnerability`. PR changes are also scanned on github and found vulnerability are visible under the Security project section on Github.
41 changes: 35 additions & 6 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,56 @@ version: '3'
vars:
LOCAL_BIN: bin
CHARTS:
sh: "ls charts/ | sed 's/^/charts\\//g' | paste -sd ',' -"
sh: "printf '%s,%s' $(ls -d charts/*/ | paste -sd ',' -) 'charts/common/test-chart'"
CHANGED_CHARTS:
sh: "git status --porcelain | grep '^ M charts/' | cut -d'/' -f2 | sort -u | sed 's|^|charts/|' | paste -sd ',' -"
tasks:
## Setup
setup:kube-lint:
internal: true
cmds:
- mkdir -p $(pwd)/{{.LOCAL_BIN}}
- test -s {{.LOCAL_BIN}}/kube-linter || GOBIN=$(pwd)/{{.LOCAL_BIN}} go install golang.stackrox.io/kube-linter/cmd/kube-linter@latest
- chmod +x $(pwd)/{{.LOCAL_BIN}}/kube-linter
setup:helm-docs:
internal: true
cmds:
- test -s {{.LOCAL_BIN}}/helm-docs || GOBIN=$(pwd)/{{.LOCAL_BIN}} go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
## Development
lint:
deps: []
cmds:
- "ct lint --target-branch main --validate-maintainers=false --charts={{.CHARTS}}"
package:
cmds:
- helm package ./charts/openmfp
helmtest:
cmds:
- "for chart in $(echo {{.CHARTS}} | tr ',' ' '); do helm unittest $chart; done"
test:
deps:
- task: update
- task: helmtest
update-changed:
deps:
- task: helm-docs
cmds:
- "for chart in $(echo {{.CHANGED_CHARTS}} | tr ',' ' '); do helm dependency update $chart; done"
update:
deps:
- task: helm-docs
cmds:
- "for chart in $(echo {{.CHARTS}} | tr ',' ' '); do helm dependency update $chart; done"
validate:
cmds:
- task: lint
- task: package
- task: test
# - task: package
- task: test
- task: vulnerability
vulnerability:
deps:
- task: setup:kube-lint
cmds:
- "{{.LOCAL_BIN}}/kube-linter lint \"charts/\" --format \"plain\""
helm-docs:
deps:
- task: setup:helm-docs
cmds:
- "{{.LOCAL_BIN}}/helm-docs --chart-search-root charts/ --template-files=README.md.gotmpl"
18 changes: 18 additions & 0 deletions charts/_templates.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{ template "chart.header" . }}
{{ template "chart.description" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

## Configuration

The chart supports the following configuration parameters in the table below. Additionally, default configuration parameters documented in [common/README.md](../common/README.md) are not explicitely listed in the table but are also supported.

{{ template "chart.valuesHeader" . }}

Default configuration parameters, which can be overriden either globally or on a chart level are documented in [common/README.md](../common/README.md).

{{ template "chart.valuesTable" . }}

{{ template "chart.requirementsSection" . }}

{{ template "helm-docs.versionFooter" . }}
2 changes: 1 addition & 1 deletion charts/account-operator-crds/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ description: A Helm chart for Kubernetes

type: application

version: 0.1.5
version: 0.1.6

appVersion: "1.16.0"
12 changes: 12 additions & 0 deletions charts/account-operator-crds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# account-operator-crds

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

A Helm chart for Kubernetes

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| kcp.enabled | bool | `false` | Enable KCP |

1 change: 1 addition & 0 deletions charts/account-operator-crds/values.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
kcp:
# -- Enable KCP
enabled: false
8 changes: 4 additions & 4 deletions charts/account-operator/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: account-operator-crds
repository: file://../account-operator-crds
version: 0.1.5
version: 0.1.6
- name: common
repository: file://../common
version: 0.1.4
digest: sha256:9d2466bb6f196f2355a55ff621f6017cee086f9600280b009e55249ab6a6335f
generated: "2024-11-21T17:36:43.666194+01:00"
version: 0.1.5
digest: sha256:5dcb2935c71c2e917170ef3b54c5ea586ab30269a5ec960353bfcbb362c073e1
generated: "2024-11-27T20:12:23.434477831+02:00"
6 changes: 3 additions & 3 deletions charts/account-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apiVersion: v2
name: account-operator
description: A Helm chart for Kubernetes
type: application
version: 0.4.20
version: 0.4.21
appVersion: "0.108.0"
dependencies:
- name: account-operator-crds
version: 0.1.5
version: 0.1.6
condition: crds.enabled
repository: file://../account-operator-crds
- name: common
version: 0.1.4
version: 0.1.5
repository: file://../common
40 changes: 40 additions & 0 deletions charts/account-operator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# account-operator

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

A Helm chart for Kubernetes

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| file://../account-operator-crds | account-operator-crds | 0.1.6 |
| file://../common | common | 0.1.5 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| crds.enabled | bool | `true` | Enable CRDs |
| deployment.specTemplate.annotations | object | `{}` | The annotations for the deployment |
| deployment.specTemplate.labels | object | `{}` | The labels for the deployment |
| image.name | string | `"ghcr.io/openmfp/account-operator"` | The image repository |
| image.tag | string | `"latest"` | The image tag |
| kcp | object | `{"enabled":false,"virtualWorkspaceUrl":""}` | The KCP configuration |
| kcp.enabled | bool | `false` | Enable KCP |
| kcp.virtualWorkspaceUrl | string | `""` | The URL for the virtual workspace |
| kubeconfigSecret | string | `""` | The secret for kubeconfig |
| logLevel | string | `"warn"` | The log level |
| security.mountServiceAccountToken | bool | `false` | Mount the service account token |
| subroutines.extension.enabled | bool | `true` | Enable extension subroutines |
| subroutines.extensionReady.enabled | bool | `true` | Enable extension ready subroutines |
| subroutines.fga.creatorRelation | string | `"owner"` | The creator relation for FGA |
| subroutines.fga.enabled | bool | `true` | Enable FGA subroutines |
| subroutines.fga.grpcAddr | string | `""` | The gRPC address for FGA |
| subroutines.fga.objectType | string | `"account"` | The object type for FGA |
| subroutines.fga.parentRelation | string | `"parent"` | The parent relation for FGA |
| subroutines.fga.rootNamespace | string | `"openmfp-root"` | The root namespace for FGA |
| subroutines.namespace.enabled | bool | `true` | Enable namespace subroutines |
| webhooks.certDir | string | `"/certs"` | The directory for webhook certificates |
| webhooks.enabled | bool | `false` | Enable webhooks |

Binary file not shown.
Binary file not shown.
Binary file removed charts/account-operator/charts/common-0.1.4.tgz
Binary file not shown.
Binary file added charts/account-operator/charts/common-0.1.5.tgz
Binary file not shown.
36 changes: 6 additions & 30 deletions charts/account-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
{{- if .Values.webhooks.enabled }}
annotations:
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "common.entity.name" . }}-serving-cert
{{- end }}
spec:
revisionHistoryLimit: {{ .Values.deployment.revisionHistoryLimit }}
revisionHistoryLimit: {{ include "common.getKeyValue" (dict "Values" .Values "key" "deployment.revisionHistoryLimit") }}
selector:
matchLabels:
service: {{ include "common.entity.name" . }}
Expand All @@ -34,42 +33,19 @@ spec:
- operator
- --leader-elect
- --log-level={{ .Values.logLevel }}
- "--health-probe-bind-address=:{{ .Values.health.port }}"
- '--health-probe-bind-address=:{{ include "common.getKeyValue" (dict "Values" .Values "key" "health.port") }}'
image: {{ .Values.image.name }}:{{ .Chart.AppVersion }}
name: manager
securityContext:
runAsNonRoot: true
{{ include "common.container.securityContext" . | nindent 10 }}
ports:
- containerPort: {{ .Values.metrics.port }}
name: metrics
protocol: TCP
- name: health-port
containerPort: {{ .Values.health.port }}
protocol: TCP
{{ include "common.PortsMetricsHealth" . | nindent 10 }}
{{- if .Values.webhooks.enabled }}
- name: webhook-port
containerPort: 9443
protocol: TCP
{{- end }}
livenessProbe:
httpGet:
path: /healthz
port: {{ .Values.health.port}}
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: {{ .Values.health.port}}
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: {{ .Values.deployment.resources.limits.cpu }}
memory: {{ .Values.deployment.resources.limits.memory }}
requests:
cpu: {{ .Values.deployment.resources.requests.cpu }}
memory: {{ .Values.deployment.resources.requests.memory }}
{{ include "common.operatorHealthAndReadyness" . | nindent 10 }}
{{ include "common.resources" . | nindent 10 }}
env:
- name: SUBROUTINES_NAMESPACE_ENABLED
value: "{{ .Values.subroutines.namespace.enabled }}"
Expand Down
1 change: 0 additions & 1 deletion charts/account-operator/templates/service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
{{- include "common.imagePullSecret" . }}
2 changes: 0 additions & 2 deletions charts/account-operator/templates/webhook/pki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: {{ include "common.entity.name" . }}-selfsigned-issuer
namespace: {{ .Release.namespace }}
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ include "common.entity.name" . }}-serving-cert
namespace: {{ .Release.namespace }}
spec:
dnsNames:
- {{ include "common.entity.name" . }}-webhook.{{ .Release.Namespace }}.svc
Expand Down
1 change: 0 additions & 1 deletion charts/account-operator/templates/webhook/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "common.entity.name" . }}-webhook
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 443
Expand Down
Loading
Loading