This document describes the steps needed to install Deepfactor mutating admission webhook in your Kubernetes cluster using Argo CD. This document assume that you have a Kubernetes cluster deployed using Argo CD. If you have not yet created one, please refer to the following article to create one
https://argo-cd.readthedocs.io/en/stable/
Install Deepfactor mutating admission webhook #
Create a yaml file (df-webhook.yaml) with the following contents.
apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: deepfactor-webhook namespace: argocd spec: destination: namespace: df-webhook server: https://kubernetes.default.svc project: default source: chart: webhook helm: parameters: - name: webhookconfig.dfRunToken value: tokenFromMyDeepfactorPortal # retrieve from Deepfactor portal UI - name: validation.enabled value: "true" - name: clusterName value: clusterNameOfYourChoice # provide a name for your cluster repoURL: https://static.deepfactor.io/helm-charts targetRevision: syncPolicy: automated: {} syncOptions: - CreateNamespace=true
Run the following command to install Deepfactor webhook
kubectl apply -f ./df-webhook.yaml
#
Manage Deepfactor admission webhook TLS certificate using cert-manager #
If you are using cert manager to manage TLS certificates within your cluster and want Deepfactor webhook TLS certificate also to be managed using cert manager, please use the following instructions to install the Deepfactor webhook.
Create a yaml file (df-webhook.yaml) with the following contents.
apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: deepfactor-webhook namespace: argocd spec: destination: namespace: df-webhook server: https://kubernetes.default.svc project: default source: chart: webhook helm: parameters: - name: webhook.certManager.enabled value: "true" - name: webhookconfig.dfRunToken value: tokenFromMyDeepfactorPortal # retrieve from Deepfactor portal UI - name: validation.enabled value: "true" - name: clusterName value: clusterNameOfYourChoice # provide a name for your cluster repoURL: https://static.deepfactor.io/helm-charts targetRevision: syncPolicy: automated: {} syncOptions: - CreateNamespace=true
Run the following command to install Deepfactor webhook
kubectl apply -f ./df-webhook.yaml