cncf-infra / coder-templates

3 stars 4 forks source link

Add apisnoop template #13

Open hh opened 1 year ago

hh commented 1 year ago

Base of kubevirt-talos, but add add these missing features from pair:

hh commented 1 year ago

We'll need to update the KubeadmControlPlane.Spec.KubeadmConfigSpec.ClusterConfiguration.APIServer.ControlPlaneComponent.ExtraArgs to include the following args:

See https://github.com/sharingio/pair/blob/fdc243649284060cbd881adbd9867f2327f2394f/apps/cluster-api-manager/instances/kubernetes.go#L775-L782

hh commented 1 year ago

We'll also need to make the audit-*yaml files available via cluterapi+talos. Previously via clusterapi?kubeadm, we used a preKubeadmCommands.sh file.

# APIServer Audit rules, good for use with APISnoop suite for Kubernetes test writing
mkdir -p /etc/kubernetes/pki
cp ./manifests/audit-policy.yaml /etc/kubernetes/pki/audit-policy.yaml
cp ./manifests/audit-sink.yaml /etc/kubernetes/pki/audit-sink.yaml

https://github.com/sharingio/.sharing.io/blob/8775daae35efaf230ec4e8841b17b89938f3536a/cluster-api/preKubeadmCommands.sh#L36-L39

hh commented 1 year ago

Work on this template has been happening in the emacs pair instance and apisnoop branch: https://github.com/cncf-infra/coder-templates/compare/apisnoop?expand=1

coder template creation and pushing as well as workspace creation are functioning there.

hh commented 1 year ago