🚀 capacitor

This commit is contained in:
auricom
2024-03-26 00:31:56 +01:00
parent e211eedaff
commit f9f972852e
5 changed files with 158 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: capacitor
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 2.6.0
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
values:
controllers:
main:
strategy: RollingUpdate
containers:
main:
image:
repository: ghcr.io/gimlet-io/capacitor
tag: v0.3.3
resources:
requests:
cpu: 50m
memory: 100Mi
ephemeral-storage: 1Gi
limits:
memory: 200Mi
ephemeral-storage: 2Gi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: {drop: [ALL]}
serviceAccount:
create: true
name: "capacitor"
service:
main:
controller: main
ports:
http:
enabled: true
port: 9000
ingress:
main:
enabled: true
className: nginx
annotations:
hajimari.io/icon: mdi:sync
hosts:
- host: &host "{{ .Release.Name }}.${SECRET_CLUSTER_DOMAIN}"
paths:
- path: /
service:
name: main
port: http
tls:
- hosts:
- *host

View File

@@ -0,0 +1,9 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default
resources:
- ./helmrelease.yaml
- ./rbac.yaml
- ../../../../templates/gatus/guarded

View File

@@ -0,0 +1,51 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: capacitor
rules:
- apiGroups:
- networking.k8s.io
- apps
- ""
resources:
- pods
- pods/log
- ingresses
- deployments
- services
- secrets
- events
- configmaps
verbs:
- get
- watch
- list
- apiGroups:
- source.toolkit.fluxcd.io
- kustomize.toolkit.fluxcd.io
- helm.toolkit.fluxcd.io
resources:
- gitrepositories
- ocirepositories
- buckets
- kustomizations
- helmreleases
verbs:
- get
- watch
- list
- patch # to allow force reconciling by adding an annotation
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: capacitor
subjects:
- kind: ServiceAccount
name: capacitor
namespace: flux-system
roleRef:
kind: ClusterRole
name: capacitor
apiGroup: rbac.authorization.k8s.io

View File

@@ -0,0 +1,24 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app capacitor
namespace: flux-system
spec:
targetNamespace: flux-system
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/flux-system/capacitor/app
prune: true
sourceRef:
kind: GitRepository
name: home-ops-kubernetes
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m
postBuild:
substitute:
APP: *app

View File

@@ -7,4 +7,5 @@ resources:
- ./namespace.yaml - ./namespace.yaml
# Flux-Kustomizations # Flux-Kustomizations
- ./addons/ks.yaml - ./addons/ks.yaml
- ./capacitor/ks.yaml
# Standard Resources # Standard Resources