forked from k-space/kube
Compare commits
18 Commits
update_git
...
ingressrou
Author | SHA1 | Date | |
---|---|---|---|
6b635b6dc7 | |||
1bcfbed130 | |||
3b1cda8a58 | |||
2fd0112c28 | |||
9275f745ce | |||
3d86b6acde | |||
4a94cd4af0 | |||
a27f273c0b | |||
4686108f42 | |||
30b7e50afb | |||
e4c9675b99 | |||
017bdd9fd8 | |||
0fd0094ba0 | |||
d20fdf350d | |||
bac5040d2a | |||
|
4d5851259d | ||
8ee1896a55 | |||
04b786b18d |
15
README.md
15
README.md
@@ -23,6 +23,7 @@ Most endpoints are protected by OIDC autentication or Authelia SSO middleware.
|
|||||||
|
|
||||||
General discussion is happening in the `#kube` Slack channel.
|
General discussion is happening in the `#kube` Slack channel.
|
||||||
|
|
||||||
|
<details><summary>Bootstrapping access</summary>
|
||||||
For bootstrap access obtain `/etc/kubernetes/admin.conf` from one of the master
|
For bootstrap access obtain `/etc/kubernetes/admin.conf` from one of the master
|
||||||
nodes and place it under `~/.kube/config` on your machine.
|
nodes and place it under `~/.kube/config` on your machine.
|
||||||
|
|
||||||
@@ -46,9 +47,9 @@ EOF
|
|||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
systemctl restart kubelet
|
systemctl restart kubelet
|
||||||
```
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
Afterwards following can be used to talk to the Kubernetes cluster using
|
The following can be used to talk to the Kubernetes cluster using OIDC credentials:
|
||||||
OIDC credentials:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl krew install oidc-login
|
kubectl krew install oidc-login
|
||||||
@@ -89,6 +90,16 @@ EOF
|
|||||||
|
|
||||||
For access control mapping see [cluster-role-bindings.yml](cluster-role-bindings.yml)
|
For access control mapping see [cluster-role-bindings.yml](cluster-role-bindings.yml)
|
||||||
|
|
||||||
|
### systemd-resolved issues on access
|
||||||
|
```sh
|
||||||
|
Unable to connect to the server: dial tcp: lookup master.kube.k-space.ee on 127.0.0.53:53: no such host
|
||||||
|
```
|
||||||
|
```
|
||||||
|
Network → VPN → `IPv4` → Other nameservers (Muud nimeserverid): `172.21.0.1`
|
||||||
|
Network → VPN → `IPv6` → Other nameservers (Muud nimeserverid): `2001:bb8:4008:21::1`
|
||||||
|
Network → VPN → `IPv4` → Search domains (Otsingudomeenid): `kube.k-space.ee`
|
||||||
|
Network → VPN → `IPv6` → Search domains (Otsingudomeenid): `kube.k-space.ee`
|
||||||
|
```
|
||||||
|
|
||||||
# Technology mapping
|
# Technology mapping
|
||||||
|
|
||||||
|
17
argocd/applications/grafana.yml
Normal file
17
argocd/applications/grafana.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: grafana
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: 'git@git.k-space.ee:k-space/kube.git'
|
||||||
|
path: grafana
|
||||||
|
targetRevision: HEAD
|
||||||
|
destination:
|
||||||
|
server: 'https://kubernetes.default.svc'
|
||||||
|
namespace: grafana
|
||||||
|
syncPolicy:
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
@@ -16,7 +16,6 @@ server:
|
|||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
@@ -24,8 +23,7 @@ server:
|
|||||||
- argocd.k-space.ee
|
- argocd.k-space.ee
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- argocd.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: argocd-server-tls
|
|
||||||
configEnabled: true
|
configEnabled: true
|
||||||
config:
|
config:
|
||||||
admin.enabled: "false"
|
admin.enabled: "false"
|
||||||
|
@@ -162,8 +162,8 @@ kubectl -n argocd create secret generic argocd-secret \
|
|||||||
kubectl get secret -n authelia oidc-secrets -o json \
|
kubectl get secret -n authelia oidc-secrets -o json \
|
||||||
| jq '.data."oidc-secrets.yml"' -r | base64 -d | yq -o json \
|
| jq '.data."oidc-secrets.yml"' -r | base64 -d | yq -o json \
|
||||||
| jq '.identity_providers.oidc.clients[] | select(.id == "argocd") | .secret' -r)
|
| jq '.identity_providers.oidc.clients[] | select(.id == "argocd") | .secret' -r)
|
||||||
kubectl -n monitoring delete secret oidc-secret
|
kubectl -n grafana delete secret oidc-secret
|
||||||
kubectl -n monitoring create secret generic oidc-secret \
|
kubectl -n grafana create secret generic oidc-secret \
|
||||||
--from-literal=GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET=$( \
|
--from-literal=GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET=$( \
|
||||||
kubectl get secret -n authelia oidc-secrets -o json \
|
kubectl get secret -n authelia oidc-secrets -o json \
|
||||||
| jq '.data."oidc-secrets.yml"' -r | base64 -d | yq -o json \
|
| jq '.data."oidc-secrets.yml"' -r | base64 -d | yq -o json \
|
||||||
|
@@ -295,7 +295,6 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: authelia
|
app.kubernetes.io/name: authelia
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
kubernetes.io/tls-acme: "true"
|
kubernetes.io/tls-acme: "true"
|
||||||
traefik.ingress.kubernetes.io/router.entryPoints: websecure
|
traefik.ingress.kubernetes.io/router.entryPoints: websecure
|
||||||
@@ -315,8 +314,7 @@ spec:
|
|||||||
number: 80
|
number: 80
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- auth.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: authelia-tls
|
|
||||||
---
|
---
|
||||||
apiVersion: traefik.containo.us/v1alpha1
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
kind: Middleware
|
kind: Middleware
|
||||||
|
@@ -182,12 +182,6 @@ metadata:
|
|||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: traefik
|
kubernetes.io/ingress.class: traefik
|
||||||
|
|
||||||
# Following specifies the certificate issuer defined in
|
|
||||||
# ../cert-manager/issuer.yml
|
|
||||||
# This is where the HTTPS certificates for the
|
|
||||||
# `tls:` section below are obtained from
|
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
|
|
||||||
# This tells Traefik this Ingress object is associated with the
|
# This tells Traefik this Ingress object is associated with the
|
||||||
# https:// entrypoint
|
# https:// entrypoint
|
||||||
# Global http:// to https:// redirect is enabled in
|
# Global http:// to https:// redirect is enabled in
|
||||||
@@ -234,8 +228,7 @@ spec:
|
|||||||
number: 3003
|
number: 3003
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- cams.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: camtiler-tls
|
|
||||||
---
|
---
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: NetworkPolicy
|
kind: NetworkPolicy
|
||||||
@@ -371,7 +364,6 @@ metadata:
|
|||||||
name: minio
|
name: minio
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: traefik
|
kubernetes.io/ingress.class: traefik
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
@@ -389,8 +381,7 @@ spec:
|
|||||||
number: 80
|
number: 80
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- cams-s3.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: cams-s3-tls
|
|
||||||
---
|
---
|
||||||
apiVersion: apiextensions.k8s.io/v1
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
|
@@ -77,14 +77,11 @@ steps:
|
|||||||
- echo "ENV GIT_COMMIT_TIMESTAMP=$(git log -1 --format=%cd --date=iso-strict)" >> Dockerfile
|
- echo "ENV GIT_COMMIT_TIMESTAMP=$(git log -1 --format=%cd --date=iso-strict)" >> Dockerfile
|
||||||
- cat Dockerfile
|
- cat Dockerfile
|
||||||
- name: docker
|
- name: docker
|
||||||
image: plugins/docker
|
image: harbor.k-space.ee/k-space/drone-kaniko
|
||||||
settings:
|
settings:
|
||||||
repo: harbor.k-space.ee/${DRONE_REPO}
|
repo: ${DRONE_REPO}
|
||||||
tags: latest-arm64
|
tags: latest-arm64
|
||||||
registry: harbor.k-space.ee
|
registry: harbor.k-space.ee
|
||||||
squash: true
|
|
||||||
experimental: true
|
|
||||||
mtu: 1300
|
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
@@ -109,14 +106,11 @@ steps:
|
|||||||
- echo "ENV GIT_COMMIT_TIMESTAMP=$(git log -1 --format=%cd --date=iso-strict)" >> Dockerfile
|
- echo "ENV GIT_COMMIT_TIMESTAMP=$(git log -1 --format=%cd --date=iso-strict)" >> Dockerfile
|
||||||
- cat Dockerfile
|
- cat Dockerfile
|
||||||
- name: docker
|
- name: docker
|
||||||
image: plugins/docker
|
image: harbor.k-space.ee/k-space/drone-kaniko
|
||||||
settings:
|
settings:
|
||||||
repo: harbor.k-space.ee/${DRONE_REPO}
|
repo: ${DRONE_REPO}
|
||||||
tags: latest-amd64
|
tags: latest-amd64
|
||||||
registry: harbor.k-space.ee
|
registry: harbor.k-space.ee
|
||||||
squash: true
|
|
||||||
experimental: true
|
|
||||||
mtu: 1300
|
|
||||||
storage_driver: vfs
|
storage_driver: vfs
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
@@ -130,8 +124,8 @@ steps:
|
|||||||
- name: manifest
|
- name: manifest
|
||||||
image: plugins/manifest
|
image: plugins/manifest
|
||||||
settings:
|
settings:
|
||||||
target: harbor.k-space.ee/${DRONE_REPO}:latest
|
target: ${DRONE_REPO}:latest
|
||||||
template: harbor.k-space.ee/${DRONE_REPO}:latest-ARCH
|
template: ${DRONE_REPO}:latest-ARCH
|
||||||
platforms:
|
platforms:
|
||||||
- linux/amd64
|
- linux/amd64
|
||||||
- linux/arm64
|
- linux/arm64
|
||||||
|
@@ -83,7 +83,6 @@ kind: Ingress
|
|||||||
metadata:
|
metadata:
|
||||||
name: drone
|
name: drone
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
kubernetes.io/ingress.class: traefik
|
kubernetes.io/ingress.class: traefik
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
@@ -91,8 +90,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- "drone.k-space.ee"
|
- "*.k-space.ee"
|
||||||
secretName: drone-tls
|
|
||||||
rules:
|
rules:
|
||||||
- host: "drone.k-space.ee"
|
- host: "drone.k-space.ee"
|
||||||
http:
|
http:
|
||||||
|
@@ -5,11 +5,9 @@ metadata:
|
|||||||
name: filebeat
|
name: filebeat
|
||||||
spec:
|
spec:
|
||||||
type: filebeat
|
type: filebeat
|
||||||
version: 8.4.1
|
version: 8.4.3
|
||||||
elasticsearchRef:
|
elasticsearchRef:
|
||||||
name: elasticsearch
|
name: elasticsearch
|
||||||
kibanaRef:
|
|
||||||
name: kibana
|
|
||||||
config:
|
config:
|
||||||
logging:
|
logging:
|
||||||
level: warning
|
level: warning
|
||||||
@@ -29,6 +27,9 @@ spec:
|
|||||||
- /var/log/containers/*${data.kubernetes.container.id}.log
|
- /var/log/containers/*${data.kubernetes.container.id}.log
|
||||||
daemonSet:
|
daemonSet:
|
||||||
podTemplate:
|
podTemplate:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
co.elastic.logs/enabled: 'false'
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: filebeat
|
serviceAccountName: filebeat
|
||||||
automountServiceAccountToken: true
|
automountServiceAccountToken: true
|
||||||
@@ -85,11 +86,9 @@ metadata:
|
|||||||
name: filebeat-syslog
|
name: filebeat-syslog
|
||||||
spec:
|
spec:
|
||||||
type: filebeat
|
type: filebeat
|
||||||
version: 8.4.1
|
version: 8.4.3
|
||||||
elasticsearchRef:
|
elasticsearchRef:
|
||||||
name: elasticsearch
|
name: elasticsearch
|
||||||
kibanaRef:
|
|
||||||
name: kibana
|
|
||||||
config:
|
config:
|
||||||
logging:
|
logging:
|
||||||
level: warning
|
level: warning
|
||||||
@@ -109,6 +108,9 @@ spec:
|
|||||||
deployment:
|
deployment:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
podTemplate:
|
podTemplate:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
co.elastic.logs/enabled: 'false'
|
||||||
spec:
|
spec:
|
||||||
terminationGracePeriodSeconds: 30
|
terminationGracePeriodSeconds: 30
|
||||||
containers:
|
containers:
|
||||||
@@ -216,7 +218,7 @@ kind: Elasticsearch
|
|||||||
metadata:
|
metadata:
|
||||||
name: elasticsearch
|
name: elasticsearch
|
||||||
spec:
|
spec:
|
||||||
version: 8.4.1
|
version: 8.4.3
|
||||||
nodeSets:
|
nodeSets:
|
||||||
- name: default
|
- name: default
|
||||||
count: 1
|
count: 1
|
||||||
@@ -240,7 +242,7 @@ kind: Kibana
|
|||||||
metadata:
|
metadata:
|
||||||
name: kibana
|
name: kibana
|
||||||
spec:
|
spec:
|
||||||
version: 8.4.1
|
version: 8.4.3
|
||||||
count: 1
|
count: 1
|
||||||
elasticsearchRef:
|
elasticsearchRef:
|
||||||
name: elasticsearch
|
name: elasticsearch
|
||||||
@@ -263,6 +265,9 @@ spec:
|
|||||||
- key: elastic
|
- key: elastic
|
||||||
path: xpack.security.authc.providers.anonymous.anonymous1.credentials.password
|
path: xpack.security.authc.providers.anonymous.anonymous1.credentials.password
|
||||||
podTemplate:
|
podTemplate:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
co.elastic.logs/enabled: 'false'
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: kibana
|
- name: kibana
|
||||||
@@ -283,7 +288,6 @@ metadata:
|
|||||||
name: kibana
|
name: kibana
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: traefik
|
kubernetes.io/ingress.class: traefik
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd
|
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
@@ -302,8 +306,7 @@ spec:
|
|||||||
number: 5601
|
number: 5601
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- kibana.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: kibana-tls
|
|
||||||
---
|
---
|
||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
kind: PodMonitor
|
kind: PodMonitor
|
||||||
|
@@ -79,7 +79,6 @@ metadata:
|
|||||||
namespace: etherpad
|
namespace: etherpad
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: traefik
|
kubernetes.io/ingress.class: traefik
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
@@ -97,8 +96,7 @@ spec:
|
|||||||
number: 9001
|
number: 9001
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- pad.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: pad-tls
|
|
||||||
---
|
---
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: NetworkPolicy
|
kind: NetworkPolicy
|
||||||
|
19
grafana/README.md
Normal file
19
grafana/README.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Grafana
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl create namespace grafana
|
||||||
|
kubectl apply -n grafana -f application.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
## OIDC secret
|
||||||
|
|
||||||
|
See Authelia README on provisioning and updating OIDC secrets for Grafana
|
||||||
|
|
||||||
|
## Grafana post deployment steps
|
||||||
|
|
||||||
|
* Configure Prometheus datasource with URL set to
|
||||||
|
`http://prometheus-operated.prometheus-operator.svc.cluster.local:9090`
|
||||||
|
* Configure Elasticsearch datasource with URL set to
|
||||||
|
`http://elasticsearch.elastic-system.svc.cluster.local`,
|
||||||
|
Time field name set to `timestamp` and
|
||||||
|
ElasticSearch version set to `7.10+`
|
135
grafana/application.yml
Normal file
135
grafana/application.yml
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: grafana-config
|
||||||
|
data:
|
||||||
|
grafana.ini: |
|
||||||
|
[log]
|
||||||
|
level = warn
|
||||||
|
[server]
|
||||||
|
domain = grafana.k-space.ee
|
||||||
|
root_url = https://%(domain)s/
|
||||||
|
[auth.generic_oauth]
|
||||||
|
name = OAuth
|
||||||
|
icon = signin
|
||||||
|
enabled = true
|
||||||
|
client_id = grafana
|
||||||
|
scopes = openid profile email groups
|
||||||
|
empty_scopes = false
|
||||||
|
auth_url = https://auth.k-space.ee/api/oidc/authorize
|
||||||
|
token_url = https://auth.k-space.ee/api/oidc/token
|
||||||
|
api_url = https://auth.k-space.ee/api/oidc/userinfo
|
||||||
|
allow_sign_up = true
|
||||||
|
role_attribute_path = contains(groups[*], 'Grafana Admins') && 'Admin' || 'Viewer'
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: grafana
|
||||||
|
name: grafana
|
||||||
|
spec:
|
||||||
|
revisionHistoryLimit: 0
|
||||||
|
serviceName: grafana
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: grafana
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: grafana
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 472
|
||||||
|
containers:
|
||||||
|
- name: grafana
|
||||||
|
image: grafana/grafana:8.5.0
|
||||||
|
securityContext:
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 472
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: oidc-secret
|
||||||
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
name: http-grafana
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
httpGet:
|
||||||
|
path: /robots.txt
|
||||||
|
port: 3000
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 2
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
tcpSocket:
|
||||||
|
port: 3000
|
||||||
|
timeoutSeconds: 1
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 750Mi
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/lib/grafana
|
||||||
|
name: grafana-data
|
||||||
|
- mountPath: /etc/grafana
|
||||||
|
name: grafana-config
|
||||||
|
volumes:
|
||||||
|
- name: grafana-config
|
||||||
|
configMap:
|
||||||
|
name: grafana-config
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: grafana-data
|
||||||
|
spec:
|
||||||
|
storageClassName: longhorn
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: grafana
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http-grafana
|
||||||
|
selector:
|
||||||
|
app: grafana
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: grafana
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: grafana.k-space.ee
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- pathType: Prefix
|
||||||
|
path: "/"
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: grafana
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- "*.k-space.ee"
|
@@ -397,7 +397,6 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: core
|
- name: core
|
||||||
image: goharbor/harbor-core:v2.4.2
|
image: goharbor/harbor-core:v2.4.2
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
startupProbe:
|
startupProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /api/v2.0/ping
|
path: /api/v2.0/ping
|
||||||
@@ -406,16 +405,9 @@ spec:
|
|||||||
failureThreshold: 360
|
failureThreshold: 360
|
||||||
initialDelaySeconds: 10
|
initialDelaySeconds: 10
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/v2.0/ping
|
|
||||||
scheme: HTTP
|
|
||||||
port: 8080
|
|
||||||
failureThreshold: 2
|
|
||||||
periodSeconds: 10
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /api/v2.0/ping
|
path: /api/v2.0/projects
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
port: 8080
|
port: 8080
|
||||||
failureThreshold: 2
|
failureThreshold: 2
|
||||||
@@ -472,6 +464,13 @@ spec:
|
|||||||
secret:
|
secret:
|
||||||
- name: psc
|
- name: psc
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
nodeSelector:
|
||||||
|
dedicated: storage
|
||||||
|
tolerations:
|
||||||
|
- key: dedicated
|
||||||
|
operator: Equal
|
||||||
|
value: storage
|
||||||
|
effect: NoSchedule
|
||||||
---
|
---
|
||||||
# Source: harbor/templates/jobservice/jobservice-dpl.yaml
|
# Source: harbor/templates/jobservice/jobservice-dpl.yaml
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
@@ -502,14 +501,6 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: jobservice
|
- name: jobservice
|
||||||
image: goharbor/harbor-jobservice:v2.4.2
|
image: goharbor/harbor-jobservice:v2.4.2
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/v1/stats
|
|
||||||
scheme: HTTP
|
|
||||||
port: 8080
|
|
||||||
initialDelaySeconds: 300
|
|
||||||
periodSeconds: 10
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /api/v1/stats
|
path: /api/v1/stats
|
||||||
@@ -544,6 +535,13 @@ spec:
|
|||||||
- name: job-logs
|
- name: job-logs
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: harbor-jobservice
|
claimName: harbor-jobservice
|
||||||
|
nodeSelector:
|
||||||
|
dedicated: storage
|
||||||
|
tolerations:
|
||||||
|
- key: dedicated
|
||||||
|
operator: Equal
|
||||||
|
value: storage
|
||||||
|
effect: NoSchedule
|
||||||
---
|
---
|
||||||
# Source: harbor/templates/portal/deployment.yaml
|
# Source: harbor/templates/portal/deployment.yaml
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
@@ -574,14 +572,6 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: portal
|
- name: portal
|
||||||
image: goharbor/harbor-portal:v2.4.2
|
image: goharbor/harbor-portal:v2.4.2
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /
|
|
||||||
scheme: HTTP
|
|
||||||
port: 8080
|
|
||||||
initialDelaySeconds: 300
|
|
||||||
periodSeconds: 10
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
@@ -599,6 +589,13 @@ spec:
|
|||||||
- name: portal-config
|
- name: portal-config
|
||||||
configMap:
|
configMap:
|
||||||
name: "harbor-portal"
|
name: "harbor-portal"
|
||||||
|
nodeSelector:
|
||||||
|
dedicated: storage
|
||||||
|
tolerations:
|
||||||
|
- key: dedicated
|
||||||
|
operator: Equal
|
||||||
|
value: storage
|
||||||
|
effect: NoSchedule
|
||||||
---
|
---
|
||||||
# Source: harbor/templates/registry/registry-dpl.yaml
|
# Source: harbor/templates/registry/registry-dpl.yaml
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
@@ -629,14 +626,6 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: registry
|
- name: registry
|
||||||
image: goharbor/registry-photon:v2.4.2
|
image: goharbor/registry-photon:v2.4.2
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /
|
|
||||||
scheme: HTTP
|
|
||||||
port: 5000
|
|
||||||
initialDelaySeconds: 300
|
|
||||||
periodSeconds: 10
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
@@ -664,14 +653,6 @@ spec:
|
|||||||
subPath: config.yml
|
subPath: config.yml
|
||||||
- name: registryctl
|
- name: registryctl
|
||||||
image: goharbor/harbor-registryctl:v2.4.2
|
image: goharbor/harbor-registryctl:v2.4.2
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/health
|
|
||||||
scheme: HTTP
|
|
||||||
port: 8080
|
|
||||||
initialDelaySeconds: 300
|
|
||||||
periodSeconds: 10
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /api/health
|
path: /api/health
|
||||||
@@ -722,6 +703,13 @@ spec:
|
|||||||
- name: registry-data
|
- name: registry-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: harbor-registry
|
claimName: harbor-registry
|
||||||
|
nodeSelector:
|
||||||
|
dedicated: storage
|
||||||
|
tolerations:
|
||||||
|
- key: dedicated
|
||||||
|
operator: Equal
|
||||||
|
value: storage
|
||||||
|
effect: NoSchedule
|
||||||
---
|
---
|
||||||
# Source: harbor/templates/database/database-ss.yaml
|
# Source: harbor/templates/database/database-ss.yaml
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
@@ -756,7 +744,6 @@ spec:
|
|||||||
# we may remove it after several releases
|
# we may remove it after several releases
|
||||||
- name: "data-migrator"
|
- name: "data-migrator"
|
||||||
image: goharbor/harbor-db:v2.4.2
|
image: goharbor/harbor-db:v2.4.2
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/sh"]
|
command: ["/bin/sh"]
|
||||||
args: ["-c", "[ -e /var/lib/postgresql/data/postgresql.conf ] && [ ! -d /var/lib/postgresql/data/pgdata ] && mkdir -m 0700 /var/lib/postgresql/data/pgdata && mv /var/lib/postgresql/data/* /var/lib/postgresql/data/pgdata/ || true"]
|
args: ["-c", "[ -e /var/lib/postgresql/data/postgresql.conf ] && [ ! -d /var/lib/postgresql/data/pgdata ] && mkdir -m 0700 /var/lib/postgresql/data/pgdata && mv /var/lib/postgresql/data/* /var/lib/postgresql/data/pgdata/ || true"]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
@@ -769,7 +756,6 @@ spec:
|
|||||||
# as "fsGroup" applied before the init container running, the container has enough permission to execute the command
|
# as "fsGroup" applied before the init container running, the container has enough permission to execute the command
|
||||||
- name: "data-permissions-ensurer"
|
- name: "data-permissions-ensurer"
|
||||||
image: goharbor/harbor-db:v2.4.2
|
image: goharbor/harbor-db:v2.4.2
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/sh"]
|
command: ["/bin/sh"]
|
||||||
args: ["-c", "chmod -R 700 /var/lib/postgresql/data/pgdata || true"]
|
args: ["-c", "chmod -R 700 /var/lib/postgresql/data/pgdata || true"]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
@@ -779,13 +765,6 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: database
|
- name: database
|
||||||
image: goharbor/harbor-db:v2.4.2
|
image: goharbor/harbor-db:v2.4.2
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
livenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /docker-healthcheck.sh
|
|
||||||
initialDelaySeconds: 300
|
|
||||||
periodSeconds: 10
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
exec:
|
exec:
|
||||||
command:
|
command:
|
||||||
@@ -811,6 +790,13 @@ spec:
|
|||||||
emptyDir:
|
emptyDir:
|
||||||
medium: Memory
|
medium: Memory
|
||||||
sizeLimit: 512Mi
|
sizeLimit: 512Mi
|
||||||
|
nodeSelector:
|
||||||
|
dedicated: storage
|
||||||
|
tolerations:
|
||||||
|
- key: dedicated
|
||||||
|
operator: Equal
|
||||||
|
value: storage
|
||||||
|
effect: NoSchedule
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
- metadata:
|
- metadata:
|
||||||
name: "database-data"
|
name: "database-data"
|
||||||
@@ -853,12 +839,6 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: redis
|
- name: redis
|
||||||
image: goharbor/redis-photon:v2.4.2
|
image: goharbor/redis-photon:v2.4.2
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
livenessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: 6379
|
|
||||||
initialDelaySeconds: 300
|
|
||||||
periodSeconds: 10
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: 6379
|
port: 6379
|
||||||
@@ -868,6 +848,13 @@ spec:
|
|||||||
- name: data
|
- name: data
|
||||||
mountPath: /var/lib/redis
|
mountPath: /var/lib/redis
|
||||||
subPath:
|
subPath:
|
||||||
|
nodeSelector:
|
||||||
|
dedicated: storage
|
||||||
|
tolerations:
|
||||||
|
- key: dedicated
|
||||||
|
operator: Equal
|
||||||
|
value: storage
|
||||||
|
effect: NoSchedule
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
- metadata:
|
- metadata:
|
||||||
name: data
|
name: data
|
||||||
@@ -970,15 +957,6 @@ spec:
|
|||||||
mountPath: /home/scanner/.cache
|
mountPath: /home/scanner/.cache
|
||||||
subPath:
|
subPath:
|
||||||
readOnly: false
|
readOnly: false
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
scheme: HTTP
|
|
||||||
path: /probe/healthy
|
|
||||||
port: api-server
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 10
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
@@ -995,6 +973,13 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
cpu: 200m
|
cpu: 200m
|
||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
|
nodeSelector:
|
||||||
|
dedicated: storage
|
||||||
|
tolerations:
|
||||||
|
- key: dedicated
|
||||||
|
operator: Equal
|
||||||
|
value: storage
|
||||||
|
effect: NoSchedule
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
- metadata:
|
- metadata:
|
||||||
name: data
|
name: data
|
||||||
@@ -1016,7 +1001,6 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
app: harbor
|
app: harbor
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
ingress.kubernetes.io/proxy-body-size: "0"
|
ingress.kubernetes.io/proxy-body-size: "0"
|
||||||
ingress.kubernetes.io/ssl-redirect: "true"
|
ingress.kubernetes.io/ssl-redirect: "true"
|
||||||
@@ -1027,9 +1011,8 @@ metadata:
|
|||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
spec:
|
spec:
|
||||||
tls:
|
tls:
|
||||||
- secretName: harbor-tls
|
- hosts:
|
||||||
hosts:
|
- "*.k-space.ee"
|
||||||
- harbor.k-space.ee
|
|
||||||
rules:
|
rules:
|
||||||
- http:
|
- http:
|
||||||
paths:
|
paths:
|
||||||
|
197
kube-system/metrics-server.yml
Normal file
197
kube-system/metrics-server.yml
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
name: metrics-server
|
||||||
|
namespace: kube-system
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-view: "true"
|
||||||
|
name: system:aggregated-metrics-reader
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- metrics.k8s.io
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
- nodes
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
name: system:metrics-server
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- nodes/metrics
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
- nodes
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
name: metrics-server-auth-reader
|
||||||
|
namespace: kube-system
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: extension-apiserver-authentication-reader
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: metrics-server
|
||||||
|
namespace: kube-system
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
name: metrics-server:system:auth-delegator
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: system:auth-delegator
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: metrics-server
|
||||||
|
namespace: kube-system
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
name: system:metrics-server
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: system:metrics-server
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: metrics-server
|
||||||
|
namespace: kube-system
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
name: metrics-server
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: https
|
||||||
|
port: 443
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: https
|
||||||
|
selector:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
name: metrics-server
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
strategy:
|
||||||
|
rollingUpdate:
|
||||||
|
maxUnavailable: 0
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- --cert-dir=/tmp
|
||||||
|
- --secure-port=4443
|
||||||
|
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
|
||||||
|
- --kubelet-use-node-status-port
|
||||||
|
- --kubelet-insecure-tls
|
||||||
|
- --metric-resolution=15s
|
||||||
|
image: k8s.gcr.io/metrics-server/metrics-server:v0.6.1
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
httpGet:
|
||||||
|
path: /livez
|
||||||
|
port: https
|
||||||
|
scheme: HTTPS
|
||||||
|
periodSeconds: 10
|
||||||
|
name: metrics-server
|
||||||
|
ports:
|
||||||
|
- containerPort: 4443
|
||||||
|
name: https
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
httpGet:
|
||||||
|
path: /readyz
|
||||||
|
port: https
|
||||||
|
scheme: HTTPS
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 10
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 200Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /tmp
|
||||||
|
name: tmp-dir
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/os: linux
|
||||||
|
priorityClassName: system-cluster-critical
|
||||||
|
serviceAccountName: metrics-server
|
||||||
|
volumes:
|
||||||
|
- emptyDir: {}
|
||||||
|
name: tmp-dir
|
||||||
|
---
|
||||||
|
apiVersion: apiregistration.k8s.io/v1
|
||||||
|
kind: APIService
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: metrics-server
|
||||||
|
name: v1beta1.metrics.k8s.io
|
||||||
|
spec:
|
||||||
|
group: metrics.k8s.io
|
||||||
|
groupPriorityMinimum: 100
|
||||||
|
insecureSkipTLSVerify: true
|
||||||
|
service:
|
||||||
|
name: metrics-server
|
||||||
|
namespace: kube-system
|
||||||
|
version: v1beta1
|
||||||
|
versionPriority: 100
|
@@ -269,7 +269,6 @@ metadata:
|
|||||||
certManager: "true"
|
certManager: "true"
|
||||||
rewriteTarget: "true"
|
rewriteTarget: "true"
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
kubernetes.io/ingress.class: traefik
|
kubernetes.io/ingress.class: traefik
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
@@ -289,5 +288,4 @@ spec:
|
|||||||
number: 80
|
number: 80
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- dashboard.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: dashboard-tls
|
|
||||||
|
@@ -5,7 +5,6 @@ metadata:
|
|||||||
namespace: longhorn-system
|
namespace: longhorn-system
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: traefik
|
kubernetes.io/ingress.class: traefik
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd
|
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd
|
||||||
@@ -24,9 +23,7 @@ spec:
|
|||||||
number: 80
|
number: 80
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- longhorn.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: longhorn-tls
|
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
kind: PodMonitor
|
kind: PodMonitor
|
||||||
|
@@ -1056,9 +1056,6 @@ spec:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
|
||||||
prometheus.io/scrape: "true"
|
|
||||||
prometheus.io/port: "9500"
|
|
||||||
labels:
|
labels:
|
||||||
app: longhorn-manager
|
app: longhorn-manager
|
||||||
name: longhorn-backend
|
name: longhorn-backend
|
||||||
|
@@ -40,7 +40,6 @@ metadata:
|
|||||||
name: phpmyadmin
|
name: phpmyadmin
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: traefik
|
kubernetes.io/ingress.class: traefik
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd
|
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
@@ -59,8 +58,7 @@ spec:
|
|||||||
number: 80
|
number: 80
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- phpmyadmin.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: phpmyadmin-tls
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
|
10
playground/README.md
Normal file
10
playground/README.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Playground
|
||||||
|
|
||||||
|
Playground namespace is accessible to `Developers` AD group.
|
||||||
|
|
||||||
|
Novel log aggregator is being developer in this namespace:
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl create secret generic -n playground mongodb-application-readwrite-password --from-literal="password=$(cat /dev/urandom | base64 | head -c 30)"
|
||||||
|
kubectl create secret generic -n playground mongodb-application-readonly-password --from-literal="password=$(cat /dev/urandom | base64 | head -c 30)"
|
||||||
|
kubectl apply -n playground -f logging.yml -f mongodb-support.yml -f mongoexpress.yml -f networkpolicy-base.yml
|
263
playground/logging.yml
Normal file
263
playground/logging.yml
Normal file
@@ -0,0 +1,263 @@
|
|||||||
|
---
|
||||||
|
apiVersion: mongodbcommunity.mongodb.com/v1
|
||||||
|
kind: MongoDBCommunity
|
||||||
|
metadata:
|
||||||
|
name: mongodb
|
||||||
|
spec:
|
||||||
|
additionalMongodConfig:
|
||||||
|
systemLog:
|
||||||
|
quiet: true
|
||||||
|
members: 3
|
||||||
|
type: ReplicaSet
|
||||||
|
version: "5.0.13"
|
||||||
|
security:
|
||||||
|
authentication:
|
||||||
|
modes: ["SCRAM"]
|
||||||
|
users:
|
||||||
|
- name: readwrite
|
||||||
|
db: application
|
||||||
|
passwordSecretRef:
|
||||||
|
name: mongodb-application-readwrite-password
|
||||||
|
roles:
|
||||||
|
- name: readWrite
|
||||||
|
db: application
|
||||||
|
scramCredentialsSecretName: mongodb-application-readwrite
|
||||||
|
- name: readonly
|
||||||
|
db: application
|
||||||
|
passwordSecretRef:
|
||||||
|
name: mongodb-application-readonly-password
|
||||||
|
roles:
|
||||||
|
- name: readOnly
|
||||||
|
db: application
|
||||||
|
scramCredentialsSecretName: mongodb-application-readonly
|
||||||
|
statefulSet:
|
||||||
|
spec:
|
||||||
|
logLevel: WARN
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mongod
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 2Gi
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 2Gi
|
||||||
|
- name: mongodb-agent
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 1m
|
||||||
|
memory: 100Mi
|
||||||
|
limits: {}
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- labelSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: app
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- mongodb-svc
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
nodeSelector:
|
||||||
|
dedicated: monitoring
|
||||||
|
tolerations:
|
||||||
|
- key: dedicated
|
||||||
|
operator: Equal
|
||||||
|
value: monitoring
|
||||||
|
effect: NoSchedule
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: logs-volume
|
||||||
|
spec:
|
||||||
|
storageClassName: local-path
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 512Mi
|
||||||
|
- metadata:
|
||||||
|
name: data-volume
|
||||||
|
spec:
|
||||||
|
storageClassName: local-path
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 2Gi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: log-shipper
|
||||||
|
spec:
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxUnavailable: 50%
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: log-shipper
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: log-shipper
|
||||||
|
spec:
|
||||||
|
serviceAccountName: log-shipper
|
||||||
|
containers:
|
||||||
|
- name: log-shipper
|
||||||
|
image: harbor.k-space.ee/k-space/log-shipper
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
env:
|
||||||
|
- name: MY_POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
- name: MONGODB_HOST
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mongodb-application-readwrite
|
||||||
|
key: connectionString.standard
|
||||||
|
ports:
|
||||||
|
- containerPort: 8000
|
||||||
|
name: metrics
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: 200Mi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 100Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: etcmachineid
|
||||||
|
mountPath: /etc/machine-id
|
||||||
|
readOnly: true
|
||||||
|
- name: varlibdockercontainers
|
||||||
|
mountPath: /var/lib/docker/containers
|
||||||
|
readOnly: true
|
||||||
|
- name: varlog
|
||||||
|
mountPath: /var/log
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: etcmachineid
|
||||||
|
hostPath:
|
||||||
|
path: /etc/machine-id
|
||||||
|
- name: varlibdockercontainers
|
||||||
|
hostPath:
|
||||||
|
path: /var/lib/docker/containers
|
||||||
|
- name: varlog
|
||||||
|
hostPath:
|
||||||
|
path: /var/log
|
||||||
|
tolerations:
|
||||||
|
- operator: "Exists"
|
||||||
|
effect: "NoExecute"
|
||||||
|
- operator: "Exists"
|
||||||
|
effect: "NoSchedule"
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: logging-log-shipper
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: log-shipper
|
||||||
|
namespace: playground
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: filebeat
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: log-shipper
|
||||||
|
labels:
|
||||||
|
app: log-shipper
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: log-shipper
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: log-shipper
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
- Egress
|
||||||
|
ingress:
|
||||||
|
- from:
|
||||||
|
- namespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
kubernetes.io/metadata.name: prometheus-operator
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: prometheus
|
||||||
|
egress:
|
||||||
|
- to:
|
||||||
|
- podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: mongodb-svc
|
||||||
|
ports:
|
||||||
|
- port: 27017
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: log-viewer-backend
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: log-viewer-backend
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
- Egress
|
||||||
|
egress:
|
||||||
|
- to:
|
||||||
|
- podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: mongodb-svc
|
||||||
|
ingress:
|
||||||
|
- from:
|
||||||
|
- namespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
kubernetes.io/metadata.name: traefik
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: traefik
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: log-viewer-frontend
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: log-viewer-frontend
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
- Egress
|
||||||
|
ingress:
|
||||||
|
- from:
|
||||||
|
- namespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
kubernetes.io/metadata.name: traefik
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: traefik
|
||||||
|
---
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
metadata:
|
||||||
|
name: log-shipper
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: log-shipper
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- port: metrics
|
1
playground/mongodb-support.yml
Symbolic link
1
playground/mongodb-support.yml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../mongodb-operator/mongodb-support.yml
|
1
playground/mongoexpress.yml
Symbolic link
1
playground/mongoexpress.yml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../shared/mongoexpress.yml
|
1
playground/networkpolicy-base.yml
Symbolic link
1
playground/networkpolicy-base.yml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../shared/networkpolicy-base.yml
|
@@ -399,7 +399,6 @@ kind: Ingress
|
|||||||
metadata:
|
metadata:
|
||||||
name: prometheus
|
name: prometheus
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
@@ -418,15 +417,13 @@ spec:
|
|||||||
number: 9090
|
number: 9090
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- prom.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: prom-tls
|
|
||||||
---
|
---
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: alertmanager
|
name: alertmanager
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
@@ -445,8 +442,7 @@ spec:
|
|||||||
number: 9093
|
number: 9093
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- am.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: alertmanager-tls
|
|
||||||
---
|
---
|
||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
kind: PodMonitor
|
kind: PodMonitor
|
||||||
|
@@ -156,7 +156,7 @@ metadata:
|
|||||||
name: blackbox-exporter
|
name: blackbox-exporter
|
||||||
spec:
|
spec:
|
||||||
revisionHistoryLimit: 0
|
revisionHistoryLimit: 0
|
||||||
replicas: 2
|
replicas: 3
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: blackbox-exporter
|
app: blackbox-exporter
|
||||||
|
@@ -5,5 +5,6 @@ Calico implements the inter-pod overlay network
|
|||||||
```
|
```
|
||||||
curl https://projectcalico.docs.tigera.io/manifests/tigera-operator.yaml -O
|
curl https://projectcalico.docs.tigera.io/manifests/tigera-operator.yaml -O
|
||||||
curl https://projectcalico.docs.tigera.io/manifests/custom-resources.yaml -O
|
curl https://projectcalico.docs.tigera.io/manifests/custom-resources.yaml -O
|
||||||
kubectl apply -f tigera-operator.yaml -f custom-resources.yaml
|
kubectl apply -f custom-resources.yaml
|
||||||
|
kubectl replace -f tigera-operator.yaml
|
||||||
```
|
```
|
||||||
|
@@ -1,64 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
NAMESPACE=${NAMESPACE:-longhorn-system}
|
|
||||||
|
|
||||||
remove_and_wait() {
|
|
||||||
local crd=$1
|
|
||||||
out=`kubectl -n ${NAMESPACE} delete $crd --all 2>&1`
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo $out
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
while true; do
|
|
||||||
out=`kubectl -n ${NAMESPACE} get $crd -o yaml | grep 'items: \[\]'`
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
echo all $crd instances deleted
|
|
||||||
}
|
|
||||||
|
|
||||||
remove_crd_instances() {
|
|
||||||
remove_and_wait volumes.longhorn.rancher.io
|
|
||||||
# TODO: remove engines and replicas once we fix https://github.com/rancher/longhorn/issues/273
|
|
||||||
remove_and_wait engines.longhorn.rancher.io
|
|
||||||
remove_and_wait replicas.longhorn.rancher.io
|
|
||||||
remove_and_wait engineimages.longhorn.rancher.io
|
|
||||||
remove_and_wait settings.longhorn.rancher.io
|
|
||||||
# do this one last; manager crashes
|
|
||||||
remove_and_wait nodes.longhorn.rancher.io
|
|
||||||
}
|
|
||||||
|
|
||||||
# Delete driver related workloads in specific order
|
|
||||||
remove_driver() {
|
|
||||||
kubectl -n ${NAMESPACE} delete deployment.apps/longhorn-driver-deployer
|
|
||||||
kubectl -n ${NAMESPACE} delete daemonset.apps/longhorn-csi-plugin
|
|
||||||
kubectl -n ${NAMESPACE} delete statefulset.apps/csi-attacher
|
|
||||||
kubectl -n ${NAMESPACE} delete service/csi-attacher
|
|
||||||
kubectl -n ${NAMESPACE} delete statefulset.apps/csi-provisioner
|
|
||||||
kubectl -n ${NAMESPACE} delete service/csi-provisioner
|
|
||||||
kubectl -n ${NAMESPACE} delete daemonset.apps/longhorn-flexvolume-driver
|
|
||||||
}
|
|
||||||
|
|
||||||
# Delete all workloads in the namespace
|
|
||||||
remove_workloads() {
|
|
||||||
kubectl -n ${NAMESPACE} get daemonset.apps -o yaml | kubectl delete -f -
|
|
||||||
kubectl -n ${NAMESPACE} get deployment.apps -o yaml | kubectl delete -f -
|
|
||||||
kubectl -n ${NAMESPACE} get replicaset.apps -o yaml | kubectl delete -f -
|
|
||||||
kubectl -n ${NAMESPACE} get statefulset.apps -o yaml | kubectl delete -f -
|
|
||||||
kubectl -n ${NAMESPACE} get pods -o yaml | kubectl delete -f -
|
|
||||||
kubectl -n ${NAMESPACE} get service -o yaml | kubectl delete -f -
|
|
||||||
}
|
|
||||||
|
|
||||||
# Delete CRD definitions with longhorn.rancher.io in the name
|
|
||||||
remove_crds() {
|
|
||||||
for crd in $(kubectl get crd -o jsonpath={.items[*].metadata.name} | tr ' ' '\n' | grep longhorn.rancher.io); do
|
|
||||||
kubectl delete crd/$crd
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
remove_crd_instances
|
|
||||||
remove_driver
|
|
||||||
remove_workloads
|
|
||||||
remove_crds
|
|
@@ -1,5 +1,5 @@
|
|||||||
# This section includes base Calico installation configuration.
|
# This section includes base Calico installation configuration.
|
||||||
# For more information, see: https://projectcalico.docs.tigera.io/v3.23/reference/installation/api#operator.tigera.io/v1.Installation
|
# For more information, see: https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.Installation
|
||||||
apiVersion: operator.tigera.io/v1
|
apiVersion: operator.tigera.io/v1
|
||||||
kind: Installation
|
kind: Installation
|
||||||
metadata:
|
metadata:
|
||||||
@@ -10,7 +10,7 @@ spec:
|
|||||||
# Note: The ipPools section cannot be modified post-install.
|
# Note: The ipPools section cannot be modified post-install.
|
||||||
ipPools:
|
ipPools:
|
||||||
- blockSize: 26
|
- blockSize: 26
|
||||||
cidr: 192.168.0.0/16
|
cidr: 10.244.0.0/16
|
||||||
encapsulation: VXLANCrossSubnet
|
encapsulation: VXLANCrossSubnet
|
||||||
natOutgoing: Enabled
|
natOutgoing: Enabled
|
||||||
nodeSelector: all()
|
nodeSelector: all()
|
||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
---
|
---
|
||||||
|
|
||||||
# This section configures the Calico API server.
|
# This section configures the Calico API server.
|
||||||
# For more information, see: https://projectcalico.docs.tigera.io/v3.23/reference/installation/api#operator.tigera.io/v1.APIServer
|
# For more information, see: https://projectcalico.docs.tigera.io/master/reference/installation/api#operator.tigera.io/v1.APIServer
|
||||||
apiVersion: operator.tigera.io/v1
|
apiVersion: operator.tigera.io/v1
|
||||||
kind: APIServer
|
kind: APIServer
|
||||||
metadata:
|
metadata:
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -64,8 +64,16 @@ spec:
|
|||||||
number: 9000
|
number: 9000
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- traefik.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: traefik-tls
|
secretName: wildcard-tls
|
||||||
|
---
|
||||||
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
|
kind: TLSStore
|
||||||
|
metadata:
|
||||||
|
name: default
|
||||||
|
spec:
|
||||||
|
defaultCertificate:
|
||||||
|
secretName: wildcard-tls
|
||||||
---
|
---
|
||||||
apiVersion: traefik.containo.us/v1alpha1
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
kind: Middleware
|
kind: Middleware
|
||||||
|
@@ -1,3 +1,34 @@
|
|||||||
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: proxmox
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- https
|
||||||
|
routes:
|
||||||
|
- kind: Rule
|
||||||
|
match: Host(`pve.k-space.ee`)
|
||||||
|
priority: 10
|
||||||
|
middlewares:
|
||||||
|
- name: proxmox-redirect
|
||||||
|
- name: traefik-sso@kubernetescrd
|
||||||
|
- name: traefik-proxmox-redirect@kubernetescrd
|
||||||
|
services:
|
||||||
|
- kind: Service
|
||||||
|
name: pve1
|
||||||
|
passHostHeader: true
|
||||||
|
port: 8006
|
||||||
|
responseForwarding:
|
||||||
|
flushInterval: 1ms
|
||||||
|
scheme: https
|
||||||
|
serversTransport: proxmox-servers-transport
|
||||||
|
tls:
|
||||||
|
secretName: pve
|
||||||
|
domains:
|
||||||
|
- main: pve.k-space.ee
|
||||||
|
sans:
|
||||||
|
- "*.k-space.ee"
|
||||||
|
|
||||||
apiVersion: traefik.containo.us/v1alpha1
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
kind: ServersTransport
|
kind: ServersTransport
|
||||||
metadata:
|
metadata:
|
||||||
@@ -56,101 +87,6 @@ data:
|
|||||||
RWRmRHIzNTBpZkRCQkVuL3RvL3JUczFOVjhyOGpjcG14a2MzNjlSQXp3TmJiRVkKMVE9PQotLS0t
|
RWRmRHIzNTBpZkRCQkVuL3RvL3JUczFOVjhyOGpjcG14a2MzNjlSQXp3TmJiRVkKMVE9PQotLS0t
|
||||||
LUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
LUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: pve1
|
|
||||||
annotations:
|
|
||||||
traefik.ingress.kubernetes.io/service.serverstransport: traefik-proxmox-servers-transport@kubernetescrd
|
|
||||||
spec:
|
|
||||||
type: ExternalName
|
|
||||||
externalName: pve1.proxmox.infra.k-space.ee
|
|
||||||
ports:
|
|
||||||
- name: https
|
|
||||||
port: 8006
|
|
||||||
protocol: TCP
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: pve8
|
|
||||||
annotations:
|
|
||||||
traefik.ingress.kubernetes.io/service.serverstransport: traefik-proxmox-servers-transport@kubernetescrd
|
|
||||||
spec:
|
|
||||||
type: ExternalName
|
|
||||||
externalName: pve8.proxmox.infra.k-space.ee
|
|
||||||
ports:
|
|
||||||
- name: https
|
|
||||||
port: 8006
|
|
||||||
protocol: TCP
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: pve9
|
|
||||||
annotations:
|
|
||||||
traefik.ingress.kubernetes.io/service.serverstransport: traefik-proxmox-servers-transport@kubernetescrd
|
|
||||||
spec:
|
|
||||||
type: ExternalName
|
|
||||||
externalName: pve9.proxmox.infra.k-space.ee
|
|
||||||
ports:
|
|
||||||
- name: https
|
|
||||||
port: 8006
|
|
||||||
protocol: TCP
|
|
||||||
---
|
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: pve
|
|
||||||
annotations:
|
|
||||||
kubernetes.io/ingress.class: traefik
|
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd,traefik-proxmox-redirect@kubernetescrd
|
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
|
||||||
spec:
|
|
||||||
rules:
|
|
||||||
- host: proxmox.k-space.ee
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- pathType: Prefix
|
|
||||||
path: /
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: whoami
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
- host: pve.k-space.ee
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- pathType: Prefix
|
|
||||||
path: "/"
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: pve1
|
|
||||||
port:
|
|
||||||
number: 8006
|
|
||||||
- pathType: Prefix
|
|
||||||
path: "/"
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: pve8
|
|
||||||
port:
|
|
||||||
number: 8006
|
|
||||||
- pathType: Prefix
|
|
||||||
path: "/"
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: pve9
|
|
||||||
port:
|
|
||||||
number: 8006
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- pve.k-space.ee
|
|
||||||
- proxmox.k-space.ee
|
|
||||||
secretName: pve-tls
|
|
||||||
---
|
|
||||||
apiVersion: traefik.containo.us/v1alpha1
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
kind: Middleware
|
kind: Middleware
|
||||||
metadata:
|
metadata:
|
||||||
|
@@ -1,13 +1,36 @@
|
|||||||
image:
|
image:
|
||||||
tag: "2.8"
|
tag: "2.9"
|
||||||
|
|
||||||
websecure:
|
websecure:
|
||||||
tls:
|
tls:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
providers:
|
providers:
|
||||||
|
kubernetesCRD:
|
||||||
|
enabled: true
|
||||||
|
namespaces:
|
||||||
|
- traefik
|
||||||
|
- authelia
|
||||||
|
|
||||||
kubernetesIngress:
|
kubernetesIngress:
|
||||||
|
allowEmptyServices: true
|
||||||
allowExternalNameServices: true
|
allowExternalNameServices: true
|
||||||
|
namespaces:
|
||||||
|
- argocd
|
||||||
|
- authelia
|
||||||
|
- camtiler
|
||||||
|
- drone
|
||||||
|
- elastic-system
|
||||||
|
- etherpad
|
||||||
|
- freescout
|
||||||
|
- grafana
|
||||||
|
- harbor
|
||||||
|
- kubernetes-dashboard
|
||||||
|
- logging
|
||||||
|
- longhorn-system
|
||||||
|
- phpmyadmin
|
||||||
|
- prometheus-operator
|
||||||
|
- wildduck
|
||||||
|
|
||||||
deployment:
|
deployment:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
|
@@ -17,7 +17,6 @@ metadata:
|
|||||||
name: voron
|
name: voron
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: traefik
|
kubernetes.io/ingress.class: traefik
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd
|
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
@@ -36,5 +35,4 @@ spec:
|
|||||||
name: http
|
name: http
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- voron.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: voron-tls
|
|
||||||
|
@@ -41,7 +41,6 @@ kind: Ingress
|
|||||||
metadata:
|
metadata:
|
||||||
name: whoami
|
name: whoami
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
external-dns.alpha.kubernetes.io/target: traefik.k-space.ee
|
||||||
kubernetes.io/ingress.class: traefik
|
kubernetes.io/ingress.class: traefik
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
@@ -50,8 +49,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- "whoami.k-space.ee"
|
- "*.k-space.ee"
|
||||||
secretName: whoami-tls
|
|
||||||
rules:
|
rules:
|
||||||
- host: "whoami.k-space.ee"
|
- host: "whoami.k-space.ee"
|
||||||
http:
|
http:
|
||||||
|
@@ -104,7 +104,6 @@ metadata:
|
|||||||
namespace: wildduck
|
namespace: wildduck
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: traefik
|
kubernetes.io/ingress.class: traefik
|
||||||
cert-manager.io/cluster-issuer: default
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd
|
traefik.ingress.kubernetes.io/router.middlewares: traefik-sso@kubernetescrd
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
@@ -123,8 +122,7 @@ spec:
|
|||||||
number: 80
|
number: 80
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- webmail.k-space.ee
|
- "*.k-space.ee"
|
||||||
secretName: webmail-tls
|
|
||||||
---
|
---
|
||||||
apiVersion: codemowers.io/v1alpha1
|
apiVersion: codemowers.io/v1alpha1
|
||||||
kind: KeyDBCluster
|
kind: KeyDBCluster
|
||||||
|
Reference in New Issue
Block a user