diff --git a/9c-internal/9c-claim-items-test/values.yaml b/9c-internal/9c-claim-items-test/values.yaml index 3ee207136..9c5b8eaae 100644 --- a/9c-internal/9c-claim-items-test/values.yaml +++ b/9c-internal/9c-claim-items-test/values.yaml @@ -23,7 +23,9 @@ global: resetSnapshot: true rollbackSnapshot: false - useExternalSecret: true + +externalSecret: + enabled: true snapshot: downloadSnapshot: true diff --git a/9c-internal/9c-network/values.yaml b/9c-internal/9c-network/values.yaml index 30853da39..3dbea67d8 100644 --- a/9c-internal/9c-network/values.yaml +++ b/9c-internal/9c-network/values.yaml @@ -23,7 +23,9 @@ global: resetSnapshot: true rollbackSnapshot: false - useExternalSecret: true + +externalSecret: + enabled: true snapshot: downloadSnapshot: true @@ -111,6 +113,7 @@ remoteHeadless: dataProvider: enabled: true + migrateDatabase: true storage: data: 1000Gi diff --git a/9c-internal/9c-single/application.yaml b/9c-internal/9c-single/application.yaml index f320c2cae..3ba3e69c7 100644 --- a/9c-internal/9c-single/application.yaml +++ b/9c-internal/9c-single/application.yaml @@ -8,7 +8,7 @@ spec: source: repoURL: https://github.com/planetarium/9c-infra.git targetRevision: main - path: charts/validator + path: charts/all-in-one helm: valueFiles: - ../../9c-internal/9c-single/values.yaml diff --git a/9c-internal/9c-single/values.yaml b/9c-internal/9c-single/values.yaml index cebefc3a5..67b2d1fd4 100644 --- a/9c-internal/9c-single/values.yaml +++ b/9c-internal/9c-single/values.yaml @@ -4,73 +4,203 @@ clusterName: "9c-internal-v2" -logLevel: "" -namespace: "9c-single" +logLevel: "debug" + +global: + image: + repository: planetariumhq/ninechronicles-headless + tag: "git-2fc735ec02d4d4e9ea4abb2000d34f0a491412de" + + appProtocolVersion: "200071/AB2da648b9154F2cCcAFBD85e0Bc3d51f97330Fc/MEUCIQCjmCK+qUHtgiVfmFIO+uBw.mI4Kpj9T20U4xdIK8I+MgIgSZPL7qAAplhILfRgXwUSDjjfQgQ7A8jgGNqzwDe+h3I=/ZHU5OnRpbWVzdGFtcHUxMDoyMDIzLTA5LTAxZQ==" + genesisBlockPath: "http://54.91.246.32:38080/genesis-block" + trustedAppProtocolVersionSigner: "030ffa9bd579ee1503ce008394f687c182279da913bfaec12baca34e79698a7cd1" + + peerStrings: + - "0204e015dc185b0eb0b6bdbca5a5ca220525749353f303a343273a4812f53dc4ae,validator-5.9c-single.svc.cluster.local,31234" + + iceServers: [] + + networkType: Default + consensusType: pbft + + resetSnapshot: false + slackToken: "" + slackWebHookUrl: "" -appProtocolVersion: "200071/AB2da648b9154F2cCcAFBD85e0Bc3d51f97330Fc/MEUCIQCjmCK+qUHtgiVfmFIO+uBw.mI4Kpj9T20U4xdIK8I+MgIgSZPL7qAAplhILfRgXwUSDjjfQgQ7A8jgGNqzwDe+h3I=/ZHU5OnRpbWVzdGFtcHUxMDoyMDIzLTA5LTAxZQ==" -genesisBlockPath: "http://54.91.246.32:38080/genesis-block" -trustedAppProtocolVersionSigner: "030ffa9bd579ee1503ce008394f687c182279da913bfaec12baca34e79698a7cd1" +externalSecret: + enabled: true + prefix: "9c-single" -peerStrings: -- "0204e015dc185b0eb0b6bdbca5a5ca220525749353f303a343273a4812f53dc4ae,localhost,31234" +snapshot: + downloadSnapshot: false + fullSnapshot: + enabled: false + suspend: false + partitionReset: + enabled: false + suspend: false + partition: + enabled: true + suspend: true + slackChannel: "bot-test" + image: "planetariumhq/ninechronicles-snapshot:git-fc194ebdc47ec4ebe14f97f5ea01ff97b0a276d6" + + # aws information for uploading snapshot + # Do not upload values below filled + # recommended to obtain from ExternalSecret + cfDistributionId: "" + aws_access_key_id: "" + aws_secret_access_key: "" + + path: "9c-single" + + resources: + requests: + cpu: 1300m + memory: 20Gi + + nodeSelector: {} -iceServers: [] +# if you want to delete PVC with the volume provisioned together, set this value "Delete" +volumeReclaimPolicy: "Delete" -networkType: Default -consensusType: pbft +seed: + count: 0 + useTurnServer: false + image: + repository: planetariumhq/libplanet-seed + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. + tag: "git-4713179b64e5eeb0ea617768d5acccbb9a289617" -slackToken: "" -slackWebHookUrl: "" + hosts: + - "9c-main-tcp-seed-1.planetarium.dev" -# if you want to delete PVC with the volume provisioned together, set this value "Delete" -volumeReclaimPolicy: "Retain" + ports: + node: 31234 + gossip: 31235 + graphql: 31237 -snapshot: - enabled: false - path: "internal" + # dotnet args + workerCount: 1000 -externalSecret: - enabled: true - prefix: "9c-single" + extraArgs: [] + # - --key=val + + # enter private keys if not using External Secrets + privateKeys: [] + # - "private key" -count: 1 -image: - repository: planetariumhq/ninechronicles-headless - pullPolicy: Always - # Overrides the image tag whose default is the chart appVersion. - tag: "git-2fc735ec02d4d4e9ea4abb2000d34f0a491412de" + env: [] -consensusSeedStrings: -- "0204e015dc185b0eb0b6bdbca5a5ca220525749353f303a343273a4812f53dc4ae,localhost,6000" + resources: + requests: + cpu: 1 -hosts: -- "9c-single-validator-1.nine-chronicles.com" + nodeSelector: {} + tolerations: [] + affinity: {} -ports: - headless: 31234 - graphql: 80 - gossip: 6000 +validator: + count: 1 + image: + repository: "" + # Overrides the image tag whose default is the chart appVersion. + tag: "" + pullPolicy: Always -# dotnet args + consensusSeedStrings: + - "0204e015dc185b0eb0b6bdbca5a5ca220525749353f303a343273a4812f53dc4ae,localhost,6000" -extraArgs: [] -# - --key=val + hosts: + - "9c-single-validator-1.nine-chronicles.com" -# private keys if not using External Secrets -privateKeys: [] -# - "" + ports: + headless: 31234 + graphql: 80 + gossip: 6000 -storage: - class: "9c-network-gp3" - data: 500Gi + # dotnet args -env: [] + extraArgs: [] + # - --key=val -resources: - requests: - cpu: 2 - memory: 4Gi + # private keys if not using External Secrets + privateKeys: [] + # - "" + + storage: + data: 1000Gi + + env: [] + + resources: + requests: + cpu: 2 + memory: 20Gi + + loggingEnabled: false + + nodeSelector: {} + + tolerations: [] + affinity: {} + +remoteHeadless: + count: 0 + +dataProvider: + enabled: true + rwMode: false + render: true + migrateDatabase: false + + storage: + data: 1000Gi + log: 10Gi + + image: + repository: planetariumhq/ninechronicles-dataprovider + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: "git-e396409ff128d5cc3f45555ff57dec669b455b1a" + db: + local: true + database: "" + connectionString: "" + host: "" + port: 3306 + user: user + password: "" + + resources: {} + + nodeSelector: {} + +worldBoss: + enabled: true + ports: + targetPort: 5000 + + image: + repository: planetariumhq/world-boss-service + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: "git-47519fb4623a6aac808dd24e3947c4b321df923c" + + db: + local: true + size: 5Gi + + worldBossEnv: + databaseUrl: "" + redisHost: "" + redisPort: "" + kmsKeyId: "" + slackToken: "" + celeryBrokerUrl: "" + celeryResultBackend: "" + slackSigningSecret: "" + + nodeSelector: + node.kubernetes.io/instance-type: m5d.xlarge -nodeSelector: {} -tolerations: [] -affinity: {} diff --git a/9c-main/9c-network/values.yaml b/9c-main/9c-network/values.yaml index 29d3612d5..6e5dc9295 100644 --- a/9c-main/9c-network/values.yaml +++ b/9c-main/9c-network/values.yaml @@ -30,7 +30,9 @@ global: resetSnapshot: false rollbackSnapshot: false - useExternalSecret: true + +externalSecret: + enabled: true snapshot: slackChannel: "9c-mainnet" diff --git a/charts/all-in-one/scripts/data-provider/setup_internal_db.sh b/charts/all-in-one/scripts/data-provider/setup_internal_db.sh index 8b740322e..36c0e8b8c 100644 --- a/charts/all-in-one/scripts/data-provider/setup_internal_db.sh +++ b/charts/all-in-one/scripts/data-provider/setup_internal_db.sh @@ -8,9 +8,9 @@ apt-get -y install default-mysql-client HOME="/app" NC_MySqlConnectionString="$1" NC_MySqlConnectionString+="Allow User Variables=true" -RESET_SNAPSHOT_OPTION=$2 +MIGRATE_DB_OPTION=$2 -if $RESET_SNAPSHOT_OPTION +if $MIGRATE_DB_OPTION then /root/.dotnet/tools/dotnet-ef database update --project /app/NineChronicles.DataProvider/NineChronicles.DataProvider.Executable --connection "$NC_MySqlConnectionString" fi diff --git a/charts/all-in-one/scripts/snapshots/partition/preload_headless.sh b/charts/all-in-one/scripts/snapshots/partition/preload_headless.sh index 67ac47d42..17e7a5d9d 100644 --- a/charts/all-in-one/scripts/snapshots/partition/preload_headless.sh +++ b/charts/all-in-one/scripts/snapshots/partition/preload_headless.sh @@ -43,6 +43,10 @@ function waitpid() { } function run_headless() { + if [ ! -d "$STORE_PATH" ]; then + mkdir -p "$STORE_PATH" + fi + chmod 777 -R "$STORE_PATH" "$HEADLESS" \ diff --git a/charts/all-in-one/templates/configmap-data-provider.yaml b/charts/all-in-one/templates/configmap-data-provider.yaml index 1461d90d1..04eb06c58 100644 --- a/charts/all-in-one/templates/configmap-data-provider.yaml +++ b/charts/all-in-one/templates/configmap-data-provider.yaml @@ -2,12 +2,12 @@ apiVersion: v1 kind: ConfigMap metadata: - name: 9c-network-data-provider-script + name: {{ $.Release.Name }}-data-provider-script namespace: {{ $.Release.Name }} labels: app.kubernetes.io/instance: {{ $.Release.Name }} data: check_chain_tip.sh: |- {{ tpl (.Files.Get "scripts/data-provider/check_chain_tip.sh") . | nindent 4 }} - {{- if eq $.Values.global.networkType "Internal" }} + {{- if ne $.Values.global.networkType "Main" }} setup_internal_db.sh: |- {{ tpl (.Files.Get "scripts/data-provider/setup_internal_db.sh") . | nindent 4 }} {{- end }} diff --git a/charts/all-in-one/templates/data-provider.yaml b/charts/all-in-one/templates/data-provider.yaml index 68b4ea82b..4e77d81ec 100644 --- a/charts/all-in-one/templates/data-provider.yaml +++ b/charts/all-in-one/templates/data-provider.yaml @@ -412,7 +412,7 @@ spec: echo Ready containers: - args: - - /bin/setup_internal_db.sh "$(NC_MySqlConnectionString)" "$(RESET_SNAPSHOT_OPTION)" + - /bin/setup_internal_db.sh "$(NC_MySqlConnectionString)" "$(MIGRATE_DB_OPTION)" && /app/NineChronicles.DataProvider.Executable command: - /bin/sh @@ -472,6 +472,8 @@ spec: name: data-provider - name: RESET_SNAPSHOT_OPTION value: "{{ $.Values.global.resetSnapshot }}" + - name: MIGRATE_DB_OPTION + value: "{{ $.Values.dataProvider.migrateDatabase }}" image: {{ $.Values.dataProvider.image.repository }}:{{ $.Values.dataProvider.image.tag }} imagePullPolicy: {{ $.Values.dataProvider.image.pullPolicy }} livenessProbe: diff --git a/charts/all-in-one/templates/secret-aws-keys.yaml b/charts/all-in-one/templates/secret-aws-keys.yaml index 1ac36efe3..f6296c8bc 100644 --- a/charts/all-in-one/templates/secret-aws-keys.yaml +++ b/charts/all-in-one/templates/secret-aws-keys.yaml @@ -1,4 +1,4 @@ -{{ if .Values.global.useExternalSecret }} +{{ if .Values.externalSecret.enabled }} apiVersion: "external-secrets.io/v1beta1" kind: ExternalSecret metadata: @@ -16,7 +16,11 @@ spec: creationPolicy: Owner dataFrom: - extract: + {{- if .Values.externalSecret.prefix }} + key: {{ .Values.externalSecret.prefix }}/aws-keys + {{- else }} key: {{ .Values.clusterName }}/aws-keys + {{- end }} {{ else }} apiVersion: v1 kind: Secret diff --git a/charts/all-in-one/templates/secret-bridge.yaml b/charts/all-in-one/templates/secret-bridge.yaml index 5999615e0..eb8ceaabf 100644 --- a/charts/all-in-one/templates/secret-bridge.yaml +++ b/charts/all-in-one/templates/secret-bridge.yaml @@ -1,5 +1,5 @@ {{ if .Values.bridge.enabled }} -{{ if .Values.global.useExternalSecret }} +{{ if .Values.externalSecret.enabled }} apiVersion: "external-secrets.io/v1beta1" kind: ExternalSecret metadata: @@ -17,7 +17,11 @@ spec: creationPolicy: Owner dataFrom: - extract: + {{- if .Values.externalSecret.prefix }} + key: {{ .Values.externalSecrets.prefix }}/bridge + {{- else }} key: {{ .Values.clusterName }}/bridge + {{- end }} {{ else }} apiVersion: v1 kind: Secret diff --git a/charts/all-in-one/templates/secret-data-provider.yaml b/charts/all-in-one/templates/secret-data-provider.yaml index 4de4b9259..5ccd4d9d7 100644 --- a/charts/all-in-one/templates/secret-data-provider.yaml +++ b/charts/all-in-one/templates/secret-data-provider.yaml @@ -1,5 +1,5 @@ {{ if .Values.dataProvider.enabled }} -{{ if .Values.global.useExternalSecret }} +{{ if .Values.externalSecret.enabled }} apiVersion: "external-secrets.io/v1beta1" kind: ExternalSecret metadata: @@ -17,7 +17,11 @@ spec: creationPolicy: Owner dataFrom: - extract: + {{- if .Values.externalSecret.prefix }} + key: {{ .Values.externalSecret.prefix }}/data-provider + {{- else }} key: {{ .Values.clusterName }}/data-provider + {{- end }} {{ else }} apiVersion: v1 kind: Secret diff --git a/charts/all-in-one/templates/secret-market-db.yaml b/charts/all-in-one/templates/secret-market-db.yaml index 25d3b3244..4f406ec6c 100644 --- a/charts/all-in-one/templates/secret-market-db.yaml +++ b/charts/all-in-one/templates/secret-market-db.yaml @@ -1,5 +1,5 @@ {{ if .Values.marketService.enabled }} -{{ if .Values.global.useExternalSecret }} +{{ if .Values.externalSecret.enabled }} apiVersion: "external-secrets.io/v1beta1" kind: ExternalSecret metadata: @@ -17,7 +17,11 @@ spec: creationPolicy: Owner dataFrom: - extract: + {{- if .Values.externalSecret.prefix }} + key: {{ .Values.externalSecret.prefix }}/market-db + {{- else }} key: {{ .Values.clusterName }}/market-db + {{- end }} {{ else }} apiVersion: v1 kind: Secret diff --git a/charts/all-in-one/templates/secret-patrol-reward.yaml b/charts/all-in-one/templates/secret-patrol-reward.yaml index 158c8e562..ce21cb523 100644 --- a/charts/all-in-one/templates/secret-patrol-reward.yaml +++ b/charts/all-in-one/templates/secret-patrol-reward.yaml @@ -1,5 +1,5 @@ {{ if .Values.patrolRewardService.enabled }} -{{ if .Values.global.useExternalSecret }} +{{ if .Values.externalSecrets.enabled }} apiVersion: "external-secrets.io/v1beta1" kind: ExternalSecret metadata: @@ -17,7 +17,11 @@ spec: creationPolicy: Owner dataFrom: - extract: + {{- if .Values.externalSecret.prefix }} + key: {{ .Values.externalSecret.prefix }}/patrol-reward + {{- else }} key: {{ .Values.clusterName }}/patrol-reward + {{- end }} {{ else }} apiVersion: v1 kind: Secret diff --git a/charts/all-in-one/templates/secret-private-keys.yaml b/charts/all-in-one/templates/secret-private-keys.yaml index c3562463e..211d3b152 100644 --- a/charts/all-in-one/templates/secret-private-keys.yaml +++ b/charts/all-in-one/templates/secret-private-keys.yaml @@ -1,4 +1,4 @@ -{{ if .Values.global.useExternalSecret }} +{{ if .Values.externalSecret.enabled }} apiVersion: "external-secrets.io/v1beta1" kind: ExternalSecret metadata: @@ -16,7 +16,11 @@ spec: creationPolicy: Owner dataFrom: - extract: + {{- if .Values.externalSecret.prefix }} + key: {{ .Values.externalSecret.prefix }}/private-keys + {{- else }} key: {{ .Values.clusterName }}/private-keys + {{- end }} {{ else }} apiVersion: v1 kind: Secret diff --git a/charts/all-in-one/templates/secret-slack-token.yaml b/charts/all-in-one/templates/secret-slack-token.yaml index 86139b931..3497754ad 100644 --- a/charts/all-in-one/templates/secret-slack-token.yaml +++ b/charts/all-in-one/templates/secret-slack-token.yaml @@ -1,4 +1,4 @@ -{{ if .Values.global.useExternalSecret }} +{{ if .Values.externalSecret.enabled }} apiVersion: "external-secrets.io/v1beta1" kind: ExternalSecret metadata: @@ -16,7 +16,11 @@ spec: creationPolicy: Owner dataFrom: - extract: + {{- if .Values.externalSecret.prefix }} + key: {{ .Values.externalSecret.prefix }}/slack + {{- else }} key: {{ .Values.clusterName }}/slack + {{- end }} {{ else }} apiVersion: v1 kind: Secret diff --git a/charts/all-in-one/templates/secret-store.yaml b/charts/all-in-one/templates/secret-store.yaml index 9fd4a89b0..873041302 100644 --- a/charts/all-in-one/templates/secret-store.yaml +++ b/charts/all-in-one/templates/secret-store.yaml @@ -1,4 +1,4 @@ -{{ if .Values.global.useExternalSecret }} +{{ if .Values.externalSecret.enabled }} apiVersion: "external-secrets.io/v1beta1" kind: SecretStore metadata: diff --git a/charts/all-in-one/templates/secret-world-boss.yaml b/charts/all-in-one/templates/secret-world-boss.yaml index 847ff52fe..7d1737366 100644 --- a/charts/all-in-one/templates/secret-world-boss.yaml +++ b/charts/all-in-one/templates/secret-world-boss.yaml @@ -1,5 +1,5 @@ {{ if .Values.worldBoss.enabled }} -{{ if .Values.global.useExternalSecret }} +{{ if .Values.externalSecret.enabled }} apiVersion: "external-secrets.io/v1beta1" kind: ExternalSecret metadata: @@ -17,7 +17,11 @@ spec: creationPolicy: Owner dataFrom: - extract: + {{- if .Values.externalSecret.prefix }} + key: {{ .Values.externalSecret.prefix }}/world-boss-env + {{- else }} key: {{ .Values.clusterName }}/world-boss-env + {{- end }} {{ else }} apiVersion: v1 kind: Secret diff --git a/charts/all-in-one/templates/service.yaml b/charts/all-in-one/templates/service.yaml index 35d02cb9d..92c06af9d 100644 --- a/charts/all-in-one/templates/service.yaml +++ b/charts/all-in-one/templates/service.yaml @@ -335,6 +335,11 @@ metadata: app.kubernetes.io/instance: {{ $.Release.Name }} annotations: service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http + {{- if ne $.Values.global.networkType "Main" }} + service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing + service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip" + service.beta.kubernetes.io/aws-load-balancer-type: "external" + {{- end }} service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-2:319679068466:certificate/4312c1a7-51c4-4442-8ae4-c8f3f2bce4f0 service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: Environment={{- if eq $.Values.clusterName "9c-main-v2" }}production{{- else }}development{{- end }},Team=game,Owner=jihyung,Service={{ $.Release.Name }},Name=world-boss-service @@ -362,6 +367,62 @@ spec: --- {{ end }} +{{- if $.Values.worldBoss.db.local }} + +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: {{ $.Release.Name }} + annotations: + service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http + service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-2:319679068466:certificate/4312c1a7-51c4-4442-8ae4-c8f3f2bce4f0 + service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https + name: world-boss-db + namespace: {{ $.Release.Name }} +spec: + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: postgres + port: 5432 + protocol: TCP + targetPort: 5432 + selector: + app: world-boss-db + type: ClusterIP + +--- + +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: {{ $.Release.Name }} + annotations: + service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http + service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-2:319679068466:certificate/4312c1a7-51c4-4442-8ae4-c8f3f2bce4f0 + service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https + name: world-boss-redis + namespace: {{ $.Release.Name }} +spec: + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - name: redis + port: 6379 + protocol: TCP + targetPort: 6379 + selector: + app: world-boss-redis + type: ClusterIP +--- +{{- end }} + {{ if .Values.marketService.enabled }} apiVersion: v1 kind: Service diff --git a/charts/all-in-one/templates/worldboss-db.yaml b/charts/all-in-one/templates/worldboss-db.yaml new file mode 100644 index 000000000..86427437a --- /dev/null +++ b/charts/all-in-one/templates/worldboss-db.yaml @@ -0,0 +1,91 @@ +{{ if .Values.worldBoss.db.local }} +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app: world-boss-db + app.kubernetes.io/instance: {{ $.Release.Name }} + name: world-boss-db + namespace: {{ $.Release.Name }} +spec: + replicas: 1 + selector: + matchLabels: + app: world-boss-db + serviceName: world-boss-db + template: + metadata: + labels: + app: world-boss-db + spec: + containers: + - env: + - name: POSTGRES_DB + valueFrom: + secretKeyRef: + key: database-name + name: world-boss-env + - name: POSTGRES_PASSWORD + valueFrom: + secretKeyRef: + key: database-password + name: world-boss-env + - name: POSTGRES_USER + valueFrom: + secretKeyRef: + key: database-user + name: world-boss-env + image: postgres:13.3 + name: world-boss-db + ports: + - containerPort: 5432 + volumeMounts: + - mountPath: /var/lib/postgresql + name: world-boss-db-data + restartPolicy: Always + updateStrategy: + type: RollingUpdate + volumeClaimTemplates: + - metadata: + name: world-boss-db-data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ $.Values.worldBoss.db.size }} + storageClassName: {{ $.Release.Name }}-gp3 + volumeMode: Filesystem +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app: world-boss-redis + app.kubernetes.io/instance: {{ $.Release.Name }} + name: world-boss-redis + namespace: {{ $.Release.Name }} +spec: + replicas: 1 + selector: + matchLabels: + app: world-boss-redis + serviceName: world-boss-redis + template: + metadata: + labels: + app: world-boss-redis + spec: + containers: + - args: + - redis-server + - --appendonly + - "yes" + image: redis:6.2 + name: world-boss-redis + ports: + - containerPort: 6379 + restartPolicy: Always + updateStrategy: + type: RollingUpdate +{{- end }} diff --git a/charts/all-in-one/templates/worldboss.yaml b/charts/all-in-one/templates/worldboss.yaml index af4b2759a..017880a30 100644 --- a/charts/all-in-one/templates/worldboss.yaml +++ b/charts/all-in-one/templates/worldboss.yaml @@ -5,9 +5,9 @@ metadata: annotations: eks.amazonaws.com/role-arn: arn:aws:iam::319679068466:role/9c-onboarding-eks labels: - app.kubernetes.io/instance: {{ $.Chart.Name }} - name: {{ $.Chart.Name }}-onboarding-iam-role - namespace: {{ $.Chart.Name }} + app.kubernetes.io/instance: {{ $.Release.Name }} + name: {{ $.Release.Name }}-onboarding-iam-role + namespace: {{ $.Release.Name }} --- @@ -16,9 +16,9 @@ kind: StatefulSet metadata: labels: app: world-boss-service - app.kubernetes.io/instance: {{ $.Chart.Name }} + app.kubernetes.io/instance: {{ $.Release.Name }} name: world-boss-service - namespace: {{ $.Chart.Name }} + namespace: {{ $.Release.Name }} spec: podManagementPolicy: OrderedReady replicas: 1 @@ -87,8 +87,8 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} restartPolicy: Always - serviceAccount: {{ $.Chart.Name }}-onboarding-iam-role - serviceAccountName: {{ $.Chart.Name }}-onboarding-iam-role + serviceAccount: {{ $.Release.Name }}-onboarding-iam-role + serviceAccountName: {{ $.Release.Name }}-onboarding-iam-role updateStrategy: type: RollingUpdate @@ -99,9 +99,9 @@ kind: StatefulSet metadata: labels: app: world-boss-worker - app.kubernetes.io/instance: {{ $.Chart.Name }} + app.kubernetes.io/instance: {{ $.Release.Name }} name: world-boss-worker - namespace: {{ $.Chart.Name }} + namespace: {{ $.Release.Name }} spec: podManagementPolicy: OrderedReady replicas: 1 @@ -170,8 +170,8 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} restartPolicy: Always - serviceAccount: {{ $.Chart.Name }}-onboarding-iam-role - serviceAccountName: {{ $.Chart.Name }}-onboarding-iam-role + serviceAccount: {{ $.Release.Name }}-onboarding-iam-role + serviceAccountName: {{ $.Release.Name }}-onboarding-iam-role updateStrategy: type: RollingUpdate {{ end }} diff --git a/charts/all-in-one/values.yaml b/charts/all-in-one/values.yaml index 3c6ef1dfd..78e1d9df0 100644 --- a/charts/all-in-one/values.yaml +++ b/charts/all-in-one/values.yaml @@ -29,6 +29,10 @@ global: slackToken: "" slackWebHookUrl: "" +externalSecret: + enabled: false + prefix: "" + snapshot: downloadSnapshot: false fullSnapshot: @@ -191,6 +195,7 @@ dataProvider: enabled: false rwMode: false render: true + migrateDatabase: false storage: data: 1000Gi @@ -203,6 +208,7 @@ dataProvider: tag: "v200010-1" db: local: false + storage: 100Gi database: "" connectionString: "" host: "" @@ -299,6 +305,10 @@ worldBoss: # Overrides the image tag whose default is the chart appVersion. tag: "git-47519fb4623a6aac808dd24e3947c4b321df923c" + db: + local: false + size: 5Gi + worldBossEnv: databaseUrl: "" redisHost: ""