Compare commits
2 Commits
main
...
292c558f56
| Author | SHA1 | Date | |
|---|---|---|---|
|
292c558f56
|
|||
|
558922b90d
|
@@ -14,10 +14,10 @@ jobs:
|
|||||||
coredns: ${{ steps.filter.outputs.coredns }}
|
coredns: ${{ steps.filter.outputs.coredns }}
|
||||||
traefik: ${{ steps.filter.outputs.traefik }}
|
traefik: ${{ steps.filter.outputs.traefik }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
|
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
@@ -33,9 +33,9 @@ jobs:
|
|||||||
needs: check-changes
|
needs: check-changes
|
||||||
if: ${{ needs.check-changes.outputs.node-labels == 'true' || github.event_name == 'workflow_dispatch' }}
|
if: ${{ needs.check-changes.outputs.node-labels == 'true' || github.event_name == 'workflow_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
- uses: azure/setup-kubectl@15650b3ad78fff148532a140b8a4c821796b2d7b # v5.0.0
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
- uses: azure/k8s-set-context@89b837d75b40a7bd2ddafde837473c212db8b313 # v5.0.0
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
with:
|
with:
|
||||||
method: kubeconfig
|
method: kubeconfig
|
||||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
@@ -48,9 +48,9 @@ jobs:
|
|||||||
needs: check-changes
|
needs: check-changes
|
||||||
if: ${{ needs.check-changes.outputs.coredns == 'true' || github.event_name == 'workflow_dispatch' }}
|
if: ${{ needs.check-changes.outputs.coredns == 'true' || github.event_name == 'workflow_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
- uses: azure/setup-kubectl@15650b3ad78fff148532a140b8a4c821796b2d7b # v5.0.0
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
- uses: azure/k8s-set-context@89b837d75b40a7bd2ddafde837473c212db8b313 # v5.0.0
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
with:
|
with:
|
||||||
method: kubeconfig
|
method: kubeconfig
|
||||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
@@ -66,14 +66,14 @@ jobs:
|
|||||||
needs: check-changes
|
needs: check-changes
|
||||||
if: ${{ needs.check-changes.outputs.traefik == 'true' || github.event_name == 'workflow_dispatch' }}
|
if: ${{ needs.check-changes.outputs.traefik == 'true' || github.event_name == 'workflow_dispatch' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
- uses: azure/setup-kubectl@15650b3ad78fff148532a140b8a4c821796b2d7b # v5.0.0
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
- uses: azure/k8s-set-context@89b837d75b40a7bd2ddafde837473c212db8b313 # v5.0.0
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
with:
|
with:
|
||||||
method: kubeconfig
|
method: kubeconfig
|
||||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
- name: Set ionos api credentials
|
- name: Set ionos api credentials
|
||||||
uses: azure/k8s-create-secret@6e0ba8047235646753f2a3a3b359b4d0006ff218 # v5.0.1
|
uses: azure/k8s-create-secret@6e0ba8047235646753f2a3a3b359b4d0006ff218 # v5
|
||||||
with:
|
with:
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
secret-name: ionos-api-credentials
|
secret-name: ionos-api-credentials
|
||||||
@@ -83,7 +83,7 @@ jobs:
|
|||||||
"apiKey": "${{ secrets.IONOS_API_KEY }}"
|
"apiKey": "${{ secrets.IONOS_API_KEY }}"
|
||||||
}
|
}
|
||||||
- name: Set admin basic auth credentials
|
- name: Set admin basic auth credentials
|
||||||
uses: azure/k8s-create-secret@6e0ba8047235646753f2a3a3b359b4d0006ff218 # v5.0.1
|
uses: azure/k8s-create-secret@6e0ba8047235646753f2a3a3b359b4d0006ff218 # v5
|
||||||
with:
|
with:
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
secret-name: admin-basic-auth-credentials
|
secret-name: admin-basic-auth-credentials
|
||||||
@@ -93,7 +93,7 @@ jobs:
|
|||||||
"auth": "${{ secrets.ADMIN_BASIC_AUTH_CREDENTIALS }}"
|
"auth": "${{ secrets.ADMIN_BASIC_AUTH_CREDENTIALS }}"
|
||||||
}
|
}
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: azure/k8s-deploy@c8cfec839dc09896b3b8cc40cd13d04792680771 # v5.1.0
|
uses: azure/k8s-deploy@6f7c489cecd8da05646259d9fa3daae92e095c7b # v5.0.4
|
||||||
with:
|
with:
|
||||||
action: deploy
|
action: deploy
|
||||||
manifests: "traefik/"
|
manifests: "traefik/"
|
||||||
@@ -104,9 +104,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: check-changes
|
needs: check-changes
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
- uses: azure/setup-kubectl@15650b3ad78fff148532a140b8a4c821796b2d7b # v5.0.0
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
- uses: azure/k8s-set-context@89b837d75b40a7bd2ddafde837473c212db8b313 # v5.0.0
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
with:
|
with:
|
||||||
method: kubeconfig
|
method: kubeconfig
|
||||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ jobs:
|
|||||||
validate-node-lables:
|
validate-node-lables:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
- uses: azure/setup-kubectl@15650b3ad78fff148532a140b8a4c821796b2d7b # v5.0.0
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
- uses: azure/k8s-set-context@89b837d75b40a7bd2ddafde837473c212db8b313 # v5.0.0
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
with:
|
with:
|
||||||
method: kubeconfig
|
method: kubeconfig
|
||||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
@@ -22,9 +22,9 @@ jobs:
|
|||||||
validate-coredns:
|
validate-coredns:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
- uses: azure/setup-kubectl@15650b3ad78fff148532a140b8a4c821796b2d7b # v5.0.0
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
- uses: azure/k8s-set-context@89b837d75b40a7bd2ddafde837473c212db8b313 # v5.0.0
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
with:
|
with:
|
||||||
method: kubeconfig
|
method: kubeconfig
|
||||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
@@ -35,14 +35,14 @@ jobs:
|
|||||||
validate-traefik:
|
validate-traefik:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
||||||
- uses: azure/setup-kubectl@15650b3ad78fff148532a140b8a4c821796b2d7b # v5.0.0
|
- uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4
|
||||||
- uses: azure/k8s-set-context@89b837d75b40a7bd2ddafde837473c212db8b313 # v5.0.0
|
- uses: azure/k8s-set-context@ae59a723ba9abe7a9655538854a025448dbab4aa # v4
|
||||||
with:
|
with:
|
||||||
method: kubeconfig
|
method: kubeconfig
|
||||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
- name: Validate
|
- name: Validate
|
||||||
uses: azure/k8s-lint@6aefe5066f95e73d2b140d8835cc95583b886989 # v3.0.1
|
uses: azure/k8s-lint@6aefe5066f95e73d2b140d8835cc95583b886989 # v3
|
||||||
with:
|
with:
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
lintType: dryrun
|
lintType: dryrun
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
|
||||||
name: pv-traefik-hostpath-static
|
|
||||||
spec:
|
|
||||||
capacity:
|
|
||||||
storage: 10Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
persistentVolumeReclaimPolicy: Retain
|
|
||||||
storageClassName: traefik-certificates
|
|
||||||
local:
|
|
||||||
path: /mnt/longhorn1/svc/kube-system/main/traefik/data
|
|
||||||
nodeAffinity:
|
|
||||||
required:
|
|
||||||
nodeSelectorTerms:
|
|
||||||
- matchExpressions:
|
|
||||||
- key: kubernetes.io/hostname
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- k3sh0
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: pvc-traefik
|
|
||||||
namespace: kube-system
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
storageClassName: traefik-certificates
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Gi
|
|
||||||
@@ -32,6 +32,11 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
key: apiKey
|
key: apiKey
|
||||||
name: ionos-api-credentials
|
name: ionos-api-credentials
|
||||||
|
- name: CROWDSEC_BOUNCER_API_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: crowdsec-bouncer-api-key
|
||||||
|
key: api-key
|
||||||
ports:
|
ports:
|
||||||
web:
|
web:
|
||||||
port: 8000
|
port: 8000
|
||||||
@@ -60,5 +65,16 @@ spec:
|
|||||||
persistence:
|
persistence:
|
||||||
enabled: true
|
enabled: true
|
||||||
name: data
|
name: data
|
||||||
existingClaim: pvc-traefik
|
accessMode: ReadWriteMany
|
||||||
|
size: 1Gi
|
||||||
|
storageClass: longhorn
|
||||||
path: /data
|
path: /data
|
||||||
|
#experimental:
|
||||||
|
# plugins:
|
||||||
|
# crowdsec-bouncer-traefik-plugin:
|
||||||
|
# moduleName: github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
|
||||||
|
# version: v1.4.6
|
||||||
|
#additionalArguments:
|
||||||
|
# - "--providers.kubernetescrd"
|
||||||
|
# - "--entrypoints.web.http.middlewares=crowdsec-bouncer@kubernetescrd"
|
||||||
|
# - "--entrypoints.websecure.http.middlewares=kube-system-crowdsec-bouncer@kubernetescrd"
|
||||||
|
|||||||
Reference in New Issue
Block a user