From 0cfacd89357e8d751a346052e74f88ce375f41f0212e56e29375c9cda05c4069 Mon Sep 17 00:00:00 2001 From: raven <7156279+RavenX8@users.noreply.github.com> Date: Thu, 20 Mar 2025 17:30:21 -0400 Subject: [PATCH] - update: charts to make more sense in what the settings do --- charts/osirose-new/templates/deployment.yaml | 6 ++++ charts/osirose-new/templates/ingress.yaml | 2 +- charts/osirose-new/templates/service.yaml | 18 ++++++---- charts/osirose-new/values.yaml | 37 ++++++-------------- 4 files changed, 30 insertions(+), 33 deletions(-) diff --git a/charts/osirose-new/templates/deployment.yaml b/charts/osirose-new/templates/deployment.yaml index 7398522..6b79f98 100644 --- a/charts/osirose-new/templates/deployment.yaml +++ b/charts/osirose-new/templates/deployment.yaml @@ -5,6 +5,12 @@ metadata: name: {{ .name }} labels: app: {{ .name }} + {{- if .annotations }} + annotations: + {{- range $key, $value := .annotations }} + {{ $key }}: "{{ $value }}" + {{- end }} + {{- end }} spec: replicas: {{ .replicas }} selector: diff --git a/charts/osirose-new/templates/ingress.yaml b/charts/osirose-new/templates/ingress.yaml index f00b698..a98f3ab 100644 --- a/charts/osirose-new/templates/ingress.yaml +++ b/charts/osirose-new/templates/ingress.yaml @@ -1,5 +1,5 @@ {{- range .Values.services }} -{{- if .ingress.enabled }} +{{- if .ingress }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: diff --git a/charts/osirose-new/templates/service.yaml b/charts/osirose-new/templates/service.yaml index 15d8cd7..b8f07a4 100644 --- a/charts/osirose-new/templates/service.yaml +++ b/charts/osirose-new/templates/service.yaml @@ -1,18 +1,24 @@ {{- range .Values.services }} -{{- if .tcp.enabled }} +{{- if .service }} apiVersion: v1 kind: Service metadata: name: {{ .name }} labels: app: {{ .name }} + {{- if .service.annotations }} + annotations: + {{- range $key, $value := .service.annotations }} + {{ $key }}: "{{ $value }}" + {{- end }} + {{- end }} spec: - type: {{ .tcp.type | default "ClusterIP" }} + type: {{ .service.type | default "ClusterIP" }} ports: - - name: {{ .tcp.portName | default "tcp" }} - port: {{ .tcp.port }} - targetPort: {{ .tcp.targetPort | default .tcp.port }} - protocol: {{ .tcp.protocol | default "TCP" }} + - name: {{ .service.portName | default "tcp" }} + port: {{ .service.port }} + targetPort: {{ .service.targetPort | default .service.port }} + protocol: {{ .service.protocol | default "TCP" }} selector: app: {{ .name }} {{- end }} diff --git a/charts/osirose-new/values.yaml b/charts/osirose-new/values.yaml index 5b36ccd..15af58e 100644 --- a/charts/osirose-new/values.yaml +++ b/charts/osirose-new/values.yaml @@ -19,8 +19,7 @@ services: port: 8080 env: SERVICE_PORT: 8080 - tcp: - enabled: true + service: type: LoadBalancer portName: api-service port: 8080 @@ -38,14 +37,11 @@ services: port: 50051 env: SERVICE_PORT: 50051 - tcp: - enabled: true + service: portName: auth-service port: 50051 targetPort: 50051 protocol: TCP - ingress: - enabled: false - name: character-service replicas: 1 @@ -53,14 +49,13 @@ services: port: 50053 env: SERVICE_PORT: 50053 - tcp: - enabled: true + service: + annotations: + name: "AZG Studio" portName: character-service port: 50053 targetPort: 50053 protocol: TCP - ingress: - enabled: false - name: database-service replicas: 1 @@ -68,14 +63,11 @@ services: port: 50052 env: SERVICE_PORT: 50052 - tcp: - enabled: true + service: portName: database-service port: 50052 targetPort: 50052 protocol: TCP - ingress: - enabled: false - name: packet-service replicas: 1 @@ -83,15 +75,12 @@ services: port: 29000 env: SERVICE_PORT: 29000 - tcp: - enabled: true + service: type: LoadBalancer portName: game-packet-service port: 29000 targetPort: 29000 protocol: TCP - ingress: - enabled: false - name: session-service replicas: 1 @@ -99,14 +88,11 @@ services: port: 50055 env: SERVICE_PORT: 50055 - tcp: - enabled: true + service: portName: session-service port: 50055 targetPort: 50055 protocol: TCP - ingress: - enabled: false - name: world-service replicas: 1 @@ -114,14 +100,13 @@ services: port: 50054 env: SERVICE_PORT: 50054 - tcp: - enabled: true + service: + annotations: + name: "Athena" portName: world-service port: 50054 targetPort: 50054 protocol: TCP - ingress: - enabled: false tests: enabled: false