From 84bb476812548b1e85df9ed5b219f16e30b44fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Wed, 14 Aug 2024 11:00:26 +0300 Subject: [PATCH] Mongo migrated to external Mongo, removing in-cluster Mongo definitions temporarily --- logmower/mongodb-support.yml | 1 - logmower/mongoexpress.yml | 47 ------------- wildduck/mongo.yaml | 83 ---------------------- wildduck/mongodb-support.yml | 130 ----------------------------------- 4 files changed, 261 deletions(-) delete mode 120000 logmower/mongodb-support.yml delete mode 100644 logmower/mongoexpress.yml delete mode 100644 wildduck/mongo.yaml delete mode 100644 wildduck/mongodb-support.yml diff --git a/logmower/mongodb-support.yml b/logmower/mongodb-support.yml deleted file mode 120000 index e834dd2..0000000 --- a/logmower/mongodb-support.yml +++ /dev/null @@ -1 +0,0 @@ -../mongodb-operator/mongodb-support.yml \ No newline at end of file diff --git a/logmower/mongoexpress.yml b/logmower/mongoexpress.yml deleted file mode 100644 index 9a33ac0..0000000 --- a/logmower/mongoexpress.yml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: logmower-mongoexpress -spec: - revisionHistoryLimit: 0 - replicas: 1 - selector: - matchLabels: - app: logmower-mongoexpress - template: - metadata: - labels: - app: logmower-mongoexpress - spec: - containers: - - name: mongoexpress - image: mongo-express - ports: - - name: mongoexpress - containerPort: 8081 - env: - - name: ME_CONFIG_MONGODB_URL - valueFrom: - secretKeyRef: - name: logmower-mongodb-application-readonly - key: connectionString.standard - - name: ME_CONFIG_MONGODB_ENABLE_ADMIN - value: "true" ---- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: logmower-mongoexpress -spec: - podSelector: - matchLabels: - app: logmower-mongoexpress - policyTypes: - - Egress - egress: - - to: - - podSelector: - matchLabels: - app: logmower-mongodb-svc - ports: - - port: 27017 diff --git a/wildduck/mongo.yaml b/wildduck/mongo.yaml deleted file mode 100644 index 0c4da9e..0000000 --- a/wildduck/mongo.yaml +++ /dev/null @@ -1,83 +0,0 @@ ---- -apiVersion: codemowers.cloud/v1beta1 -kind: SecretClaim -metadata: - name: wildduck-readwrite-password -spec: - mapping: - - key: password - value: "%(plaintext)s" ---- -apiVersion: mongodbcommunity.mongodb.com/v1 -kind: MongoDBCommunity -metadata: - name: wildduck-mongodb -spec: - additionalMongodConfig: - systemLog: - quiet: true - members: 2 - arbiters: 1 - type: ReplicaSet - version: "6.0.3" - security: - authentication: - modes: ["SCRAM"] - users: - - name: readwrite - db: wildduck - passwordSecretRef: - name: wildduck-readwrite-password - roles: - - name: readWrite - db: wildduck - scramCredentialsSecretName: wildduck-readwrite - statefulSet: - spec: - logLevel: WARN - template: - spec: - containers: - - name: mongod - resources: - requests: - cpu: 100m - memory: 1Gi - limits: - cpu: 4000m - memory: 1Gi - - name: mongodb-agent - resources: - requests: - cpu: 1m - memory: 100Mi - limits: {} - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - wildduck-mongodb-svc - topologyKey: topology.kubernetes.io/zone - volumeClaimTemplates: - - metadata: - name: logs-volume - spec: - storageClassName: mongo - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 512Mi - - metadata: - name: data-volume - spec: - storageClassName: mongo - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi diff --git a/wildduck/mongodb-support.yml b/wildduck/mongodb-support.yml deleted file mode 100644 index 1d52732..0000000 --- a/wildduck/mongodb-support.yml +++ /dev/null @@ -1,130 +0,0 @@ -# This file was a symlink to ../mongodb-operator/mongodb-support.yml before ArgoCD config drift - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: mongodb-kubernetes-operator -rules: -- apiGroups: - - "" - resources: - - pods - - services - - configmaps - - secrets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - mongodbcommunity.mongodb.com - resources: - - mongodbcommunity - - mongodbcommunity/status - - mongodbcommunity/spec - - mongodbcommunity/finalizers - verbs: - - get - - patch - - list - - update - - watch ---- -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: mongodb-kubernetes-operator -subjects: -- kind: ServiceAccount - name: mongodb-kubernetes-operator -roleRef: - kind: Role - name: mongodb-kubernetes-operator - apiGroup: rbac.authorization.k8s.io ---- -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: mongodb-database -subjects: -- kind: ServiceAccount - name: mongodb-database -roleRef: - kind: Role - name: mongodb-database - apiGroup: rbac.authorization.k8s.io ---- -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: mongodb-database -rules: - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - - apiGroups: - - "" - resources: - - pods - verbs: - - patch - - delete - - get ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: mongodb-kubernetes-operator ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: mongodb-database -# --- -# Commented out by argocd config drift -# -# # Allow any pod in this namespace to connect to MongoDB and -# # allow cluster members to talk to eachother -# apiVersion: networking.k8s.io/v1 -# kind: NetworkPolicy -# metadata: -# name: mongodb-operator -# spec: -# podSelector: -# matchLabels: -# app: mongodb-svc -# policyTypes: -# - Ingress -# - Egress -# ingress: -# - from: -# - podSelector: {} -# ports: -# - port: 27017 -# egress: -# - to: -# - podSelector: -# matchLabels: -# app: mongodb-svc -# ports: -# - port: 27017