Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: reorganise/update apps #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
port: 80
targetPort: 8080
---
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: httpbin-staging
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: filebrowser
spec:
serviceName: filebrowser
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: prod
namespace: staging

labels:
- includeSelectors: true
pairs:
app.kubernetes.io/name: filebrowser

resources:
- filebrowser-sts.yaml
- filebrowser-svc.yaml
- deployment.yaml
- service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Service
metadata:
name: filebrowser
spec:
type: LoadBalancer
type: ClusterIP
selector:
app.kubernetes.io/name: filebrowser
ports:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: homarr
spec:
serviceName: homarr
replicas: 1
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: prod
namespace: staging

labels:
- includeSelectors: true
pairs:
app.kubernetes.io/name: homarr

resources:
- homarr-sts.yaml
- homarr-svc.yaml
- deployment.yaml
- service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Service
metadata:
name: homarr
spec:
type: LoadBalancer
type: ClusterIP
selector:
app.kubernetes.io/name: homarr
ports:
Expand Down
75 changes: 75 additions & 0 deletions ak1pro/apps/base/homepage/configMap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: homepage
namespace: default
labels:
app.kubernetes.io/name: homepage
data:
kubernetes.yaml: |
mode: cluster
settings.yaml: ""
#settings.yaml: |
# providers:
# longhorn:
# url: https://longhorn.my.network
custom.css: ""
custom.js: ""
bookmarks.yaml: |
- Developer:
- Github:
- abbr: GH
href: https://github.com/
services.yaml: |
- Media
- qBittorrent:
icon: qbittorrent.png
href: https://qb.ak1pro.n1l.ro/
description: Torrent client
widget:
type: qbittorrent
url: https://qb.ak1pro.n1l.ro/
username: admin
password: adminadmin
- Jellyfin:
icon: jellyfin.png
href: https://jf.ak1pro.n1l.ro/
description: Movies & TV Shows
widget:
type: jellyfin
url: https://jf.ak1pro.n1l.ro/
key: fa93b3ac9051dfc43c983bdc3cfe734b
enableBlocks: true # optional, defaults to false
enableNowPlaying: true # optional, defaults to true

- My Second Group:
- My Second Service:
href: http://localhost/
description: Homepage is the best

- My Third Group:
- My Third Service:
href: http://localhost/
description: Homepage is 😎
widgets.yaml: |
- kubernetes:
cluster:
show: false
cpu: true
memory: true
showLabel: true
label: "ak1pro"
nodes:
show: true
cpu: true
memory: true
showLabel: true
- resources:
backend: resources
expanded: true
cpu: true
memory: true
- search:
provider: duckduckgo
target: _blank
docker.yaml: ""
65 changes: 65 additions & 0 deletions ak1pro/apps/base/homepage/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: homepage
namespace: default
labels:
app.kubernetes.io/name: homepage
spec:
revisionHistoryLimit: 3
replicas: 1
strategy:
type: RollingUpdate
selector:
matchLabels:
app.kubernetes.io/name: homepage
template:
metadata:
labels:
app.kubernetes.io/name: homepage
spec:
serviceAccountName: homepage
automountServiceAccountToken: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
containers:
- name: homepage
image: "ghcr.io/gethomepage/homepage:latest"
imagePullPolicy: Always
ports:
- name: http
containerPort: 3000
protocol: TCP
volumeMounts:
- mountPath: /app/config/custom.js
name: homepage-config
subPath: custom.js
- mountPath: /app/config/custom.css
name: homepage-config
subPath: custom.css
- mountPath: /app/config/bookmarks.yaml
name: homepage-config
subPath: bookmarks.yaml
- mountPath: /app/config/docker.yaml
name: homepage-config
subPath: docker.yaml
- mountPath: /app/config/kubernetes.yaml
name: homepage-config
subPath: kubernetes.yaml
- mountPath: /app/config/services.yaml
name: homepage-config
subPath: services.yaml
- mountPath: /app/config/settings.yaml
name: homepage-config
subPath: settings.yaml
- mountPath: /app/config/widgets.yaml
name: homepage-config
subPath: widgets.yaml
- mountPath: /app/config/logs
name: logs
volumes:
- name: homepage-config
configMap:
name: homepage
- name: logs
emptyDir: {}
23 changes: 23 additions & 0 deletions ak1pro/apps/base/homepage/httpRoute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: homepage-prod
namespace: prod
spec:
parentRefs:
- kind: Gateway
name: envoy-gateway
namespace: kube-public
sectionName: https
hostnames:
- "homepage.ak1pro.n1l.ro"
- "homepage-prod.ak1pro.n1l.ro"
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: homepage
port: 3000
17 changes: 17 additions & 0 deletions ak1pro/apps/base/homepage/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: staging

labels:
- includeSelectors: true
pairs:
app.kubernetes.io/name: homepage

resources:
- configMap.yaml
- serviceAccount.yaml
- rbac.yaml
- secret.yaml
- service.yaml
- deployment.yaml
- httpRoute.yaml
54 changes: 54 additions & 0 deletions ak1pro/apps/base/homepage/rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: homepage
labels:
app.kubernetes.io/name: homepage
rules:
- apiGroups:
- ""
resources:
- namespaces
- pods
- nodes
verbs:
- get
- list
- apiGroups:
- extensions
- networking.k8s.io
resources:
- ingresses
verbs:
- get
- list
- apiGroups:
- traefik.containo.us
resources:
- ingressroutes
verbs:
- get
- list
- apiGroups:
- metrics.k8s.io
resources:
- nodes
- pods
verbs:
- get
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: homepage
labels:
app.kubernetes.io/name: homepage
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: homepage
subjects:
- kind: ServiceAccount
name: homepage
namespace: default
10 changes: 10 additions & 0 deletions ak1pro/apps/base/homepage/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
name: homepage
namespace: default
labels:
app.kubernetes.io/name: homepage
annotations:
kubernetes.io/service-account.name: homepage
17 changes: 17 additions & 0 deletions ak1pro/apps/base/homepage/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: homepage
namespace: default
labels:
app.kubernetes.io/name: homepage
annotations:
spec:
type: ClusterIP
ports:
- port: 3000
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/name: homepage
9 changes: 9 additions & 0 deletions ak1pro/apps/base/homepage/serviceAccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: homepage
namespace: default
labels:
app.kubernetes.io/name: homepage
secrets:
- name: homepage
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ labels:
app.kubernetes.io/name: jellyfin

resources:
- jellyfin-sts.yaml
- jellyfin-svc.yaml
- statefulSet.yaml
- service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ metadata:
name: jellyfin
namespace: staging
spec:
type: LoadBalancer
loadBalancerIP: 192.168.100.146
type: ClusterIP
selector:
app.kubernetes.io/name: jellyfin
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spec:
containers:
- name: jellyfin
image: jellyfin/jellyfin:latest
imagePullPolicy: Always
env:
- name: TZ
value: "Europe/Bucharest"
Expand Down
Loading