drop agola, too buggy

This commit is contained in:
Vivian 2022-05-25 15:17:06 +02:00
parent a397b8a1f1
commit 20bf415ea7
9 changed files with 1 additions and 292 deletions

View file

@ -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"

View file

@ -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: {}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -2,4 +2,3 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- renovate
- agola

View file

@ -4,7 +4,7 @@
{ config, pkgs, ... }:
let
databases = [ "authentik" "agola_notif" "agola_config" "agola_runservice"];
databases = [ "authentik" ];
in
{