-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update to fluxv2 Signed-off-by: Michael Fornaro <[email protected]> * add fullnameOverride to fix pvc char length error Signed-off-by: Michael Fornaro <[email protected]> * udpate virtualservices to match services Signed-off-by: Michael Fornaro <[email protected]> * update certificate api version Signed-off-by: Michael Fornaro <[email protected]> * update cluster issuer api version Signed-off-by: Michael Fornaro <[email protected]> update cert-manager chart Signed-off-by: Michael Fornaro <[email protected]> move back to staging lets encrypt until stable Signed-off-by: Michael Fornaro <[email protected]> move back to staging lets encrypt until stable Signed-off-by: Michael Fornaro <[email protected]> * cert-manager vebosity set to 4 Signed-off-by: Michael Fornaro <[email protected]> * syntax: indentation Signed-off-by: Michael Fornaro <[email protected]> * syntax: indentation Signed-off-by: Michael Fornaro <[email protected]> update cert-manager chart Signed-off-by: Michael Fornaro <[email protected]> * update workflow to remove broken resource checks Signed-off-by: Michael Fornaro <[email protected]> * update workflow and build scripts Signed-off-by: Michael Fornaro <[email protected]>
- Loading branch information
Showing
86 changed files
with
5,517 additions
and
3,323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eou pipefail | ||
|
||
# TODO: automatically update the ~/.kube/config with required context generated. | ||
KUBECONFIG=~/.kube/config:~/projects/k8s-install/ansible/playbooks/output/k8s-config.yaml kubectl config view --flatten > ~/.kube/config | ||
|
||
if [[ ! $(gotk) ]]; then | ||
echo "gotk needs to be installed - https://toolkit.fluxcd.io/get-started/#install-the-toolkit-cli" | ||
exit 1 | ||
fi | ||
|
||
# Untaint master nodes | ||
# TODO: Enable Ansible to allow configuring the taints to be added/removed. | ||
[[ ! $(kubectl taint nodes --all node-role.kubernetes.io/master-) ]] && echo "Masters untainted" | ||
|
||
# Check the cluster meets the fluxv2 prerequisites | ||
gotk check --pre | ||
[[ $? -ne 0 ]] && echo "Prerequisites were not satisfied" && exit 1 | ||
|
||
gotk install \ | ||
--version=latest \ | ||
--components=source-controller,kustomize-controller,helm-controller,notification-controller \ | ||
--namespace=gitops-system \ | ||
--network-policy=false \ | ||
--arch=arm64 | ||
|
||
if [[ -f .secrets/k8s-secret-fluxcd-ssh.yaml ]]; then | ||
echo "Applying existing sealed-secret key" | ||
kubectl apply -f .secrets/k8s-secret-sealed-secret-private-key.yaml | ||
fi | ||
|
||
if [[ -f bootstrap/repo.yaml ]]; then | ||
echo "Applying Repo Sync" | ||
kubectl apply -f bootstrap/repo.yaml | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
apiVersion: source.toolkit.fluxcd.io/v1beta1 | ||
kind: GitRepository | ||
metadata: | ||
name: k8s-gitops | ||
namespace: gitops-system | ||
spec: | ||
interval: 5m | ||
ref: | ||
branch: fluxv2-init | ||
url: https://github.com/raspbernetes/k8s-gitops.git | ||
ignore: | | ||
# exclude all | ||
/* | ||
# include deploy dir | ||
!/namespaces/ | ||
/namespaces/**/*.md | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 | ||
kind: Kustomization | ||
metadata: | ||
name: k8s-gitops | ||
namespace: gitops-system | ||
spec: | ||
interval: 5m | ||
path: './namespaces/' | ||
sourceRef: | ||
kind: GitRepository | ||
name: k8s-gitops | ||
prune: true |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# Cilium | ||
|
||
## Calico Chaining | ||
|
||
Documentation: https://docs.cilium.io/en/v1.8/gettingstarted/cni-chaining-calico/ | ||
|
||
### Deployment | ||
|
||
```bash | ||
kubectl apply -f cilium/calico-chaining/chaining.yaml | ||
``` | ||
|
||
```bash | ||
helm repo add cilium https://helm.cilium.io/ | ||
``` | ||
|
||
#### Helm Template (Optional) | ||
|
||
```bash | ||
helm template cilium/cilium --version 1.8.90 \ | ||
--namespace=kube-system \ | ||
--values=cilium/calico-chaining/values.yaml > cilium/calico-chaining/cilium.yaml | ||
``` | ||
|
||
```bash | ||
kubectl apply -f cilium/calico-chaining/cilium.yaml | ||
``` | ||
|
||
#### Helm Install (Recommended) | ||
|
||
```bash | ||
helm install cilium cilium/cilium --version v1.9.0-rc0 \ | ||
--namespace=kube-system \ | ||
--values=cilium/calico-chaining/values.yaml | ||
``` | ||
|
||
### Testing | ||
|
||
Image: https://hub.docker.com/r/raspbernetes/json-mock | ||
|
||
```bash | ||
kubectl apply -f cilium/calico-chaining/json-mock.yaml | ||
``` | ||
|
||
### Cleanup | ||
|
||
```bash | ||
kubectl delete -f cilium/calico-chaining/chaining.yaml | ||
``` | ||
|
||
#### Helm Template Cleanup | ||
|
||
```bash | ||
kubectl delete -f cilium/calico-chaining/cilium.yaml | ||
``` | ||
|
||
#### Helm Install Cleanup | ||
|
||
```bash | ||
helm uninstall cilium | ||
``` | ||
|
||
```bash | ||
kubectl delete -f cilium/calico-chaining/json-mock.yaml | ||
``` | ||
|
||
## Output | ||
|
||
```bash | ||
❯ k get po | ||
NAME READY STATUS RESTARTS AGE | ||
calico-kube-controllers-c9784d67d-pmh2h 1/1 Running 1 64m | ||
calico-node-j2ppc 1/1 Running 0 64m | ||
calico-node-m6c74 1/1 Running 0 64m | ||
calico-node-rhlw8 1/1 Running 0 64m | ||
calico-node-rm9nj 1/1 Running 0 64m | ||
cilium-62whg 1/1 Running 0 21m | ||
cilium-7q7bj 1/1 Running 1 21m | ||
cilium-b6zd9 1/1 Running 1 21m | ||
cilium-gwrmj 1/1 Running 0 21m | ||
cilium-operator-5cf59548b6-7vdn4 1/1 Running 0 21m | ||
cilium-operator-5cf59548b6-mthbh 1/1 Running 1 21m | ||
coredns-f9fd979d6-kh8j9 1/1 Running 0 14m | ||
coredns-f9fd979d6-zzwxk 1/1 Running 0 19m | ||
echo-a-66c7b457cb-5pnqn 1/1 Running 0 5m | ||
echo-b-5cb69b67dd-869ll 1/1 Running 0 5m | ||
echo-b-host-fbccc9bb9-9dgc6 1/1 Running 0 5m | ||
etcd-k8s-master-01 1/1 Running 0 115m | ||
etcd-k8s-master-02 1/1 Running 1 115m | ||
etcd-k8s-master-03 1/1 Running 0 114m | ||
host-to-b-multi-node-clusterip-5b7666b85f-fnkn2 0/1 Running 4 4m56s | ||
host-to-b-multi-node-headless-7788c557df-shn2d 0/1 Running 4 4m55s | ||
kube-apiserver-k8s-master-01 1/1 Running 0 115m | ||
kube-apiserver-k8s-master-02 1/1 Running 1 115m | ||
kube-apiserver-k8s-master-03 1/1 Running 1 114m | ||
kube-controller-manager-k8s-master-01 1/1 Running 1 115m | ||
kube-controller-manager-k8s-master-02 1/1 Running 2 115m | ||
kube-controller-manager-k8s-master-03 1/1 Running 1 113m | ||
kube-proxy-bvvft 1/1 Running 0 115m | ||
kube-proxy-h6l52 1/1 Running 0 115m | ||
kube-proxy-x6fg9 1/1 Running 0 114m | ||
kube-proxy-zqnw8 1/1 Running 0 115m | ||
kube-scheduler-k8s-master-01 1/1 Running 1 115m | ||
kube-scheduler-k8s-master-02 1/1 Running 2 115m | ||
kube-scheduler-k8s-master-03 1/1 Running 1 113m | ||
metrics-server-64dd4994b-mw8g2 1/1 Running 1 108m | ||
pod-to-a-85c9d7755c-29fnd 0/1 Running 4 4m59s | ||
pod-to-a-allowed-cnp-655c99c98f-7q84v 0/1 Running 4 4m58s | ||
pod-to-a-denied-cnp-7998f5bd67-jrxg7 1/1 Running 0 4m58s | ||
pod-to-b-intra-node-nodeport-8d9fb4ccc-gb45d 0/1 Running 4 4m53s | ||
pod-to-b-multi-node-clusterip-c6b4b97c7-kmgdx 0/1 Running 4 4m57s | ||
pod-to-b-multi-node-headless-54649b5569-s6rmd 0/1 Running 4 4m56s | ||
pod-to-b-multi-node-nodeport-75bfddc769-gh4ql 0/1 Running 4 4m54s | ||
pod-to-external-1111-64cffd6cd7-xmvs5 1/1 Running 0 4m59s | ||
pod-to-external-fqdn-allow-google-cnp-95c44f8ff-ftm5b 0/1 Running 4 4m57s | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: cni-configuration | ||
namespace: kube-system | ||
data: | ||
cni-config: |- | ||
{ | ||
"name": "generic-veth", | ||
"cniVersion": "0.3.1", | ||
"plugins": [ | ||
{ | ||
"type": "calico", | ||
"log_level": "info", | ||
"datastore_type": "kubernetes", | ||
"mtu": 1440, | ||
"ipam": { | ||
"type": "calico-ipam" | ||
}, | ||
"policy": { | ||
"type": "k8s" | ||
}, | ||
"kubernetes": { | ||
"kubeconfig": "/etc/cni/net.d/calico-kubeconfig" | ||
} | ||
}, | ||
{ | ||
"type": "portmap", | ||
"snat": true, | ||
"capabilities": {"portMappings": true} | ||
}, | ||
{ | ||
"type": "cilium-cni" | ||
} | ||
] | ||
} |
Oops, something went wrong.