Commit fb168c4d authored by George Papathanail's avatar George Papathanail
Browse files

chore(srm): remove MongoDB from the SRM subchart

parent 32670fa0
Loading
Loading
Loading
Loading
+0 −9
Changes for environments/kind/values.yaml: 0 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -8,15 +8,6 @@
# ====================================================================

srm:
  mongodb:
    persistence:
      storageClass: manual
      hostPath:
        enabled: true
        path: /mnt/data/mongodb_srm
      createPV: true
    image:
      pullPolicy: IfNotPresent
  srmcontroller:
    service:
      type: NodePort
+1 −2
Changes for oop-platform-chart/charts/srm/Chart.yaml: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
apiVersion: v2
name: srm
description: A Helm chart for SRM (Service Resource Manager) with MongoDB
description: A Helm chart for SRM (Service Resource Manager)
type: application
version: 1.0.0
appVersion: "1.0.1"
keywords:
  - srm
  - mongodb
  - sunrise
maintainers:
  - name: DevOps Team
 No newline at end of file
+0 −18
Changes for oop-platform-chart/charts/srm/templates/_helpers.tpl: 0 added lines, 18 removed lines.
Original line number Diff line number Diff line
@@ -51,24 +51,6 @@ app.kubernetes.io/name: {{ include "srm.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
MongoDB labels
*/}}
{{- define "srm.mongodb.labels" -}}
helm.sh/chart: {{ include "srm.chart" . }}
{{ include "srm.mongodb.selectorLabels" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
MongoDB selector labels
*/}}
{{- define "srm.mongodb.selectorLabels" -}}
app.kubernetes.io/name: {{ .Values.mongodb.name }}
app.kubernetes.io/instance: {{ .Release.Name }}
io.kompose.service: {{ .Values.mongodb.name }}
{{- end }}

{{/*
SRM Controller labels
*/}}
+0 −53
Changes for oop-platform-chart/charts/srm/templates/mongodb-deployment.yaml: 0 added lines, 53 removed lines.
Original line number Diff line number Diff line
{{- if .Values.mongodb.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Values.mongodb.name }}
  namespace: {{ include "srm.namespace" . }}
  labels:
    {{- include "srm.mongodb.labels" . | nindent 4 }}
  {{- with .Values.commonAnnotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  replicas: 1
  selector:
    matchLabels:
      {{- include "srm.mongodb.selectorLabels" . | nindent 6 }}
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        {{- include "srm.mongodb.selectorLabels" . | nindent 8 }}
      {{- with .Values.commonAnnotations }}
      annotations:
        {{- toYaml . | nindent 8 }}
      {{- end }}
    spec:
      containers:
        - name: {{ .Values.mongodb.name }}
          image: "{{ .Values.mongodb.image.repository }}:{{ .Values.mongodb.image.tag }}"
          imagePullPolicy: {{ .Values.mongodb.image.pullPolicy }}
          ports:
            - name: mongodb
              containerPort: {{ .Values.mongodb.service.port }}
              protocol: TCP
          {{- with .Values.mongodb.resources }}
          resources:
            {{- toYaml . | nindent 12 }}
          {{- end }}
          {{- if .Values.mongodb.persistence.enabled }}
          volumeMounts:
            - name: mongo-db
              mountPath: /data/db
          {{- end }}
      restartPolicy: Always
      {{- if .Values.mongodb.persistence.enabled }}
      volumes:
        - name: mongo-db
          persistentVolumeClaim:
            claimName: mongo-db
      {{- end }}
{{- end }}
+0 −21
Changes for oop-platform-chart/charts/srm/templates/mongodb-pv.yaml: 0 added lines, 21 removed lines.
Original line number Diff line number Diff line
{{- if and .Values.mongodb.enabled .Values.mongodb.persistence.enabled .Values.mongodb.persistence.createPV }}
apiVersion: v1
kind: PersistentVolume
metadata:
  name: mongodb-pv-volume
  namespace: {{ include "srm.namespace" . }}
  labels:
    type: local
    app: {{ .Values.mongodb.name }}
    {{- include "srm.mongodb.labels" . | nindent 4 }}
spec:
  storageClassName: {{ .Values.mongodb.persistence.storageClass }}
  capacity:
    storage: {{ .Values.mongodb.persistence.size }}
  accessModes:
    - {{ .Values.mongodb.persistence.accessMode }}
  {{- if .Values.mongodb.persistence.hostPath.enabled }}
  hostPath:
    path: {{ .Values.mongodb.persistence.hostPath.path | quote }}
  {{- end }}
{{- end }}
Loading