WIP Readme

This commit is contained in:
Baptiste Bonnot 2024-10-25 17:49:08 +02:00
parent b2f132040f
commit ff18023ed9
10 changed files with 395 additions and 2 deletions

View file

@ -0,0 +1,102 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app echo-server
spec:
serviceAccountName: ${REPOS_NAME}-sa
interval: 30m
chart:
spec:
chart: app-template
version: 3.2.1
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: ${REPOS_NAME}-ns
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
values:
controllers:
echo-server:
replicas: 2
strategy: RollingUpdate
containers:
app:
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 33
env:
HTTP_PORT: &port 8080
LOG_WITHOUT_NEWLINE: true
LOG_IGNORE_PATH: /healthz
PROMETHEUS_ENABLED: true
probes:
liveness: &probes
enabled: true
custom: true
spec:
httpGet:
path: /healthz
port: *port
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
readiness: *probes
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: { drop: ["ALL"] }
seccompProfile:
type: RuntimeDefault
resources:
requests:
cpu: 10m
limits:
memory: 64Mi
defaultPodOptions:
securityContext:
runAsNonRoot: true
seccompProfile: { type: RuntimeDefault }
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: *app
service:
app:
controller: echo-server
ports:
http:
port: *port
serviceMonitor:
app:
serviceName: echo-server
endpoints:
- port: http
scheme: http
path: /metrics
interval: 1m
scrapeTimeout: 10s
ingress:
app:
className: external
hosts:
#- host: "{{ .Release.Name }}{{ .Release.Namespace }}.pub.staging.kvant.cloud"
- host: "{{ .Release.Name }}{{ .Release.Namespace }}.pub.${CLUSTER_DOMAIN}"
paths:
- path: /
service:
identifier: app
port: http

View file

@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml

22
echo-server/ks.yaml Normal file
View file

@ -0,0 +1,22 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app echo-server
namespace: ${REPOS_NAME}-ns
spec:
targetNamespace: ${REPOS_NAME}-ns
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./echo-server/app
prune: true
serviceAccountName: ${REPOS_NAME}-sa
sourceRef:
kind: GitRepository
name: ${REPOS_NAME}-tenant-repos
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m