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(kubernetes): install github-mirror #945

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Conversation

martinohmann
Copy link
Owner

This will replace github-to-gitea-mirror. Running in dry-run mode for now.

@github-actions github-actions bot added area/kubernetes Changes made in the kubernetes directory cluster/main labels Jun 7, 2024
Copy link

github-actions bot commented Jun 7, 2024

helmrelease changes in kubernetes/main

--- HelmRelease: default/github-mirror CronJob: default/github-mirror

+++ HelmRelease: default/github-mirror CronJob: default/github-mirror

@@ -0,0 +1,58 @@

+---
+apiVersion: batch/v1
+kind: CronJob
+metadata:
+  name: github-mirror
+  labels:
+    app.kubernetes.io/component: github-mirror
+    app.kubernetes.io/instance: github-mirror
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: github-mirror
+spec:
+  suspend: false
+  concurrencyPolicy: Forbid
+  startingDeadlineSeconds: 30
+  schedule: 01 23 * * 4
+  successfulJobsHistoryLimit: 0
+  failedJobsHistoryLimit: 1
+  jobTemplate:
+    spec:
+      backoffLimit: 6
+      template:
+        metadata:
+          labels:
+            app.kubernetes.io/component: github-mirror
+            app.kubernetes.io/instance: github-mirror
+            app.kubernetes.io/name: github-mirror
+        spec:
+          enableServiceLinks: false
+          serviceAccountName: default
+          automountServiceAccountToken: true
+          securityContext:
+            fsGroup: 568
+            fsGroupChangePolicy: OnRootMismatch
+            runAsGroup: 568
+            runAsNonRoot: true
+            runAsUser: 568
+            seccompProfile:
+              type: RuntimeDefault
+          hostIPC: false
+          hostNetwork: false
+          hostPID: false
+          dnsPolicy: ClusterFirst
+          restartPolicy: Never
+          containers:
+          - args:
+            - migrate
+            - github-to-gitea
+            - --gitea-url=https://git.18b.haus
+            - --exclude-forks
+            - --include='martinohmann/.*'
+            - --mirror-interval=12h
+            - --repo-owner=martinohmann-github-mirror
+            envFrom:
+            - secretRef:
+                name: github-mirror
+            image: ghcr.io/martinohmann/scm-migrator:latest@sha256:920ba60346b860aace1a57a9c28f92ecc18f89c8e9fa491a46083520ee781363
+            name: app
+

Copy link

github-actions bot commented Jun 7, 2024

kustomization changes in kubernetes/main

--- kubernetes/main/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/github-mirror

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/github-mirror

@@ -0,0 +1,32 @@

+---
+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: github-mirror
+  namespace: flux-system
+spec:
+  commonMetadata:
+    labels:
+      app.kubernetes.io/name: github-mirror
+  decryption:
+    provider: sops
+    secretRef:
+      name: sops-age
+  interval: 2h
+  path: ./kubernetes/main/apps/default/github-mirror/app
+  postBuild:
+    substituteFrom:
+    - kind: Secret
+      name: cluster-secrets
+  prune: true
+  retryInterval: 1m
+  sourceRef:
+    kind: GitRepository
+    name: home-kubernetes
+  targetNamespace: default
+  timeout: 5m
+  wait: false
+
--- kubernetes/main/apps/default/github-mirror/app Kustomization: flux-system/github-mirror HelmRelease: default/github-mirror

+++ kubernetes/main/apps/default/github-mirror/app Kustomization: flux-system/github-mirror HelmRelease: default/github-mirror

@@ -0,0 +1,70 @@

+---
+apiVersion: helm.toolkit.fluxcd.io/v2
+kind: HelmRelease
+metadata:
+  labels:
+    app.kubernetes.io/name: github-mirror
+    kustomize.toolkit.fluxcd.io/name: github-mirror
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: github-mirror
+  namespace: default
+spec:
+  chart:
+    spec:
+      chart: app-template
+      sourceRef:
+        kind: HelmRepository
+        name: bjw-s
+        namespace: flux-system
+      version: 3.2.1
+  dependsOn:
+  - name: gitea
+  install:
+    remediation:
+      retries: 3
+  interval: 2h
+  maxHistory: 2
+  uninstall:
+    keepHistory: false
+  upgrade:
+    cleanupOnFail: true
+    remediation:
+      retries: 3
+      strategy: uninstall
+  values:
+    controllers:
+      github-mirror:
+        containers:
+          app:
+            args:
+            - migrate
+            - github-to-gitea
+            - --gitea-url=https://git.18b.haus
+            - --exclude-forks
+            - --include='martinohmann/.*'
+            - --mirror-interval=12h
+            - --repo-owner=martinohmann-github-mirror
+            envFrom:
+            - secretRef:
+                name: github-mirror
+            image:
+              repository: ghcr.io/martinohmann/scm-migrator
+              tag: latest@sha256:920ba60346b860aace1a57a9c28f92ecc18f89c8e9fa491a46083520ee781363
+        cronjob:
+          backoffLimit: 6
+          concurrencyPolicy: Forbid
+          failedJobsHistory: 1
+          schedule: 01 23 * * 4
+          successfulJobsHistory: 0
+          suspend: false
+        type: cronjob
+    defaultPodOptions:
+      securityContext:
+        fsGroup: 568
+        fsGroupChangePolicy: OnRootMismatch
+        runAsGroup: 568
+        runAsNonRoot: true
+        runAsUser: 568
+        seccompProfile:
+          type: RuntimeDefault
+

@martinohmann martinohmann force-pushed the github-mirror/install branch from f622c51 to f99f8c3 Compare June 7, 2024 19:40
This will replace `github-to-gitea-mirror`. Running in dry-run mode for
now.
@martinohmann martinohmann force-pushed the github-mirror/install branch from f99f8c3 to 61d2878 Compare June 7, 2024 19:42
@martinohmann martinohmann merged commit 5432a09 into main Jun 7, 2024
7 checks passed
@martinohmann martinohmann deleted the github-mirror/install branch June 7, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes Changes made in the kubernetes directory cluster/main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant