Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(default): upgrade obsidian-sync helmrelease and kustomization #1930

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

blackjid
Copy link
Owner

No description provided.

@bot-x-mod
Copy link
Contributor

bot-x-mod bot commented Dec 15, 2023

--- kubernetes/main HelmRelease: default/obsidian-sync Service: default/obsidian-sync

+++ kubernetes/main HelmRelease: default/obsidian-sync Service: default/obsidian-sync

@@ -1,21 +0,0 @@

----
-apiVersion: v1
-kind: Service
-metadata:
-  name: obsidian-sync
-  labels:
-    app.kubernetes.io/service: obsidian-sync
-    app.kubernetes.io/instance: obsidian-sync
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: obsidian-sync
-spec:
-  type: ClusterIP
-  ports:
-  - port: 5984
-    targetPort: http
-    protocol: TCP
-    name: http
-  selector:
-    app.kubernetes.io/instance: obsidian-sync
-    app.kubernetes.io/name: obsidian-sync
-
--- kubernetes/main HelmRelease: default/obsidian-sync StatefulSet: default/obsidian-sync

+++ kubernetes/main HelmRelease: default/obsidian-sync StatefulSet: default/obsidian-sync

@@ -1,111 +0,0 @@

----
-apiVersion: apps/v1
-kind: StatefulSet
-metadata:
-  name: obsidian-sync
-  labels:
-    app.kubernetes.io/instance: obsidian-sync
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: obsidian-sync
-spec:
-  revisionHistoryLimit: 3
-  replicas: 1
-  podManagementPolicy: OrderedReady
-  updateStrategy:
-    type: RollingUpdate
-  selector:
-    matchLabels:
-      app.kubernetes.io/name: obsidian-sync
-      app.kubernetes.io/instance: obsidian-sync
-  serviceName: obsidian-sync
-  template:
-    metadata:
-      labels:
-        app.kubernetes.io/name: obsidian-sync
-        app.kubernetes.io/instance: obsidian-sync
-    spec:
-      serviceAccountName: default
-      automountServiceAccountToken: true
-      dnsPolicy: ClusterFirst
-      enableServiceLinks: true
-      initContainers:
-      - command:
-        - /bin/sh
-        - -c
-        - cp /tmp/config/*.ini /default.d/; ls -lrt /default.d;
-        image: public.ecr.aws/docker/library/busybox:latest
-        imagePullPolicy: IfNotPresent
-        name: init-config
-        volumeMounts:
-        - mountPath: /tmp/config
-          name: config-file
-        - mountPath: /default.d
-          name: config-storage
-      containers:
-      - name: obsidian-sync
-        image: public.ecr.aws/docker/library/couchdb:3.3.3
-        imagePullPolicy: null
-        env:
-        - name: COUCHDB_PASSWORD
-          valueFrom:
-            secretKeyRef:
-              key: couchdb-password
-              name: obsidian-sync-secret
-        - name: COUCHDB_USER
-          valueFrom:
-            secretKeyRef:
-              key: couchdb-user
-              name: obsidian-sync-secret
-        ports:
-        - name: http
-          containerPort: 5984
-          protocol: TCP
-        volumeMounts:
-        - name: config-storage
-          mountPath: /opt/couchdb/etc/default.d
-        - mountPath: /opt/couchdb/data
-          name: data-0
-        livenessProbe:
-          failureThreshold: 3
-          initialDelaySeconds: 0
-          periodSeconds: 10
-          tcpSocket:
-            port: 5984
-          timeoutSeconds: 1
-        readinessProbe:
-          failureThreshold: 3
-          initialDelaySeconds: 0
-          periodSeconds: 10
-          tcpSocket:
-            port: 5984
-          timeoutSeconds: 1
-        startupProbe:
-          failureThreshold: 30
-          initialDelaySeconds: 0
-          periodSeconds: 5
-          tcpSocket:
-            port: 5984
-          timeoutSeconds: 1
-        resources:
-          limits:
-            memory: 250Mi
-          requests:
-            cpu: 10m
-            memory: 50Mi
-      volumes:
-      - name: config-file
-        configMap:
-          name: obsidian-sync-configmap-686th8c6mf
-      - name: config-storage
-        emptyDir: {}
-  volumeClaimTemplates:
-  - metadata:
-      name: data-0
-    spec:
-      accessModes:
-      - ReadWriteOnce
-      resources:
-        requests:
-          storage: 10Gi
-      storageClassName: ceph-block
-
--- kubernetes/main HelmRelease: default/obsidian-sync Ingress: default/obsidian-sync

+++ kubernetes/main HelmRelease: default/obsidian-sync Ingress: default/obsidian-sync

@@ -1,28 +0,0 @@

----
-apiVersion: networking.k8s.io/v1
-kind: Ingress
-metadata:
-  name: obsidian-sync
-  labels:
-    app.kubernetes.io/instance: obsidian-sync
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: obsidian-sync
-  annotations:
-    external-dns.alpha.kubernetes.io/target: ingress.donoso.family
-spec:
-  ingressClassName: external
-  tls:
-  - hosts:
-    - obsidian-sync.donoso.family
-  rules:
-  - host: obsidian-sync.donoso.family
-    http:
-      paths:
-      - path: /
-        pathType: Prefix
-        backend:
-          service:
-            name: obsidian-sync
-            port:
-              number: 5984
-
--- kubernetes/main HelmRelease: home/obsidian-sync Service: home/obsidian-sync

+++ kubernetes/main HelmRelease: home/obsidian-sync Service: home/obsidian-sync

@@ -0,0 +1,21 @@

+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: obsidian-sync
+  labels:
+    app.kubernetes.io/service: obsidian-sync
+    app.kubernetes.io/instance: obsidian-sync
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: obsidian-sync
+spec:
+  type: ClusterIP
+  ports:
+  - port: 5984
+    targetPort: http
+    protocol: TCP
+    name: http
+  selector:
+    app.kubernetes.io/instance: obsidian-sync
+    app.kubernetes.io/name: obsidian-sync
+
--- kubernetes/main HelmRelease: home/obsidian-sync StatefulSet: home/obsidian-sync

+++ kubernetes/main HelmRelease: home/obsidian-sync StatefulSet: home/obsidian-sync

@@ -0,0 +1,111 @@

+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: obsidian-sync
+  labels:
+    app.kubernetes.io/instance: obsidian-sync
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: obsidian-sync
+spec:
+  revisionHistoryLimit: 3
+  replicas: 1
+  podManagementPolicy: OrderedReady
+  updateStrategy:
+    type: RollingUpdate
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: obsidian-sync
+      app.kubernetes.io/instance: obsidian-sync
+  serviceName: obsidian-sync
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/name: obsidian-sync
+        app.kubernetes.io/instance: obsidian-sync
+    spec:
+      serviceAccountName: default
+      automountServiceAccountToken: true
+      dnsPolicy: ClusterFirst
+      enableServiceLinks: true
+      initContainers:
+      - command:
+        - /bin/sh
+        - -c
+        - cp /tmp/config/*.ini /default.d/; ls -lrt /default.d;
+        image: public.ecr.aws/docker/library/busybox:latest
+        imagePullPolicy: IfNotPresent
+        name: init-config
+        volumeMounts:
+        - mountPath: /tmp/config
+          name: config-file
+        - mountPath: /default.d
+          name: config-storage
+      containers:
+      - name: obsidian-sync
+        image: public.ecr.aws/docker/library/couchdb:3.3.3
+        imagePullPolicy: null
+        env:
+        - name: COUCHDB_PASSWORD
+          valueFrom:
+            secretKeyRef:
+              key: couchdb-password
+              name: obsidian-sync-secret
+        - name: COUCHDB_USER
+          valueFrom:
+            secretKeyRef:
+              key: couchdb-user
+              name: obsidian-sync-secret
+        ports:
+        - name: http
+          containerPort: 5984
+          protocol: TCP
+        volumeMounts:
+        - name: config-storage
+          mountPath: /opt/couchdb/etc/default.d
+        - mountPath: /opt/couchdb/data
+          name: data-0
+        livenessProbe:
+          failureThreshold: 3
+          initialDelaySeconds: 0
+          periodSeconds: 10
+          tcpSocket:
+            port: 5984
+          timeoutSeconds: 1
+        readinessProbe:
+          failureThreshold: 3
+          initialDelaySeconds: 0
+          periodSeconds: 10
+          tcpSocket:
+            port: 5984
+          timeoutSeconds: 1
+        startupProbe:
+          failureThreshold: 30
+          initialDelaySeconds: 0
+          periodSeconds: 5
+          tcpSocket:
+            port: 5984
+          timeoutSeconds: 1
+        resources:
+          limits:
+            memory: 250Mi
+          requests:
+            cpu: 10m
+            memory: 50Mi
+      volumes:
+      - name: config-file
+        configMap:
+          name: obsidian-sync-configmap
+      - name: config-storage
+        emptyDir: {}
+  volumeClaimTemplates:
+  - metadata:
+      name: data-0
+    spec:
+      accessModes:
+      - ReadWriteOnce
+      resources:
+        requests:
+          storage: 10Gi
+      storageClassName: ceph-block
+
--- kubernetes/main HelmRelease: home/obsidian-sync Ingress: home/obsidian-sync

+++ kubernetes/main HelmRelease: home/obsidian-sync Ingress: home/obsidian-sync

@@ -0,0 +1,28 @@

+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: obsidian-sync
+  labels:
+    app.kubernetes.io/instance: obsidian-sync
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: obsidian-sync
+  annotations:
+    external-dns.alpha.kubernetes.io/target: ingress.donoso.family
+spec:
+  ingressClassName: external
+  tls:
+  - hosts:
+    - obsidian-sync.donoso.family
+  rules:
+  - host: obsidian-sync.donoso.family
+    http:
+      paths:
+      - path: /
+        pathType: Prefix
+        backend:
+          service:
+            name: obsidian-sync
+            port:
+              number: 5984
+

@bot-x-mod
Copy link
Contributor

bot-x-mod bot commented Dec 15, 2023

--- kubernetes/main/apps Kustomization: flux-system/cluster-apps ExternalSecret: default/obsidian-sync

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps ExternalSecret: default/obsidian-sync

@@ -1,22 +0,0 @@

----
-apiVersion: external-secrets.io/v1beta1
-kind: ExternalSecret
-metadata:
-  labels:
-    app.kubernetes.io/instance: obsidian-sync
-    app.kubernetes.io/name: obsidian-sync
-    kustomize.toolkit.fluxcd.io/name: cluster-apps
-    kustomize.toolkit.fluxcd.io/namespace: flux-system
-  name: obsidian-sync
-  namespace: default
-spec:
-  dataFrom:
-  - extract:
-      key: obsidian-sync
-  secretStoreRef:
-    kind: ClusterSecretStore
-    name: onepassword-connect
-  target:
-    creationPolicy: Owner
-    name: obsidian-sync-secret
-
--- kubernetes/main/apps Kustomization: flux-system/cluster-apps HelmRelease: default/obsidian-sync

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps HelmRelease: default/obsidian-sync

@@ -1,104 +0,0 @@

----
-apiVersion: helm.toolkit.fluxcd.io/v2beta2
-kind: HelmRelease
-metadata:
-  labels:
-    app.kubernetes.io/instance: obsidian-sync
-    app.kubernetes.io/name: obsidian-sync
-    kustomize.toolkit.fluxcd.io/name: cluster-apps
-    kustomize.toolkit.fluxcd.io/namespace: flux-system
-  name: obsidian-sync
-  namespace: default
-spec:
-  chart:
-    spec:
-      chart: app-template
-      sourceRef:
-        kind: HelmRepository
-        name: bjw-s
-        namespace: flux-system
-      version: 1.5.1
-  install:
-    createNamespace: true
-    remediation:
-      retries: 3
-  interval: 15m
-  maxHistory: 3
-  uninstall:
-    keepHistory: false
-  upgrade:
-    cleanupOnFail: true
-    remediation:
-      retries: 3
-  values:
-    controller:
-      type: statefulset
-    env:
-      COUCHDB_PASSWORD:
-        valueFrom:
-          secretKeyRef:
-            key: couchdb-password
-            name: obsidian-sync-secret
-      COUCHDB_USER:
-        valueFrom:
-          secretKeyRef:
-            key: couchdb-user
-            name: obsidian-sync-secret
-    image:
-      repository: public.ecr.aws/docker/library/couchdb
-      tag: 3.3.3
-    ingress:
-      main:
-        annotations:
-          external-dns.alpha.kubernetes.io/target: ingress.donoso.family
-        enabled: true
-        hosts:
-        - host: obsidian-sync.donoso.family
-          paths:
-          - path: /
-            pathType: Prefix
-        ingressClassName: external
-        tls:
-        - hosts:
-          - obsidian-sync.donoso.family
-    initContainers:
-      init-config:
-        command:
-        - /bin/sh
-        - -c
-        - cp /tmp/config/*.ini /default.d/; ls -lrt /default.d;
-        image: public.ecr.aws/docker/library/busybox:latest
-        imagePullPolicy: IfNotPresent
-        volumeMounts:
-        - mountPath: /tmp/config
-          name: config-file
-        - mountPath: /default.d
-          name: config-storage
-    persistence:
-      config-file:
-        enabled: true
-        mountPath: '-'
-        name: obsidian-sync-configmap-686th8c6mf
-        type: configMap
-      config-storage:
-        enabled: true
-        mountPath: /opt/couchdb/etc/default.d
-        type: emptyDir
-    resources:
-      limits:
-        memory: 250Mi
-      requests:
-        cpu: 10m
-        memory: 50Mi
-    service:
-      main:
-        ports:
-          http:
-            port: 5984
-    volumeClaimTemplates:
-    - accessMode: ReadWriteOnce
-      mountPath: /opt/couchdb/data
-      name: data-0
-      size: 10Gi
-      storageClass: ceph-block
-
--- kubernetes/main/apps Kustomization: flux-system/cluster-apps ConfigMap: default/obsidian-sync-configmap-686th8c6mf

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps ConfigMap: default/obsidian-sync-configmap-686th8c6mf

@@ -1,37 +0,0 @@

----
-apiVersion: v1
-data:
-  config.ini: |
-    [couchdb]
-    single_node = true
-    max_document_size = 50000000
-
-    [chttpd]
-    require_valid_user = true
-    bind_address = any
-    max_http_request_size = 4294967296
-
-    [chttpd_auth]
-    require_valid_user = true
-    authentication_redirect = /_utils/session.html
-
-    [httpd]
-    WWW-Authenticate = Basic realm="couchdb"
-    enable_cors = true
-
-    [cors]
-    origins = app://obsidian.md,capacitor://localhost,http://localhost
-    credentials = true
-    headers = accept, authorization, content-type, origin, referer
-    methods = GET, PUT, POST, HEAD, DELETE
-    max_age = 3600
-kind: ConfigMap
-metadata:
-  labels:
-    app.kubernetes.io/instance: obsidian-sync
-    app.kubernetes.io/name: obsidian-sync
-    kustomize.toolkit.fluxcd.io/name: cluster-apps
-    kustomize.toolkit.fluxcd.io/namespace: flux-system
-  name: obsidian-sync-configmap-686th8c6mf
-  namespace: default
-
--- kubernetes/main/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/obsidian-sync

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/obsidian-sync

@@ -0,0 +1,36 @@

+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1
+kind: Kustomization
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: cluster-apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: obsidian-sync
+  namespace: flux-system
+spec:
+  commonMetadata:
+    labels:
+      app.kubernetes.io/name: obsidian-sync
+  decryption:
+    provider: sops
+    secretRef:
+      name: sops-age
+  dependsOn:
+  - name: external-secrets-stores
+  interval: 30m
+  path: ./kubernetes/main/apps/default/obsidian-sync/app
+  postBuild:
+    substituteFrom:
+    - kind: ConfigMap
+      name: cluster-settings
+    - kind: Secret
+      name: cluster-secrets
+  prune: true
+  retryInterval: 1m
+  sourceRef:
+    kind: GitRepository
+    name: home-kubernetes
+  targetNamespace: home
+  timeout: 5m
+  wait: false
+
--- kubernetes/main/apps/default/obsidian-sync/app Kustomization: flux-system/obsidian-sync ExternalSecret: home/obsidian-sync

+++ kubernetes/main/apps/default/obsidian-sync/app Kustomization: flux-system/obsidian-sync ExternalSecret: home/obsidian-sync

@@ -0,0 +1,21 @@

+---
+apiVersion: external-secrets.io/v1beta1
+kind: ExternalSecret
+metadata:
+  labels:
+    app.kubernetes.io/name: obsidian-sync
+    kustomize.toolkit.fluxcd.io/name: obsidian-sync
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: obsidian-sync
+  namespace: home
+spec:
+  dataFrom:
+  - extract:
+      key: obsidian-sync
+  secretStoreRef:
+    kind: ClusterSecretStore
+    name: onepassword-connect
+  target:
+    creationPolicy: Owner
+    name: obsidian-sync-secret
+
--- kubernetes/main/apps/default/obsidian-sync/app Kustomization: flux-system/obsidian-sync HelmRelease: home/obsidian-sync

+++ kubernetes/main/apps/default/obsidian-sync/app Kustomization: flux-system/obsidian-sync HelmRelease: home/obsidian-sync

@@ -0,0 +1,103 @@

+---
+apiVersion: helm.toolkit.fluxcd.io/v2beta2
+kind: HelmRelease
+metadata:
+  labels:
+    app.kubernetes.io/name: obsidian-sync
+    kustomize.toolkit.fluxcd.io/name: obsidian-sync
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: obsidian-sync
+  namespace: home
+spec:
+  chart:
+    spec:
+      chart: app-template
+      sourceRef:
+        kind: HelmRepository
+        name: bjw-s
+        namespace: flux-system
+      version: 1.5.1
+  install:
+    createNamespace: true
+    remediation:
+      retries: 3
+  interval: 15m
+  maxHistory: 3
+  uninstall:
+    keepHistory: false
+  upgrade:
+    cleanupOnFail: true
+    remediation:
+      retries: 3
+  values:
+    controller:
+      type: statefulset
+    env:
+      COUCHDB_PASSWORD:
+        valueFrom:
+          secretKeyRef:
+            key: couchdb-password
+            name: obsidian-sync-secret
+      COUCHDB_USER:
+        valueFrom:
+          secretKeyRef:
+            key: couchdb-user
+            name: obsidian-sync-secret
+    image:
+      repository: public.ecr.aws/docker/library/couchdb
+      tag: 3.3.3
+    ingress:
+      main:
+        annotations:
+          external-dns.alpha.kubernetes.io/target: ingress.donoso.family
+        enabled: true
+        hosts:
+        - host: obsidian-sync.donoso.family
+          paths:
+          - path: /
+            pathType: Prefix
+        ingressClassName: external
+        tls:
+        - hosts:
+          - obsidian-sync.donoso.family
+    initContainers:
+      init-config:
+        command:
+        - /bin/sh
+        - -c
+        - cp /tmp/config/*.ini /default.d/; ls -lrt /default.d;
+        image: public.ecr.aws/docker/library/busybox:latest
+        imagePullPolicy: IfNotPresent
+        volumeMounts:
+        - mountPath: /tmp/config
+          name: config-file
+        - mountPath: /default.d
+          name: config-storage
+    persistence:
+      config-file:
+        enabled: true
+        mountPath: '-'
+        name: obsidian-sync-configmap
+        type: configMap
+      config-storage:
+        enabled: true
+        mountPath: /opt/couchdb/etc/default.d
+        type: emptyDir
+    resources:
+      limits:
+        memory: 250Mi
+      requests:
+        cpu: 10m
+        memory: 50Mi
+    service:
+      main:
+        ports:
+          http:
+            port: 5984
+    volumeClaimTemplates:
+    - accessMode: ReadWriteOnce
+      mountPath: /opt/couchdb/data
+      name: data-0
+      size: 10Gi
+      storageClass: ceph-block
+
--- kubernetes/main/apps/default/obsidian-sync/app Kustomization: flux-system/obsidian-sync ConfigMap: home/obsidian-sync-configmap

+++ kubernetes/main/apps/default/obsidian-sync/app Kustomization: flux-system/obsidian-sync ConfigMap: home/obsidian-sync-configmap

@@ -0,0 +1,38 @@

+---
+apiVersion: v1
+data:
+  config.ini: |
+    [couchdb]
+    single_node = true
+    max_document_size = 50000000
+
+    [chttpd]
+    require_valid_user = true
+    bind_address = any
+    max_http_request_size = 4294967296
+
+    [chttpd_auth]
+    require_valid_user = true
+    authentication_redirect = /_utils/session.html
+
+    [httpd]
+    WWW-Authenticate = Basic realm="couchdb"
+    enable_cors = true
+
+    [cors]
+    origins = app://obsidian.md,capacitor://localhost,http://localhost
+    credentials = true
+    headers = accept, authorization, content-type, origin, referer
+    methods = GET, PUT, POST, HEAD, DELETE
+    max_age = 3600
+kind: ConfigMap
+metadata:
+  annotations:
+    kustomize.toolkit.fluxcd.io/substitute: disabled
+  labels:
+    app.kubernetes.io/name: obsidian-sync
+    kustomize.toolkit.fluxcd.io/name: obsidian-sync
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: obsidian-sync-configmap
+  namespace: home
+

@blackjid blackjid merged commit 67ecbaf into main Dec 15, 2023
4 checks passed
@blackjid blackjid deleted the upgrade_obsidian_sync branch December 15, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant