feat(semaphore) add semaphore (#18492)

**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/stable/semaphore

⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [ x ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [x ] ⚖️ My code follows the style guidelines of this project
- [ x] 👀 I have performed a self-review of my own code
- [ x] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ x ] 📄 I have made corresponding changes to the documentation
- [x ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ x ] ⬆️ I increased versions for any altered app according to
semantic versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ x ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._

---------

Signed-off-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com>
Co-authored-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com>
This commit is contained in:
Lukas Holzner
2024-02-23 22:49:14 +01:00
committed by GitHub
parent e880b0d4bc
commit e994c3279d
10 changed files with 364 additions and 0 deletions

View File

@@ -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

View File

@@ -0,0 +1,4 @@
---
title: Changelog
---

View File

@@ -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

View File

@@ -0,0 +1,4 @@
---
title: README
---

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View File

@@ -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}

View File

@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}

View File

@@ -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 -}}

View File

@@ -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" . -}}

View File

@@ -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