From b6a76332da9746631d579e76cf486bb0acc4c6c6 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Mon, 21 Oct 2024 19:07:17 +0200 Subject: [PATCH] added packages & requirement files --- charts/ansible-semaphore/.gitignore | 2 - charts/ansible-semaphore/Chart.yaml | 18 ------ charts/ansible-semaphore/Makefile | 2 - charts/ansible-semaphore/README.md | 62 ------------------ charts/ansible-semaphore/templates/base.tpl | 1 - charts/ansible-semaphore/templates/config.tpl | 10 --- charts/ansible-semaphore/values.yaml | 64 ------------------- charts/semaphoreui/templates/config.tpl | 6 ++ charts/semaphoreui/templates/entrypoint.sh | 8 +-- 9 files changed, 10 insertions(+), 163 deletions(-) delete mode 100644 charts/ansible-semaphore/.gitignore delete mode 100644 charts/ansible-semaphore/Chart.yaml delete mode 100644 charts/ansible-semaphore/Makefile delete mode 100644 charts/ansible-semaphore/README.md delete mode 100644 charts/ansible-semaphore/templates/base.tpl delete mode 100644 charts/ansible-semaphore/templates/config.tpl delete mode 100644 charts/ansible-semaphore/values.yaml diff --git a/charts/ansible-semaphore/.gitignore b/charts/ansible-semaphore/.gitignore deleted file mode 100644 index 2946e34..0000000 --- a/charts/ansible-semaphore/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Chart.lock -charts/ diff --git a/charts/ansible-semaphore/Chart.yaml b/charts/ansible-semaphore/Chart.yaml deleted file mode 100644 index 36bf9b9..0000000 --- a/charts/ansible-semaphore/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -apiVersion: v2 -name: ansible-semaphore -description: Powerful API for Ansible -type: application -version: 1.0.0 -appVersion: v2.8.53 -kubeVersion: ">=1.27.0" -home: https://semaphoreui.com/ -sources: - - https://git.rre.nu/jonas/helm-charts -maintainers: - - name: Jonas Forsberg - email: barregargamel@gmail.com -dependencies: - - name: lib - repository: "file://../../../lib/" - version: 1.0.1 diff --git a/charts/ansible-semaphore/Makefile b/charts/ansible-semaphore/Makefile deleted file mode 100644 index 6cd25d8..0000000 --- a/charts/ansible-semaphore/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -doc: - frigate gen --output-format markdown --no-deps --no-credits ./ > README.md diff --git a/charts/ansible-semaphore/README.md b/charts/ansible-semaphore/README.md deleted file mode 100644 index 42b95bc..0000000 --- a/charts/ansible-semaphore/README.md +++ /dev/null @@ -1,62 +0,0 @@ - -Ansible-semaphore -=========== - -Powerful API for Ansible - - -## Configuration - -The following table lists the configurable parameters of the Ansible-semaphore chart and their default values. - -| Parameter | Description | Default | -| ------------------------ | ----------------------- | -------------- | -| `image.repository` | | `"ansiblesemaphore/semaphore"` | -| `config.bolt.host` | Path to the BoltDB database file | `null` | -| `config.mysql.host` | MySQL database host | `null` | -| `config.mysql.name` | MySQL database (schema) name | `null` | -| `config.mysql.user` | MySQL user name | `null` | -| `config.mysql.pass` | MySQL user's password | `null` | -| `config.postgres.host` | Postgres database host | `null` | -| `config.postgres.name` | Postgres database (schema) name | `null` | -| `config.postgres.user` | Postgres user name | `null` | -| `config.postgres.pass` | Postgres user's password | `null` | -| `config.dialect` | Can be mysql, postgres or bolt | `"bolt"` | -| `config.port` | TCP port on which the web interface will be available. Default: 3000 | `3000` | -| `config.interface` | Useful if your server has multiple network interfaces | `null` | -| `config.tmp_path` | Path to directory where cloned repositories and generated files are stored. Default: /tmp/semaphore | `"/tmp/semaphore"` | -| `config.access_key_encryption` | Secret key used for encrypting access keys in database. Read more in [Database encryption reference](https://docs.semaphoreui.com/administration-guide/security#database-encryption). | `null` | -| `config.web_host` | Can be useful if you want to use Semaphore by the subpath, for example: http://yourdomain.com/semaphore. Do not add a trailing /. | `null` | -| `config.email_sender` | | `null` | -| `config.email_host` | | `null` | -| `config.email_port` | | `null` | -| `config.email_secure` | | `null` | -| `config.email_username` | | `null` | -| `config.email_password` | | `null` | -| `config.email_alert` | | `null` | -| `config.telegram_alert` | | `null` | -| `config.slack_alert` | Set to True to enable pushing alerts to slack. It should be used in combination with slack_url | `null` | -| `config.slack_url` | The slack webhook url. Semaphore will used it to POST Slack formatted json alerts to the provided url | `null` | -| `config.rocketchat_alert` | Set to True to enable pushing alerts to Rocket.Chat. It should be used in combination with rocketchat_url. Available since v2.9.56. | `null` | -| `config.rocketchat_url` | The rocketchat webhook url. Semaphore will used it to POST Rocket.Chat formatted json alerts to the provided url. Available since v2.9.56. | `null` | -| `config.ldap_enable` | | `null` | -| `config.ldap_needtls` | | `null` | -| `config.ldap_binddn` | | `null` | -| `config.ldap_bindpassword` | | `null` | -| `config.ldap_server` | | `null` | -| `config.ldap_searchdn` | | `null` | -| `config.concurrency_mode` | Can be unset/empty or project or node. When set to project, tasks will run in parallel if and only if they do not share the same project id, with no regard to the nodes/hosts that are affected. When set to node, a task will run in parallel if and only if the hosts affected by tasks already running does not intersect with the hosts that would be affected by the task in question. If concurrency_mode is not specified or left empty, no task will start before the previous one has finished. | `null` | -| `max_parallel_tasks` | | `null` | -| `oidc_providers` | OpenID provider settings. You can provide multiple OpenID providers. More about OpenID configuration read in [OpenID](https://docs.semaphoreui.com/administration-guide/openid/). | `null` | -| `password_login_disable` | Disable login with using password. Only LDAP and OpenID. | `false` | -| `non_admin_can_create_project` | Allow non-admin users to create new projects. | `false` | -| `service.http.enabled` | | `true` | -| `service.http.ports.http.port` | | `80` | -| `service.http.ports.http.targetPort` | | `3000` | -| `volumes` | | `[{"name": "config", "secret": {"secretName": "ansible-semaphore-config", "optional": false}}]` | -| `volumeMounts` | | `[{"name": "config", "mountPath": "/etc/semaphore", "readOnly": true}]` | - - - - - diff --git a/charts/ansible-semaphore/templates/base.tpl b/charts/ansible-semaphore/templates/base.tpl deleted file mode 100644 index 30c9b59..0000000 --- a/charts/ansible-semaphore/templates/base.tpl +++ /dev/null @@ -1 +0,0 @@ -{{ include "lib.all" . }} diff --git a/charts/ansible-semaphore/templates/config.tpl b/charts/ansible-semaphore/templates/config.tpl deleted file mode 100644 index bd3f5b6..0000000 --- a/charts/ansible-semaphore/templates/config.tpl +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: ansible-semaphore-config - namespace: {{- .Values.namespace }} - labels: - {{- include "lib.labels" . | nindent 4}} -type: Opauge -data: - config.json: {{ toJson .Values.config | b64enc }} diff --git a/charts/ansible-semaphore/values.yaml b/charts/ansible-semaphore/values.yaml deleted file mode 100644 index 4d72333..0000000 --- a/charts/ansible-semaphore/values.yaml +++ /dev/null @@ -1,64 +0,0 @@ -image: - repository: ansiblesemaphore/semaphore - -config: - bolt: - host: # Path to the BoltDB database file - mysql: - host: # MySQL database host - name: # MySQL database (schema) name - user: # MySQL user name - pass: # MySQL user's password - postgres: - host: # Postgres database host - name: # Postgres database (schema) name - user: # Postgres user name - pass: # Postgres user's password - dialect: bolt # Can be mysql, postgres or bolt - port: 3000 # TCP port on which the web interface will be available. Default: 3000 - interface: # Useful if your server has multiple network interfaces - tmp_path: /tmp/semaphore # Path to directory where cloned repositories and generated files are stored. Default: /tmp/semaphore - access_key_encryption: # Secret key used for encrypting access keys in database. Read more in [Database encryption reference](https://docs.semaphoreui.com/administration-guide/security#database-encryption). - web_host: # Can be useful if you want to use Semaphore by the subpath, for example: http://yourdomain.com/semaphore. Do not add a trailing /. - email_sender: - email_host: - email_port: - email_secure: - email_username: - email_password: - email_alert: - telegram_alert: - slack_alert: # Set to True to enable pushing alerts to slack. It should be used in combination with slack_url - slack_url: # The slack webhook url. Semaphore will used it to POST Slack formatted json alerts to the provided url - rocketchat_alert: # Set to True to enable pushing alerts to Rocket.Chat. It should be used in combination with rocketchat_url. Available since v2.9.56. - rocketchat_url: # The rocketchat webhook url. Semaphore will used it to POST Rocket.Chat formatted json alerts to the provided url. Available since v2.9.56. - ldap_enable: - ldap_needtls: - ldap_binddn: - ldap_bindpassword: - ldap_server: - ldap_searchdn: - concurrency_mode: # Can be unset/empty or project or node. When set to project, tasks will run in parallel if and only if they do not share the same project id, with no regard to the nodes/hosts that are affected. When set to node, a task will run in parallel if and only if the hosts affected by tasks already running does not intersect with the hosts that would be affected by the task in question. If concurrency_mode is not specified or left empty, no task will start before the previous one has finished. -max_parallel_tasks: -oidc_providers: # OpenID provider settings. You can provide multiple OpenID providers. More about OpenID configuration read in [OpenID](https://docs.semaphoreui.com/administration-guide/openid/). -password_login_disable: false # Disable login with using password. Only LDAP and OpenID. -non_admin_can_create_project: false # Allow non-admin users to create new projects. - -service: - http: - enabled: true - ports: - http: - port: 80 - targetPort: 3000 - -volumes: - - name: config - secret: - secretName: ansible-semaphore-config - optional: false - -volumeMounts: - - name: config - mountPath: /etc/semaphore - readOnly: true diff --git a/charts/semaphoreui/templates/config.tpl b/charts/semaphoreui/templates/config.tpl index b41fd20..0618960 100644 --- a/charts/semaphoreui/templates/config.tpl +++ b/charts/semaphoreui/templates/config.tpl @@ -8,3 +8,9 @@ metadata: type: Opauge data: config.json: {{ toJson .Values.config | b64enc }} + {{- with .Values.packages }} + packages.txt: {{ . | b64enc }} + {{- end }} + {{- with .Values.requirements }} + requirements.txt: {{ . | b64enc }} + {{- end }} diff --git a/charts/semaphoreui/templates/entrypoint.sh b/charts/semaphoreui/templates/entrypoint.sh index 7d8baf4..b9622bb 100644 --- a/charts/semaphoreui/templates/entrypoint.sh +++ b/charts/semaphoreui/templates/entrypoint.sh @@ -10,17 +10,17 @@ data: #!/bin/sh echo "creating /etc/semaphore/config.json" cp /var/semaphoreui-secret/config.json /etc/semaphore/config.json - if test -f /etc/semaphore/packages.txt; then + if test -f /var/semaphoreui-secret/packages.txt; then echo "Installing additional system dependencies" apk add --no-cache --upgrade \ - $(cat /etc/semaphore/packages.txt | xargs) + $(cat /var/semaphoreui-secret/packages.txt | xargs) else echo "No additional system dependencies to install" fi - if test -f /etc/semaphore/requirements.txt; then + if test -f /var/semaphoreui-secret/requirements.txt; then echo "Installing additional python dependencies" pip3 install --upgrade \ - -r /etc/semaphore/requirements.txt + -r /var/semaphoreui-secret//requirements.txt else echo "No additional python dependencies to install" fi