Skip to content

Commit

Permalink
Add README.md and some changes in manifests
Browse files Browse the repository at this point in the history
Signed-off-by: Sanskarzz <[email protected]>
  • Loading branch information
Sanskarzz authored and eddycharly committed Apr 22, 2024
1 parent 6c5437b commit da53d26
Show file tree
Hide file tree
Showing 10 changed files with 272 additions and 28 deletions.
202 changes: 202 additions & 0 deletions sidecar-injector/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
# Kyverno Envoy Sidecar Injector

Uses [MutatingAdmissionWebhook Controller](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook) in Kubernetes to inject kyverno-envoy-plugin sidecar into newly created pods. This injection occurs at pod creation time, targeting pods that have the label `kyverno-envoy-sidecar/injection=enabled`. By introducing this sidecar, we can enforce policies on all incoming HTTP requests and make external authorization decisions to the targeted pod without modifying the primary application code/containers.


## Prerequisites

Kubernetes 1.16.0 or above with the `admissionregistration.k8s.io/v1` API enabled.
Verify that by the following command:
```bash
~$ kubectl api-versions | grep admissionregistration.k8s.io/v1
```
The result should be:
```bash
admissionregistration.k8s.io/v1
```
## Installation

#### Dedicated Namespace

Create a namespace `kyverno-envoy-sidecar-injector`, where you will deploy the Kyverno Envoy Sidecar Injector Webhook components.

```bash
~$ kubectl create namespace kyverno-envoy-sidecar-injector
```

#### Deploy Sidecar Injector

1. Create a signed cert/key pair and store it in a Kubernetes `secret` that will be consumed by sidecar injector deployment

Generate cert/key pair with openssl
```bash
~$ openssl req -new -x509 \
-subj "/CN=kyverno-envoy-sidecar.kyverno-envoy-sidecar-injector.svc" \
-addext "subjectAltName = DNS:kyverno-envoy-sidecar.kyverno-envoy-sidecar-injector.svc" \
-nodes -newkey rsa:4096 -keyout tls.key -out tls.crt
```
Now apply below command to create `secret`
```bash
~$ kubectl create secret generic kyverno-envoy-sidecar-certs \
--from-file tls.crt=tls.crt \
--from-file tls.key=tls.key \
--dry-run=client -n kyverno-envoy-sidecar-injector -oyaml > secret.yaml
```
Apply the secret
```bash
~$ kubectl apply -f secret.yaml
```

2. Run the script to Patch the `Mutating Webhook Configuration` with the CA bundle extracted from the `secret` created in the previous step and apply the MutatingWebhookConfiguration changes:

```bash
~$ ./manifests/create-mutating-webhook.sh
```
3. To Inject the Kyverno Envoy Sidecar, Create this configmap of name `kyverno-envoy-sidecar` in `kyverno-envoy--sidecar-injector` namespace. If their is requirement of multiple policy files, you can add more `--policy` flags and then add them in the `policy-files` configmap.

```bash
kubectl apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: kyverno-envoy-sidecar
namespace: kyverno-envoy-sidecar-injector
data:
sidecars.yaml: |
- name: kyverno-envoy-sidecar
containers:
- image: sanskardevops/plugin:0.0.25
imagePullPolicy: IfNotPresent
name: ext-authz
ports:
- containerPort: 8000
- containerPort: 9000
args:
- "serve"
- "--policy=/policies/policy.yaml"
volumeMounts:
- name: policy-files
mountPath: /policies
volumes:
- name: policy-files
configMap:
name: policy-files
EOF
```

4. Deploy resources
```bash
~$ kubectl apply -f ./manifests/rbac.yaml
~$ kubectl apply -f ./manifests/deployment.yaml
~$ kubectl apply -f ./manifests/service.yaml
```

#### Verify Sidecar Injector Installation

1. The sidecar injector should be deployed in the `kyverno-envoy-sidecar-injector` namespace:

```bash
~$ kubectl -n kyverno-envoy-sidecar-injector get all
```
```bash
~$ kubectl -n kyverno-envoy-sidecar-injector get all
NAME READY STATUS RESTARTS AGE
pod/kyverno-envoy-sidecar-976c94445-2l66q 1/1 Running 0 46s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kyverno-envoy-sidecar ClusterIP 10.96.137.93 <none> 443/TCP 3m11s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/kyverno-envoy-sidecar 1/1 1 1 46s
NAME DESIRED CURRENT READY AGE
replicaset.apps/kyverno-envoy-sidecar-976c94445 1 1 1 46s
```
2. Now create a pod with the label `kyverno-envoy-sidecar/injection=enabled` in any namespace other than `kyverno-envoy-sidecar-injector`. But before we have to apply configmap `policy-files` in the same namespace where we will create the pod.
```bash
kubectl apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: policy-files
namespace: default
data:
policy.yaml: |
apiVersion: json.kyverno.io/v1alpha1
kind: ValidatingPolicy
metadata:
name: check-dockerfile
spec:
rules:
- name: deny-external-calls
assert:
all:
- message: "HTTP calls are not allowed"
check:
request:
http:
method: GET
headers:
authorization:
(base64_decode(split(@, ' ')[1])):
(split(@, ':')[0]): alice
path: /foo
EOF
```

