diff --git a/charts/incubator/semaphore/.helmignore b/charts/incubator/semaphore/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/semaphore/.helmignore @@ -0,0 +1,30 @@ +# 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 +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl +# docs folder +/docs +# icon +icon.png diff --git a/charts/incubator/semaphore/CHANGELOG.md b/charts/incubator/semaphore/CHANGELOG.md new file mode 100644 index 00000000000..1e346331dea --- /dev/null +++ b/charts/incubator/semaphore/CHANGELOG.md @@ -0,0 +1,4 @@ +--- +title: Changelog +--- + diff --git a/charts/incubator/semaphore/Chart.yaml b/charts/incubator/semaphore/Chart.yaml new file mode 100644 index 00000000000..730cbec0c56 --- /dev/null +++ b/charts/incubator/semaphore/Chart.yaml @@ -0,0 +1,38 @@ +annotations: + max_scale_version: 23.10.2 + min_scale_version: 23.10.0 + truecharts.org/SCALE-support: "true" + truecharts.org/category: productivity + truecharts.org/max_helm_version: "3.14" + truecharts.org/min_helm_version: "3.12" + truecharts.org/train: incubator +apiVersion: v2 +appVersion: 2.9.45 +dependencies: + - name: common + version: 17.2.30 + repository: oci://tccr.io/truecharts + condition: "" + alias: "" + tags: [] + import-values: [] +deprecated: false +description: Semaphore is a modern, open source alternative to Ansible Tower. It is a self-hosted web-based solution that allows you to create and manage Ansible projects, playbooks, and roles, while also providing a web interface for running and monitoring Ansible tasks. +home: https://truecharts.org/charts/incubator/semaphore +icon: https://truecharts.org/img/hotlink-ok/chart-icons/semaphore.png +keywords: + - ansible + - semaphore + - cicd +kubeVersion: ">=1.24.0-0" +maintainers: + - name: TrueCharts + email: info@truecharts.org + url: https://truecharts.org +name: semaphore +sources: + - https://github.com/ansible-semaphore/semaphore + - https://github.com/truecharts/charts/tree/master/charts/incubator/semaphore + - https://hub.docker.com/r/semaphoreui/semaphore/ +type: application +version: 0.0.1 diff --git a/charts/incubator/semaphore/README.md b/charts/incubator/semaphore/README.md new file mode 100644 index 00000000000..2def1ee9402 --- /dev/null +++ b/charts/incubator/semaphore/README.md @@ -0,0 +1,4 @@ +--- +title: README +--- + diff --git a/charts/incubator/semaphore/logo.png b/charts/incubator/semaphore/logo.png new file mode 100644 index 00000000000..a359aa0a208 Binary files /dev/null and b/charts/incubator/semaphore/logo.png differ diff --git a/charts/incubator/semaphore/questions.yaml b/charts/incubator/semaphore/questions.yaml new file mode 100644 index 00000000000..4fe8cd5cd62 --- /dev/null +++ b/charts/incubator/semaphore/questions.yaml @@ -0,0 +1,185 @@ +# Include{groups} +portals: + open: +# Include{portalLink} +questions: +# Include{global} +# Include{workload} +# Include{workloadDeployment} +# Include{replicas1} +# Include{podSpec} +# Include{containerMain} + - variable: env + group: "App Configuration" + label: "Image Environment" + schema: + additional_attrs: true + type: dict + attrs: + - variable: SEMAPHORE_ADMIN + label: "Admin Name" + schema: + type: string + required: true + default: "admin" + - variable: SEMAPHORE_ADMIN_NAME + label: "Admin Displayname" + schema: + type: string + required: true + default: "admin" + - variable: SEMAPHORE_ADMIN_PASSWORD + label: "Admin Password" + schema: + type: string + private: true + required: true + default: "" + - variable: SEMAPHORE_ADMIN_EMAIL + label: "Admin E-Mail" + schema: + type: string + required: true + default: "admin@localhost" + - variable: ldap_settings + label: Show LDAP Settings + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: SEMAPHORE_LDAP_ACTIVATED + label: Enable LDAP Service + schema: + type: string + required: true + default: "no" + enum: + - value: "no" + description: "No" + - value: "yes" + description: "Yes" + - variable: SEMAPHORE_LDAP_HOST + label: LDAP Host + schema: + type: string + default: "" + - variable: SEMAPHORE_LDAP_PORT + label: LDAP Port + schema: + type: int + default: 636 + - variable: SEMAPHORE_LDAP_NEEDTLS + label: LDAP Need TLS + schema: + type: string + default: "no" + enum: + - value: "no" + description: "No" + - value: "yes" + description: "Yes" + - variable: SEMAPHORE_LDAP_DN_BIND + label: LDAP DN Bind + schema: + type: string + default: "uid=bind_user,cn=users,cn=accounts,dc=local,dc=shiftsystems,dc=net" + - variable: SEMAPHORE_LDAP_PASSWORD + label: LDAP Password + schema: + type: string + private: true + default: "" + - variable: SEMAPHORE_LDAP_DN_SEARCH + label: LDAP DN Search + schema: + type: string + default: "" + - variable: SEMAPHORE_LDAP_SEARCH_FILTER + label: LDAP Search Filter + schema: + type: string + default: "" + +# Include{containerBasic} +# Include{containerAdvanced} +# Include{containerConfig} +# Include{podOptions} +# Include{serviceRoot} +# Include{serviceMain} +# Include{serviceSelectorLoadBalancer} +# Include{serviceSelectorExtras} + - variable: main + label: "Main Service Port Configuration" + schema: + additional_attrs: true + type: dict + attrs: + - variable: port + label: "Port" + description: "This port exposes the container port on the service" + schema: + type: int + default: 3000 + required: true +# Include{serviceExpertRoot} +# Include{serviceExpert} +# Include{serviceList} +# Include{persistenceRoot} + - variable: config + label: "App Config Storage" + description: "Stores the Application Configuration." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} + - variable: data + label: "App Data Storage" + description: "Stores the Application Data." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} +# Include{persistenceList} +# Include{ingressRoot} + - variable: main + label: "Main Ingress" + schema: + additional_attrs: true + type: dict + attrs: +# Include{ingressDefault} +# Include{ingressAdvanced} +# Include{ingressList} +# Include{securityContextRoot} + - variable: runAsUser + label: "runAsUser" + description: "The UserID of the user running the application" + schema: + type: int + default: 0 + - variable: runAsGroup + label: "runAsGroup" + description: "The groupID of the user running the application" + schema: + type: int + default: 0 +# Include{securityContextContainer} +# Include{securityContextAdvanced} +# Include{securityContextPod} + - variable: fsGroup + label: "fsGroup" + description: "The group that should own ALL storage." + schema: + type: int + default: 568 +# Include{resources} +# Include{postgresql} +# Include{advanced} +# Include{addons} +# Include{codeserver} +# Include{netshoot} +# Include{vpn} +# Include{documentation} diff --git a/charts/incubator/semaphore/templates/NOTES.txt b/charts/incubator/semaphore/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/semaphore/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/semaphore/templates/_secrets.tpl b/charts/incubator/semaphore/templates/_secrets.tpl new file mode 100644 index 00000000000..27203f328be --- /dev/null +++ b/charts/incubator/semaphore/templates/_secrets.tpl @@ -0,0 +1,13 @@ +{{/* Define the secrets */}} +{{- define "semaphore.secrets" -}} +{{- $secretName := (printf "%s-semaphore-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }} + +{{- $accessKey := randAlphaNum 32 -}} + + {{- with lookup "v1" "Secret" .Release.Namespace $secretName -}} + {{- $accessKey = index .data "SEMAPHORE_ACCESS_KEY_ENCRYPTION" | b64dec -}} + {{- end }} +enabled: true +data: + SEMAPHORE_ACCESS_KEY_ENCRYPTION: {{ $accessKey }} +{{- end -}} \ No newline at end of file diff --git a/charts/incubator/semaphore/templates/common.yaml b/charts/incubator/semaphore/templates/common.yaml new file mode 100644 index 00000000000..7c8dca8f6f1 --- /dev/null +++ b/charts/incubator/semaphore/templates/common.yaml @@ -0,0 +1,11 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . -}} + +{{/* Render secrets for semaphore */}} +{{- $secrets := include "semaphore.secrets" . | fromYaml -}} +{{- if $secrets -}} + {{- $_ := set .Values.secret "semaphore-secrets" $secrets -}} +{{- end -}} + +{{/* Render the templates */}} +{{- include "tc.v1.common.loader.apply" . -}} \ No newline at end of file diff --git a/charts/incubator/semaphore/values.yaml b/charts/incubator/semaphore/values.yaml new file mode 100644 index 00000000000..26d8f6eaf0d --- /dev/null +++ b/charts/incubator/semaphore/values.yaml @@ -0,0 +1,78 @@ +image: + repository: semaphoreui/semaphore + tag: v2.9.45@sha256:6a7dbb3e39ab8d1f6331006c2f251ac277360d30b281ab96f5ada81ccc269997 + pullPolicy: IfNotPresent + +securityContext: + container: + readOnlyRootFilesystem: false + runAsNonRoot: false + runAsUser: 0 + runAsGroup: 0 + +service: + main: + ports: + main: + port: 3000 + protocol: http + targetPort: 3000 + +workload: + main: + podSpec: + containers: + main: + env: + # DB + SEMAPHORE_DB_DIALECT: postgres + SEMAPHORE_DB_USER: "{{ .Values.cnpg.main.user }}" + SEMAPHORE_DB: "{{ .Values.cnpg.main.database }}" + SEMAPHORE_DB_PORT: 5432 + SEMAPHORE_DB_HOST: + secretKeyRef: + name: cnpg-main-urls + key: host + SEMAPHORE_DB_PASS: + secretKeyRef: + name: cnpg-main-user + key: password + SEMAPHORE_ACCESS_KEY_ENCRYPTION: + secretKeyRef: + name: semaphore-secrets + key: SEMAPHORE_ACCESS_KEY_ENCRYPTION + # set paths to /data + SEMAPHORE_PLAYBOOK_PATH: "{{.Values.persistence.data.mountPath }}" + SEMAPHORE_ADMIN: admin + SEMAPHORE_ADMIN_NAME: admin + SEMAPHORE_ADMIN_PASSWORD: changeme + SEMAPHORE_ADMIN_EMAIL: admin@localhost + # LDAP + # no | yes + SEMAPHORE_LDAP_ACTIVATED: 'no' + # SEMAPHORE_LDAP_HOST: dc01.local.example.com + # SEMAPHORE_LDAP_PORT: '636' + # no | yes + SEMAPHORE_LDAP_NEEDTLS: 'no' + # SEMAPHORE_LDAP_DN_BIND: 'uid=bind_user,cn=users,cn=accounts,dc=local,dc=shiftsystems,dc=net' + # SEMAPHORE_LDAP_PASSWORD: 'ldap_bind_account_password' + # SEMAPHORE_LDAP_DN_SEARCH: 'dc=local,dc=example,dc=com' + # SEMAPHORE_LDAP_SEARCH_FILTER: "(\u0026(uid=%s)(memberOf=cn=ipausers,cn=groups,cn=accounts,dc=local,dc=example,dc=com))" + +persistence: + config: + enabled: true + mountPath: /etc/semaphore + data: + enabled: true + mountPath: /data + +cnpg: + main: + enabled: true + user: semaphore + database: semaphore + +portal: + open: + enabled: true