Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Aries0d0f committed Apr 1, 2024
1 parent 1a22784 commit d3b4b71
Show file tree
Hide file tree
Showing 45 changed files with 2,552 additions and 31 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/values.template
Original file line number Diff line number Diff line change
Expand Up @@ -115,29 +115,6 @@ db:
internal:
enabled: true

## @section Helper parameters
## @descriptionStart
## Control the DB Helper behaviors.
## @descriptionEnd
##

## @param db.helpers.init.dbs.enabled Enable dbs init feature
## @param db.helpers.init.dbs.installPgroongaExtensions Install pgroonga extensions
## @param db.helpers.init.attack.enabled Enable attack-datasets feature
##
helpers:
init:
dbs:
enabled: true
## @skip db.helpers.init.dbs.forceProvision
## Force provision the DB
## !!! DO NOT CHANGE IF YOU DON'T KNOW WHAT YOU ARE DOING !!!
##
forceProvision: false
installPgroongaExtensions: true
attack:
enabled: true

## @section Internal PostgreSQL database provisioning parameters
## @descriptionStart
## Leave as default if using external DB
Expand Down
4 changes: 2 additions & 2 deletions charts/agh2/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ Create the name of the service account to use
{{/*
Return DB connection string
Usage:
{{ include "connection-string" (dict "db" (merge .Values.path.to.secret.db .Values.db.connection) "context" $) }}
{{ include "db-connection-string" (dict "db" (merge .Values.path.to.secret.db .Values.db.connection) "context" $) }}
*/}}
{{- define "connection-string" -}}
{{- define "db-connection-string" -}}

{{- $iDBHost := printf "db.%v.svc.cluster.local" .context.Release.Namespace }}
{{- $connStr := printf "%v://%v:%v@%v:%v/%v"
Expand Down
2 changes: 1 addition & 1 deletion charts/agh2/templates/captain/captain-db-secret.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
{{- include "AGH2.labels" . | nindent 4 }}
stringData:
DB_CONN_STR: {{ include "connection-string"
DB_CONN_STR: {{ include "db-connection-string"
(
dict
"db" (
Expand Down
2 changes: 1 addition & 1 deletion charts/agh2/templates/captain/captain-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
value: "redis://redis.$(NAMESPACE).svc.cluster.local:6379/0"
{{- end }}
{{- if .Values.core.enabled }}
- name: CORE_URL
- name: CONTROLLER_URL
value: "core.$(NAMESPACE).svc.cluster.local:50005"
{{- end }}
{{- if .Values.exploitmgr.enabled }}
Expand Down
2 changes: 1 addition & 1 deletion charts/agh2/templates/core/core-db-secret.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
{{- include "AGH2.labels" . | nindent 4 }}
stringData:
DB_CONN_STR: {{ include "connection-string"
DB_CONN_STR: {{ include "db-connection-string"
(
dict
"db" (
Expand Down
2 changes: 1 addition & 1 deletion charts/agh2/templates/core/core-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ spec:
secretKeyRef:
name: {{ .Values.core.secret.db.secretName }}
key: "DB_CONN_STR"
- name: CORE_URL
- name: CONTROLLER_URL
value: "core.$(NAMESPACE).svc.cluster.local:50005"
- name: REGISTRY_URL
value: {{ required "at least one of core.env.REGISTRY_URL or global.imageRegistry is required" (coalesce .Values.core.env.REGISTRY_URL .Values.global.imageRegistry) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
{{- include "AGH2.labels" . | nindent 4 }}
stringData:
DB_CONN_STR: {{ include "connection-string"
DB_CONN_STR: {{ include "db-connection-string"
(
dict
"db" (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.core.enabled }}
- name: CORE_URL
- name: CONTROLLER_URL
value: "core.$(NAMESPACE).svc.cluster.local:50005"
{{- end }}
- name: DB_Conn
Expand Down
15 changes: 15 additions & 0 deletions charts/agh3/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 15.1.4
- name: minio
repository: https://charts.bitnami.com/bitnami
version: 14.1.3
- name: rabbitmq
repository: https://charts.bitnami.com/bitnami
version: 13.0.0
- name: common
repository: https://charts.bitnami.com/bitnami
version: 2.19.1
digest: sha256:89352e5b7447c0db101f5f63a4841b5878795f54bc8b641b8b69c76756a80292
generated: "2024-04-01T18:56:39.665948+08:00"
40 changes: 40 additions & 0 deletions charts/agh3/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: v2
name: agh3
description: A Helm chart for ArgusHack3

# 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: 3.0.0

# 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: "240328"
dependencies:
- name: postgresql
version: 15.1.4
repository: https://charts.bitnami.com/bitnami
condition: db.internal.enabled
- name: minio
version: 14.1.3
repository: https://charts.bitnami.com/bitnami
condition: minio.internal.enabled
- name: rabbitmq
version: 13.0.0
repository: https://charts.bitnami.com/bitnami
condition: rabbitmq.internal.enabled
- name: common
version: 2.19.1
repository: https://charts.bitnami.com/bitnami
250 changes: 250 additions & 0 deletions charts/agh3/README.md

Large diffs are not rendered by default.

Loading

0 comments on commit d3b4b71

Please sign in to comment.