Now create a pod with the label `kyverno-envoy-sidecar/injection=enabled` in the default namespace:

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
namespace: default
labels:
app.kubernetes.io/name: nginx
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: nginx
template:
metadata:
labels:
kyverno-envoy-sidecar/injection: enabled
app.kubernetes.io/name: nginx
spec:
containers:
- name: nginx
image: nginx:1.20.2
ports:
- containerPort: 80
```

Apply the following command to creat above example deployment:
```bash
kubectl apply -f ./example-manifest/exampledeploy.yaml
```

Now check the pods, you should see the Kyverno Envoy Sidecar injected:

```bash
~$ kubectl get pods
```

Two pods are runing
```console
~$ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-77b746455b-xntjn 2/2 Running 0 3m46s
```

3. Check the logs of the Kyverno-envoy-sidecar container to verify the sidecar is running:

```bash
sanskar@sanskar-HP-Laptop-15s-du1xxx:~$ kubectl logs -n kyverno-envoy-sidecar-injector kyverno-envoy-sidecar-976c94445-nf777 -f
time="2024-04-20T13:59:10Z" level=info msg="SimpleServer starting to listen in port 8443"
time="2024-04-20T14:03:32Z" level=info msg="AdmissionReview for Kind=/v1, Kind=Pod, Namespace=default Name= UID=a57c5c0b-96c0-4c9c-b903-6aa75f635c17 patchOperation=CREATE UserInfo={system:serviceaccount:kube-system:replicaset-controller 9e6576d2-f5c3-4b44-9b9d-952a20b70da7 [system:serviceaccounts system:serviceaccounts:kube-system system:authenticated] map[]}"
time="2024-04-20T14:03:32Z" level=info msg="sideCar injection for kyverno-envoy-sidecar-injector/nginx-77b746455b-: sidecars: kyverno-envoy-sidecar"
```
45 changes: 45 additions & 0 deletions sidecar-injector/manifests/create-mutating-webhook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

# Get the base64 encoded tls.crt data
CA_BUNDLE=$(kubectl get secret kyverno-envoy-sidecar-certs -n kyverno-envoy-sidecar-injector -o jsonpath='{.data.tls\.crt}')

# Create the mutatingwebhook.yaml file
cat <<EOF > mutatingwebhook.yaml
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: kyverno-envoy-sidecar
labels:
app.kubernetes.io/name: sidecar-injector
app.kubernetes.io/instance: sidecar-injector
webhooks:
- name: kyverno-envoy-sidecar.kyverno-envoy-sidecar-injector.svc
clientConfig:
service:
name: kyverno-envoy-sidecar
namespace: kyverno-envoy-sidecar-injector
path: "/mutate"
caBundle: $CA_BUNDLE
failurePolicy: Fail
sideEffects: None
admissionReviewVersions: ["v1"]
rules:
- apiGroups:
- ""
resources:
- pods
apiVersions:
- "v1"
operations:
- CREATE
scope: '*'
objectSelector:
matchExpressions:
- key: kyverno-envoy-sidecar/injection
operator: In
values:
- enabled
EOF

# Apply the mutatingwebhook.yaml file
kubectl apply -f mutatingwebhook.yaml
18 changes: 8 additions & 10 deletions sidecar-injector/manifests/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: kubernetes-sidecar-injector
namespace: sidecar-injector
name: kyverno-envoy-sidecar
namespace: kyverno-envoy-sidecar-injector
labels:
app.kubernetes.io/name: sidecar-injector
app.kubernetes.io/instance: sidecar-injector
Expand All @@ -18,20 +18,18 @@ spec:
app.kubernetes.io/name: sidecar-injector
app.kubernetes.io/instance: sidecar-injector
spec:
serviceAccountName: kubernetes-sidecar-injector
serviceAccountName: kyverno-envoy-sidecar
containers:
- name: sidecar-injector
image: "sanskardevops/sidecar-injector:0.0.4"
- name: kyverno-envoy-sidecar
image: "sanskardevops/sidecar-injector:0.0.6"
imagePullPolicy: IfNotPresent
args:
- --port=8443
- --certFile=/opt/kubernetes-sidecar-injector/certs/tls.crt
- --keyFile=/opt/kubernetes-sidecar-injector/certs/tls.key
- --injectPrefix=kyverno-envoy-sidecar
- --injectName=inject
- --sidecarDataKey=sidecars.yaml
volumeMounts:
- name: kubernetes-sidecar-injector-certs
- name: kyverno-envoy-sidecar-certs
mountPath: /opt/kubernetes-sidecar-injector/certs
readOnly: true
ports:
Expand Down Expand Up @@ -59,7 +57,7 @@ spec:
failureThreshold: 5
timeoutSeconds: 4
volumes:
- name: kubernetes-sidecar-injector-certs
- name: kyverno-envoy-sidecar-certs
secret:
secretName: kubernetes-sidecar-injector-certs
secretName: kyverno-envoy-sidecar-certs

8 changes: 4 additions & 4 deletions sidecar-injector/manifests/mutatingwebhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: kubernetes-sidecar-injector
name: kyverno-envoy-sidecar
labels:
app.kubernetes.io/name: sidecar-injector
app.kubernetes.io/instance: sidecar-injector
webhooks:
- name: kyverno-envoy-sidecar.sidecar-injector.svc
- name: kyverno-envoy-sidecar.kyverno-envoy-sidecar-injector.svc
clientConfig:
service:
name: kubernetes-sidecar-injector
namespace: sidecar-injector
name: kyverno-envoy-sidecar
namespace: kyverno-envoy-sidecar-injector
path: "/mutate"
caBundle: "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZsakNDQTM2Z0F3SUJBZ0lVVFNGS2k0NDlzYWNmUXF4UTVnWFhBanU5SjA0d0RRWUpLb1pJaHZjTkFRRUwKQlFBd096RTVNRGNHQTFVRUF3d3dhM1ZpWlhKdVpYUmxjeTF6YVdSbFkyRnlMV2x1YW1WamRHOXlMbk5wWkdWagpZWEl0YVc1cVpXTjBiM0l1YzNaak1CNFhEVEkw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ElFcDFOeGoyMGlWaDZlZ3FsNksvTE5pCjc4VkdxdFBwM1FqVUtIMkRicExsRnluTGdoNm8zM1NHWjRlNWtXbXB4djdyUncrblJhZEo0ekRoa0hkWjZ1ZjIKMFoyTG9ZVmpMdExRTEljclRxcENVODRSUDg5WjN4cFF1N3lHQlptVVc2OURIUFVmcm9LZ25UUTZyODJYY21IUQpKTkV2TS93VXlpdUhsY1Erb2pCZ2ZSd2MzRjNkblZ6VHZ4N1drKzVaMkdFbVk4NEp6SE9TQmIvdAotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="
failurePolicy: Fail
Expand Down
14 changes: 7 additions & 7 deletions sidecar-injector/manifests/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: kubernetes-sidecar-injector
namespace: sidecar-injector
name: kyverno-envoy-sidecar
namespace: kyverno-envoy-sidecar-injector
labels:
app.kubernetes.io/name: sidecar-injector
app.kubernetes.io/instance: sidecar-injector
Expand All @@ -12,7 +12,7 @@ metadata:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kubernetes-sidecar-injector
name: kyverno-envoy-sidecar
labels:
app.kubernetes.io/name: sidecar-injector
app.kubernetes.io/instance: sidecar-injector
Expand All @@ -28,16 +28,16 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kubernetes-sidecar-injector
name: kyverno-envoy-sidecar
labels:
app.kubernetes.io/name: sidecar-injector
app.kubernetes.io/instance: sidecar-injector
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: sidecar-injector
name: kyverno-envoy-sidecar
subjects:
- kind: ServiceAccount
name: kubernetes-sidecar-injector
namespace: sidecar-injector
name: kyverno-envoy-sidecar
namespace: kyverno-envoy-sidecar-injector
---
4 changes: 2 additions & 2 deletions sidecar-injector/manifests/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,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ZnY2RGVEJvSlVEdHk2c3NwSWg5b1BBR3VONXROQlFBK2VlRHFQbEtUQmdaOTU0OEpvMSt5cVFaMFcKb1lYeG0rUEJObTZxK3FmVzJzQ2VyQjRaY0pxWkFnPT0KLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo=
kind: Secret
metadata:
name: kubernetes-sidecar-injector-certs
namespace: sidecar-injector
name: kyverno-envoy-sidecar-certs
namespace: kyverno-envoy-sidecar-injector
labels:
app.kubernetes.io/name: sidecar-injector
app.kubernetes.io/instance: sidecar-injector
4 changes: 2 additions & 2 deletions sidecar-injector/manifests/service.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
kind: Service
metadata:
name: kubernetes-sidecar-injector
namespace: sidecar-injector
name: kyverno-envoy-sidecar
namespace: kyverno-envoy-sidecar-injector
labels:
app.kubernetes.io/name: sidecar-injector
app.kubernetes.io/instance: sidecar-injector
Expand Down
2 changes: 1 addition & 1 deletion sidecar-injector/manifests/sidecar-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: kyverno-envoy-sidecar
namespace: sidecar-injector
namespace: kyverno-envoy-sidecar-injector
data:
sidecars.yaml: |
- name: kyverno-envoy-sidecar
Expand Down
1 change: 0 additions & 1 deletion sidecar-injector/pkg/httpd/simpleserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func (simpleServer *SimpleServer) Start() error {
if simpleServer.Local {
return server.ListenAndServe()
}
log.Infof("Starting tls server on port %d", simpleServer.Port)
return server.ListenAndServeTLS(simpleServer.CertFile, simpleServer.KeyFile)
}

Expand Down
Loading

0 comments on commit da53d26

Please sign in to comment.