break: switch from k0s to k3s (in docker)
- replace k0s with k3s in docker-compose.yml
- remove k0s-config.yaml
- remove metallb-address-pool
- update .renovaterc.json to match new file structure
- add new argocd-init files for k3s
- update README to reflect changes
🤖
This commit is contained in:
parent
844c77e7a9
commit
5421b15d4e
8 changed files with 98 additions and 128 deletions
|
@ -8,16 +8,19 @@
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"description": "ArgoCD",
|
"description": "ArgoCD",
|
||||||
"fileMatch": [
|
"fileMatch": [
|
||||||
"k0s-config\\.yaml$"
|
"^argocd-bootstrap/.*\\.yml$"
|
||||||
],
|
],
|
||||||
"matchStrings": [
|
"matchStrings": [
|
||||||
"\\s+version:\\s(?<currentValue>.*)\\s+#\\s+depName=(?<depName>.*)\\s+repoUrl=(?<registryUrl>.*)"
|
"\\s+chart:\\s(?<depName>.*)",
|
||||||
|
"\\s+repo:\\s(?<registryUrl>.*)",
|
||||||
|
"\\s+version:\\s(?<currentValue>.*)"
|
||||||
],
|
],
|
||||||
|
"matchStringsStrategy": "combination",
|
||||||
"datasourceTemplate": "helm"
|
"datasourceTemplate": "helm"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"description": "Baseline",
|
"description": "Baseline Manifests",
|
||||||
"fileMatch": [
|
"fileMatch": [
|
||||||
"\\.jsonnet$"
|
"\\.jsonnet$"
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# k0s Kubernetes + Baseline
|
# k3s Kubernetes + Baseline
|
||||||
|
|
||||||
* [k0s](https://docs.k0sproject.io/stable/)
|
* [k3s](https://docs.k3s.io/)
|
||||||
* [ArgoCD](https://argoproj.github.io/cd/)
|
* [ArgoCD](https://argoproj.github.io/cd/)
|
||||||
* [NGINX Ingress Controller](https://kubernetes.github.io/ingress-nginx/)
|
* [NGINX Ingress Controller](https://kubernetes.github.io/ingress-nginx/)
|
||||||
* [cert-manager](https://cert-manager.io/)
|
* [cert-manager](https://cert-manager.io/)
|
||||||
|
@ -10,13 +10,13 @@
|
||||||
* [keel](https://keel.sh)
|
* [keel](https://keel.sh)
|
||||||
* [reloader](https://github.com/stakater/Reloader)
|
* [reloader](https://github.com/stakater/Reloader)
|
||||||
|
|
||||||
## Run (k0s + baseline)
|
## Run (k3s + baseline)
|
||||||
|
|
||||||
`docker compose up`
|
`docker compose up`
|
||||||
|
|
||||||
### Get kubeconfig
|
### Get kubeconfig
|
||||||
|
|
||||||
`docker compose exec -it k0s k0s kubeconfig admin`
|
`docker compose exec -it k3s kubectl config view --flatten`
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
|
|
5
argocd-init/000-namespace.yml
Normal file
5
argocd-init/000-namespace.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: argocd
|
21
argocd-init/001-argocd.yml
Normal file
21
argocd-init/001-argocd.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
apiVersion: helm.cattle.io/v1
|
||||||
|
kind: HelmChart
|
||||||
|
metadata:
|
||||||
|
name: argocd
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
# do not change order! (needed for renovate)
|
||||||
|
chart: argo-cd
|
||||||
|
repo: https://argoproj.github.io/argo-helm
|
||||||
|
version: 7.5.2
|
||||||
|
targetNamespace: argocd
|
||||||
|
valuesContent: |-
|
||||||
|
server:
|
||||||
|
replicas: 1
|
||||||
|
applicationSet:
|
||||||
|
enabled: false
|
||||||
|
notifications:
|
||||||
|
enabled: false
|
||||||
|
dex:
|
||||||
|
enabled: false
|
50
argocd-init/002-argocd-apps.yml
Normal file
50
argocd-init/002-argocd-apps.yml
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
---
|
||||||
|
apiVersion: helm.cattle.io/v1
|
||||||
|
kind: HelmChart
|
||||||
|
metadata:
|
||||||
|
name: argocd-apps
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
# do not change order! (needed for renovate)
|
||||||
|
chart: argocd-apps
|
||||||
|
repo: https://argoproj.github.io/argo-helm
|
||||||
|
version: 2.0.0
|
||||||
|
targetNamespace: argocd
|
||||||
|
valuesContent: |-
|
||||||
|
projects:
|
||||||
|
baseline:
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
sourceRepos:
|
||||||
|
- '*'
|
||||||
|
destinations:
|
||||||
|
- namespace: '*'
|
||||||
|
server: '*'
|
||||||
|
clusterResourceWhitelist:
|
||||||
|
- group: '*'
|
||||||
|
kind: '*'
|
||||||
|
applications:
|
||||||
|
baseline:
|
||||||
|
project: baseline
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
source:
|
||||||
|
repoURL: 'https://git.smsvc.net/k8s/baseline.git'
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: manifests/
|
||||||
|
directory:
|
||||||
|
recurse: true
|
||||||
|
destination:
|
||||||
|
server: 'https://kubernetes.default.svc'
|
||||||
|
namespace: argocd
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
retry:
|
||||||
|
limit: 5
|
||||||
|
backoff:
|
||||||
|
duration: 5s
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 5m
|
|
@ -1,22 +1,20 @@
|
||||||
services:
|
services:
|
||||||
k0s:
|
k3s:
|
||||||
image: docker.io/k0sproject/k0s:v1.30.4-k0s.0
|
image: rancher/k3s:v1.30.4-k3s1
|
||||||
command: k0s controller --config=/etc/k0s/config.yaml --enable-worker --no-taints
|
command:
|
||||||
restart: always
|
- server
|
||||||
stop_grace_period: 15s
|
- --disable=traefik
|
||||||
|
- --tls-san=k8s.smsvc.net
|
||||||
hostname: k8s.smsvc.net
|
hostname: k8s.smsvc.net
|
||||||
|
restart: always
|
||||||
privileged: true
|
privileged: true
|
||||||
cgroup: host
|
cgroup: host
|
||||||
network_mode: host
|
network_mode: host
|
||||||
volumes:
|
volumes:
|
||||||
- k0s-data:/var/lib/k0s/
|
- k3s-data:/var/lib/rancher/k3s/
|
||||||
- k0s-run:/run/
|
- k3s-run:/run/
|
||||||
- k0s-storage:/var/openebs/
|
- ./argocd-init/:/var/lib/rancher/k3s/server/manifests/argocd-init/
|
||||||
- k0s-run-udev:/run/udev
|
|
||||||
- ./k0s-config.yaml:/etc/k0s/config.yaml
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
k0s-data:
|
k3s-data:
|
||||||
k0s-run:
|
k3s-run:
|
||||||
k0s-storage:
|
|
||||||
k0s-run-udev:
|
|
||||||
|
|
|
@ -1,97 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: k0s.k0sproject.io/v1beta1
|
|
||||||
kind: ClusterConfig
|
|
||||||
metadata:
|
|
||||||
name: k0s
|
|
||||||
spec:
|
|
||||||
|
|
||||||
api:
|
|
||||||
sans:
|
|
||||||
- k8s.smsvc.net
|
|
||||||
|
|
||||||
telemetry:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
extensions:
|
|
||||||
helm:
|
|
||||||
repositories:
|
|
||||||
- name: argocd
|
|
||||||
url: https://argoproj.github.io/argo-helm
|
|
||||||
- name: metallb
|
|
||||||
url: https://metallb.github.io/metallb
|
|
||||||
- name: openebs-internal
|
|
||||||
url: https://openebs.github.io/charts
|
|
||||||
|
|
||||||
charts:
|
|
||||||
- name: openebs
|
|
||||||
chartname: openebs-internal/openebs
|
|
||||||
version: 3.10.0 # depName=openebs repoUrl=https://openebs.github.io/charts
|
|
||||||
namespace: openebs
|
|
||||||
order: 0
|
|
||||||
values: |
|
|
||||||
localprovisioner:
|
|
||||||
hostpathClass:
|
|
||||||
enabled: true
|
|
||||||
isDefaultClass: true
|
|
||||||
|
|
||||||
- name: metallb
|
|
||||||
chartname: metallb/metallb
|
|
||||||
version: 0.14.8 # depName=metallb repoUrl=https://metallb.github.io/metallb
|
|
||||||
namespace: metallb
|
|
||||||
order: 0
|
|
||||||
|
|
||||||
- name: argocd
|
|
||||||
chartname: argocd/argo-cd
|
|
||||||
version: 7.5.0 # depName=argo-cd repoUrl=https://argoproj.github.io/argo-helm
|
|
||||||
namespace: argocd
|
|
||||||
order: 1
|
|
||||||
values: |
|
|
||||||
applicationSet:
|
|
||||||
enabled: false
|
|
||||||
notifications:
|
|
||||||
enabled: false
|
|
||||||
dex:
|
|
||||||
enabled: false
|
|
||||||
- name: argocd-apps
|
|
||||||
chartname: argocd/argocd-apps
|
|
||||||
version: 2.0.0 # depName=argocd-apps repoUrl=https://argoproj.github.io/argo-helm
|
|
||||||
namespace: argocd
|
|
||||||
order: 2
|
|
||||||
values: |
|
|
||||||
projects:
|
|
||||||
baseline:
|
|
||||||
namespace: argocd
|
|
||||||
finalizers:
|
|
||||||
- resources-finalizer.argocd.argoproj.io
|
|
||||||
sourceRepos:
|
|
||||||
- '*'
|
|
||||||
destinations:
|
|
||||||
- namespace: '*'
|
|
||||||
server: '*'
|
|
||||||
clusterResourceWhitelist:
|
|
||||||
- group: '*'
|
|
||||||
kind: '*'
|
|
||||||
applications:
|
|
||||||
baseline:
|
|
||||||
project: baseline
|
|
||||||
finalizers:
|
|
||||||
- resources-finalizer.argocd.argoproj.io
|
|
||||||
source:
|
|
||||||
repoURL: 'https://git.smsvc.net/k8s/baseline.git'
|
|
||||||
targetRevision: HEAD
|
|
||||||
path: manifests/
|
|
||||||
directory:
|
|
||||||
recurse: true
|
|
||||||
destination:
|
|
||||||
server: 'https://kubernetes.default.svc'
|
|
||||||
namespace: argocd
|
|
||||||
syncPolicy:
|
|
||||||
automated:
|
|
||||||
prune: true
|
|
||||||
selfHeal: true
|
|
||||||
retry:
|
|
||||||
limit: 5
|
|
||||||
backoff:
|
|
||||||
duration: 5s
|
|
||||||
factor: 2
|
|
||||||
maxDuration: 5m
|
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: metallb.io/v1beta1
|
|
||||||
kind: IPAddressPool
|
|
||||||
metadata:
|
|
||||||
name: metallb-address-pool
|
|
||||||
namespace: metallb
|
|
||||||
annotations:
|
|
||||||
spec:
|
|
||||||
addresses:
|
|
||||||
- 194.55.14.183/32
|
|
Loading…
Reference in a new issue