From 20bf415ea7eacdd43d147f0d03dcfd237cae60f6 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 25 May 2022 15:17:06 +0200 Subject: [PATCH] drop agola, too buggy --- flux/cluster/apps/gitops/agola/configmap.yaml | 84 ------------------- .../cluster/apps/gitops/agola/deployment.yaml | 54 ------------ .../apps/gitops/agola/external-secret.yaml | 30 ------- flux/cluster/apps/gitops/agola/ingress.yaml | 18 ---- .../apps/gitops/agola/kustomization.yaml | 9 -- flux/cluster/apps/gitops/agola/rbac.yaml | 59 ------------- flux/cluster/apps/gitops/agola/services.yaml | 36 -------- flux/cluster/apps/gitops/kustomization.yaml | 1 - nixos/hosts/database/configuration.nix | 2 +- 9 files changed, 1 insertion(+), 292 deletions(-) delete mode 100644 flux/cluster/apps/gitops/agola/configmap.yaml delete mode 100644 flux/cluster/apps/gitops/agola/deployment.yaml delete mode 100644 flux/cluster/apps/gitops/agola/external-secret.yaml delete mode 100644 flux/cluster/apps/gitops/agola/ingress.yaml delete mode 100644 flux/cluster/apps/gitops/agola/kustomization.yaml delete mode 100644 flux/cluster/apps/gitops/agola/rbac.yaml delete mode 100644 flux/cluster/apps/gitops/agola/services.yaml diff --git a/flux/cluster/apps/gitops/agola/configmap.yaml b/flux/cluster/apps/gitops/agola/configmap.yaml deleted file mode 100644 index 338045f..0000000 --- a/flux/cluster/apps/gitops/agola/configmap.yaml +++ /dev/null @@ -1,84 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: agola - namespace: gitops -data: - config.yml: | - gateway: - # The api url that clients will call - # Change this to the exposed "agola" service IP - apiExposedURL: "https://agola.0x76.dev" - # The web interface url that clients will use - # Change this to the exposed "agola" service IP - webExposedURL: "https://agola.0x76.dev" - - runserviceURL: "http://agola-internal:4000" - configstoreURL: "http://agola-internal:4002" - gitserverURL: "http://agola-internal:4003" - web: - listenAddress: ":8000" - tokenSigning: - # hmac or rsa (it possible use rsa) - method: hmac - # key to use when signing with hmac - key: $SIGNING_KEY - adminToken: "$ADMIN_TOKEN" - - scheduler: - runserviceURL: "http://agola-internal:4000" - - notification: - webExposedURL: "https://agola.0x76.dev" - runserviceURL: "http://agola-internal:4000" - configstoreURL: "http://agola-internal:4002" - db: - type: postgres - connString: "postgres://agola_notif@10.42.42.26/agola_notif?sslmode=disable" - - configstore: - # debug: true - dataDir: /mnt/agola/local/configstore - db: - type: postgres - connString: "postgres://agola_config@10.42.42.26/agola_config?sslmode=disable" - objectStorage: - type: s3 - endpoint: "https://o.0x76.dev" - bucket: agola-configstore - accessKey: $MINIO_ACCESS_KEY - secretAccessKey: $MINIO_SECRET_ACCESS_KEY - web: - listenAddress: ":4002" - - runservice: - # debug: true - dataDir: /mnt/agola/local/runservice - db: - type: postgres - connString: "postgres://agola_runservice@10.42.42.26/agola_runservice?sslmode=disable" - objectStorage: - type: s3 - endpoint: "https://o.0x76.dev" - bucket: agola-runservice - accessKey: $MINIO_ACCESS_KEY - secretAccessKey: $MINIO_SECRET_ACCESS_KEY - web: - listenAddress: ":4000" - - executor: - dataDir: /mnt/agola/local/executor - # The directory containing the toolbox compiled for the various supported architectures - toolboxPath: ./bin - runserviceURL: "http://agola-internal:4000" - web: - listenAddress: ":4001" - activeTasksLimit: 2 - driver: - type: kubernetes - - gitserver: - dataDir: /mnt/agola/local/gitserver - gatewayURL: "http://agola-internal:8000" - web: - listenAddress: ":4003" diff --git a/flux/cluster/apps/gitops/agola/deployment.yaml b/flux/cluster/apps/gitops/agola/deployment.yaml deleted file mode 100644 index 16d9d58..0000000 --- a/flux/cluster/apps/gitops/agola/deployment.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: agola - namespace: gitops -spec: - replicas: 1 - selector: - matchLabels: - app: agola - template: - metadata: - labels: - app: agola - spec: - initContainers: - - name: config - image: 0x76/envsubst - args: ["sh", "-c", "cat /mnt/agola/config/config.yml | envsubst > /mnt/agola/local/config.yml"] - volumeMounts: - - mountPath: /mnt/agola/local - name: agola-localdata - - mountPath: /mnt/agola/config - name: config-volume - envFrom: - - secretRef: - name: agola - containers: - - name: agola - image: 0x76/agola:edge - command: - - /bin/agola - - serve - - "--config" - - /mnt/agola/local/config.yml - - "--components" - - all-base,executor - # - "--debug" - ports: - - containerPort: 8000 - - containerPort: 4000 - - containerPort: 4002 - - containerPort: 4003 - volumeMounts: - - name: config-volume - mountPath: /mnt/agola/config - - name: agola-localdata - mountPath: /mnt/agola/local - volumes: - - name: config-volume - configMap: - name: agola - - name: agola-localdata - emptyDir: {} diff --git a/flux/cluster/apps/gitops/agola/external-secret.yaml b/flux/cluster/apps/gitops/agola/external-secret.yaml deleted file mode 100644 index 5bae7d7..0000000 --- a/flux/cluster/apps/gitops/agola/external-secret.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: external-secrets.io/v1beta1 -kind: ExternalSecret -metadata: - name: agola - namespace: gitops -spec: - refreshInterval: "5m" - secretStoreRef: - name: vault - kind: ClusterSecretStore - target: - name: agola - data: - - secretKey: ADMIN_TOKEN - remoteRef: - key: gitops/agola - property: admin_token - - secretKey: SIGNING_KEY - remoteRef: - key: gitops/agola - property: signing_key - - secretKey: MINIO_ACCESS_KEY - remoteRef: - key: gitops/agola - property: minio_access_key - - secretKey: MINIO_SECRET_ACCESS_KEY - remoteRef: - key: gitops/agola - property: minio_secret_access_key - \ No newline at end of file diff --git a/flux/cluster/apps/gitops/agola/ingress.yaml b/flux/cluster/apps/gitops/agola/ingress.yaml deleted file mode 100644 index f62024d..0000000 --- a/flux/cluster/apps/gitops/agola/ingress.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: agola - namespace: gitops -spec: - ingressClassName: traefik - rules: - - host: agola.0x76.dev - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: agola - port: - number: 8000 diff --git a/flux/cluster/apps/gitops/agola/kustomization.yaml b/flux/cluster/apps/gitops/agola/kustomization.yaml deleted file mode 100644 index fd47e5f..0000000 --- a/flux/cluster/apps/gitops/agola/kustomization.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - configmap.yaml - - deployment.yaml - - external-secret.yaml - - ingress.yaml - - rbac.yaml - - services.yaml diff --git a/flux/cluster/apps/gitops/agola/rbac.yaml b/flux/cluster/apps/gitops/agola/rbac.yaml deleted file mode 100644 index 7735226..0000000 --- a/flux/cluster/apps/gitops/agola/rbac.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: agola - namespace: gitops -rules: - - apiGroups: - - "" - resources: - - nodes - verbs: - - "*" ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: agola - namespace: gitops -rules: - - apiGroups: - - "" - - "coordination.k8s.io" - resources: - - nodes - - pods - - pods/exec - - configmaps - - leases - - secrets - verbs: - - "*" ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: agola - namespace: gitops -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: agola -subjects: - - kind: ServiceAccount - name: default - namespace: gitops ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: agola - namespace: gitops -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: agola -subjects: - - kind: ServiceAccount - name: default - namespace: gitops diff --git a/flux/cluster/apps/gitops/agola/services.yaml b/flux/cluster/apps/gitops/agola/services.yaml deleted file mode 100644 index 173f69c..0000000 --- a/flux/cluster/apps/gitops/agola/services.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# The client service. It's a node port for easier testing on minikube. Change -# it to become a LoadBalancer if needed. -apiVersion: v1 -kind: Service -metadata: - name: agola - namespace: gitops -spec: - ports: - - port: 8000 - name: api - selector: - app: agola ---- -# The service for internal components communication. -# We are using an headless service since some k8s deployment doesn't have -# hairpin mode enabled and pods cannot communicate with themself via a -# service -apiVersion: v1 -kind: Service -metadata: - name: agola-internal - namespace: gitops -spec: - ports: - - port: 8000 - name: api - - port: 4000 - name: runservice - - port: 4002 - name: configstore - - port: 4003 - name: gitserver - selector: - app: agola - clusterIP: None diff --git a/flux/cluster/apps/gitops/kustomization.yaml b/flux/cluster/apps/gitops/kustomization.yaml index b60d1ce..4ddab70 100644 --- a/flux/cluster/apps/gitops/kustomization.yaml +++ b/flux/cluster/apps/gitops/kustomization.yaml @@ -2,4 +2,3 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - renovate - - agola diff --git a/nixos/hosts/database/configuration.nix b/nixos/hosts/database/configuration.nix index fc5331b..2202240 100644 --- a/nixos/hosts/database/configuration.nix +++ b/nixos/hosts/database/configuration.nix @@ -4,7 +4,7 @@ { config, pkgs, ... }: let - databases = [ "authentik" "agola_notif" "agola_config" "agola_runservice"]; + databases = [ "authentik" ]; in {