Resources used for the ContainerDays 2024 Talk «Evolving GitOps: Harnessing Kubernetes Resource Model for 5G Core» | Read-only mirror of https://github.com/swisscom/containerdays-2024-krm — Swisscom. Issues & pull requests at the source.
  • Go 74.1%
  • Makefile 20.3%
  • Dockerfile 3.1%
  • Jinja 2.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2024-09-17 16:05:23 +02:00
ansible Move to local NetBox environment 2024-09-17 16:05:23 +02:00
expected-io Add ContainerDays 2024 talk examples 2024-08-31 10:45:13 +02:00
kform Add ContainerDays 2024 talk examples 2024-08-31 10:45:13 +02:00
operator Move to local NetBox environment 2024-09-17 16:05:23 +02:00
.gitignore Add ContainerDays 2024 talk examples 2024-08-31 10:45:13 +02:00
Evolving GitOps Harnessing Kubernetes Resource Model for 5G Core 2024-09-03.pdf Add slides 2024-09-03 14:09:30 +02:00
Evolving GitOps Harnessing Kubernetes Resource Model for 5G Core 2024-09-17.pdf Add slides for Open Source Summit Europe 2024 2024-09-17 16:01:08 +02:00
LICENSE Initial commit 2024-08-16 10:49:54 +02:00
README.md Move to local NetBox environment 2024-09-17 16:05:23 +02:00

ContainerDays 2024 Talk «Evolving GitOps: Harnessing Kubernetes Resource Model for 5G Core»: Config Hydration Examples

Authors

Please feel free to approach us with feedback and questions!

Alexander North alexander.north1@swisscom.com Ashan Senevirathne ashan.senevirathne@swisscom.com Joel Studler joel.studler@swisscom.com

Contact us on slack:

Prepare Demo Environment

Kind with CRDs and local NetBox Operator instance

kind create cluster
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.8/config/manifests/metallb-native.yaml
pushd operator
make install
popd

pushd /tmp
git clone https://github.com/netbox-community/netbox-operator || echo "already exists"
pushd netbox-operator
make install
make create-kind
make deploy-kind
popd
popd

Create the Prefix

This NetBox Prefix is required as an entrypoint for all our automation.

cat <<EOF | kubectl apply -f -
---
apiVersion: netbox.dev/v1
kind: Prefix
metadata:
  name: parent-prefix
spec:
  prefix: "10.0.0.0/16"
  preserveInNetbox: true
EOF
kubectl wait prefix parent-prefix --for=condition=Ready
kubectl get prefix parent-prefix
kubectl delete prefix parent-prefix  # to reduce confusion during the demo

Hydration

Here is where you will run the hydration using Ansible Playbook, Kform or the Kubernetes Operator. See the README.md in the subfolder.

You can manually test the functionality of MetalLB (without hydration) using:

kubectl apply -f expected-io/output-ipaddresspool.yaml

Watch relevant resources in terminal

watch -n .2 'echo "ConfigMaps:\n" && kubectl get cm -A -l demo=input && echo "\n\nConfigurations:\n" && kubectl get configurations -A && echo "\n\nNetBox PrefixClaims, NetBox Prefixes, MetalLB IPAddressPools:\n" && kubectl get prefixclaim,prefix,ipaddresspool -A'

Test after hydration is performed

for i in {1..16}; do
  kubectl create svc loadbalancer kform-test-${i} --tcp 80:80
done
kubectl get svc | grep -v kubernetes

Cleanup

Cleanup all test svc

kubectl get svc -oname | grep test | xargs -n1 kubectl delete

Cleanup everything

killall main
kind delete cluster