feat: helmfileify rabbitmq

This commit is contained in:
2025-06-24 11:30:55 +02:00
parent 0cfb1bdef8
commit bba55ef84c
14 changed files with 107 additions and 189 deletions
+45
View File
@@ -0,0 +1,45 @@
{{- if eq .Values.rabbitmq.env "prod" }}
apiVersion: v1
kind: Service
metadata:
name: prod-rabbitmq-nodeport
namespace: rabbitmq
spec:
ports:
- name: amqp
nodePort: 30672
port: 5672
protocol: TCP
targetPort: 5672
- name: amqp-http
nodePort: 30673
port: 15672
protocol: TCP
targetPort: 15672
selector:
app.kubernetes.io/instance: prod-rabbitmq
app.kubernetes.io/name: rabbitmq
type: NodePort
{{- else if eq .Values.rabbitmq.env "staging" }}
apiVersion: v1
kind: Service
metadata:
name: staging-rabbitmq-nodeport
namespace: rabbitmq
spec:
ports:
- name: amqp
nodePort: 31672
port: 5672
protocol: TCP
targetPort: 5672
- name: amqp-http
nodePort: 31673
port: 15672
protocol: TCP
targetPort: 15672
selector:
app.kubernetes.io/instance: staging-rabbitmq
app.kubernetes.io/name: rabbitmq
type: NodePort
{{- end }}
+12 -14
View File
@@ -1,9 +1,8 @@
{{- if .Values.clusterConfig.argo.enabled }}
{{- range .Values.rabbitmq.envs }}
{{ if .Values.clusterConfig.argo.enabled }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: {{ . }}-rabbitmq
name: {{ .Values.rabbitmq.env }}-rabbitmq
namespace: argocd
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
@@ -11,30 +10,29 @@ metadata:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: {{ . }}-rabbitmq
server: 'https://kubernetes.default.svc'
namespace: {{ .Values.rabbitmq.env }}-rabbitmq
server: https://kubernetes.default.svc
project: rabbitmq
sources:
- repoURL: {{ .Values.clusterConfig.manifests }}
targetRevision: HEAD
path: helmfiles/rabbitmq
path: helmfile.d
plugin:
name: helmfile
name: helmfile-cmp
env:
- name: CLUSTER_NAME
value: {{ .Values.clusterConfig.cluster }}
project: aux
- name: HELMFILE_ENVIRONMENT
value: {{ .Values.rabbitmq.env }}
- name: HELMFILE_FILE_PATH
value: rabbitmq.yaml.gotmpl
syncPolicy:
managedNamespaceMetadata:
labels:
component: aux
syncOptions:
- CreateNamespace=true
- ApplyOutOfSyncOnly=true
# - ServerSideApply=true
{{- if .Values.rabbitmq.autosync }}
automated:
prune: true
# selfHeal: false
selfHeal: false
{{- end }}
{{- end }}
{{- end }}