Skip to content

Commit

Permalink
chore(kube-web-view): migrate to app-template (#541)
Browse files Browse the repository at this point in the history
Aligns it closer with all the other apps. Also avoids running into
sporadic git errors when codeberg has small hiccups.
  • Loading branch information
martinohmann authored Mar 25, 2024
1 parent 4fa3687 commit 35e8c8f
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,4 @@ spec:
- "dial.*tcp.*timeout"
- "waiting.*socket"
- "requested URL returned error: 50[023]"
- "timeout.*codeberg\\.org"
suspend: false
84 changes: 84 additions & 0 deletions kubernetes/apps/monitoring/kube-web-view/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: &app kube-web-view
spec:
interval: 2h
chart:
spec:
chart: app-template
version: 3.0.4
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
strategy: uninstall
uninstall:
keepHistory: false
values:
controllers:
kube-web-view:
strategy: RollingUpdate
containers:
app:
image:
repository: hjacobs/kube-web-view
tag: 23.8.0
args:
- --port=8080
- --show-container-logs
probes:
readiness:
enabled: true
custom: true
spec:
httpGet:
path: /health
port: 8080
resources:
limits:
memory: 100Mi
requests:
cpu: 5m
memory: 100Mi
pod:
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
service:
app:
controller: kube-web-view
ports:
http:
port: 8080
serviceAccount:
name: *app
ingress:
app:
enabled: true
className: internal
annotations:
gethomepage.dev/enabled: "true"
gethomepage.dev/group: Observability
gethomepage.dev/icon: kubernetes.png
gethomepage.dev/name: Kube Web View
hosts:
- host: &host kube-web-view.18b.haus
paths:
- path: /
service:
identifier: app
port: http
tls:
- hosts:
- *host
27 changes: 0 additions & 27 deletions kubernetes/apps/monitoring/kube-web-view/app/ingress.yaml

This file was deleted.

25 changes: 2 additions & 23 deletions kubernetes/apps/monitoring/kube-web-view/app/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./ingress.yaml
- https://codeberg.org/hjacobs/kube-web-view/deploy?ref=23.8.0
images:
- name: hjacobs/kube-web-view
newTag: 23.8.0
patches:
- patch: |
apiVersion: apps/v1
kind: Deployment
metadata:
name: kube-web-view
spec:
revisionHistoryLimit: 3
template:
spec:
containers:
- name: kube-web-view
args:
- --port=8080
- --show-container-logs
target:
kind: Deployment
name: kube-web-view
- ./rbac.yaml
- ./helmrelease.yaml
36 changes: 36 additions & 0 deletions kubernetes/apps/monitoring/kube-web-view/app/rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kube-web-view
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kube-web-view
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- list
- get
- nonResourceURLs:
- '*'
verbs:
- list
- get
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: &app kube-web-view
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: *app
subjects:
- kind: ServiceAccount
name: *app
namespace: monitoring

0 comments on commit 35e8c8f

Please sign in to comment.