Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sidecar-injector to inject kyverno-envoy-plugin as sidecar #65

Merged
merged 5 commits into from
Apr 22, 2024

Conversation

Sanskarzz
Copy link
Contributor

@Sanskarzz Sanskarzz commented Apr 15, 2024

Kyverno-envoy-sidecar Mutating Admission Controller to inject kyverno-envoy-plugin as sidecar .
Till now i have added code which has http server which handle admission review request and patch the sidecar in the requested pod which has label kyverno-envoy-sidecar/injection = enabled
And sidecar container information will be passed via config map like

apiVersion: v1
kind: ConfigMap
metadata:
  name: kyverno-envoy-sidecar
  namespace: 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
      

Till now what is done

  • An https server or webhook server to handle AdmissionReview object and patch the sidecar configurations
  • Containerization of the https server with Docker
  • Add Deployment and mutating Admission webhook configurations manifests for installation of the kyverno envoy sidecar injector
  • Add example manifest to test
  • README.md for better installtion of the kyverno envoy sidecar and for this admission controller works

@Sanskarzz Sanskarzz marked this pull request as ready for review April 20, 2024 14:26
@Sanskarzz Sanskarzz requested a review from a team as a code owner April 20, 2024 14:26
@eddycharly eddycharly merged commit da53d26 into kyverno:main Apr 22, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants