ArgoCD
Actions and automations are legacy components. We strongly recommend using workflows instead. Existing actions and automations remain supported.
This page will walk you through the installation of the Port execution agent in your Kubernetes cluster using ArgoCD, utilizing its Helm Capabilities.
Prerequisites
- kubectl must be installed to apply your installation manifest.
- Helm must be installed to use the chart. Please refer to the Helm documentation for further details about the installation.
- ArgoCD must be installed in your Kubernetes cluster. Please refer to ArgoCD's documentation for further details about the installation.
- You will need your Port credentials.
- The connection credentials to Kafka are provided to you by Port.
- If you want to trigger a GitLab Pipeline, you need to have a GitLab trigger token
Installation
- In your git repo, create a directory called
argocd.
mkdir argocd
- Inside your
argocddirectory create another directory for the current installation. For our example we usemy-port-agent.
mkdir -p argocd/my-port-agent
-
Create a
values.yamlfile in yourmy-port-agentdirectory, you can use it to override the helm chart values. Commit the changes to your git repository. -
Install the
my-port-agentArgoCD Application by creating the followingmy-port-agent.yamlmanifest:Remember to replace the placeholders for
YOUR_ORG_ID,YOUR_KAFKA_CONSUMER_GROUP,YOUR_PORT_CLIENT_IDYOUR_PORT_CLIENT_SECRETandYOUR_GIT_REPO_URL.The example uses
targetRevision: "0.8.*"on the Helm source so ArgoCD tracks the latest0.8.xport-agent chart release. See Argo CD tracking strategies for semver ranges on Helm charts.Multiple sources ArgoCD documentation can be found here.
ArgoCD application (click to expand)
apiVersion: argoproj.io/v1alpha1kind: Applicationmetadata:name: my-port-agentnamespace: argocdspec:destination:namespace: my-port-agentserver: https://kubernetes.default.svcproject: defaultsources:- repoURL: 'https://port-labs.github.io/helm-charts/'chart: port-agenttargetRevision: "0.8.*"helm:valueFiles:- $values/argocd/my-port-agent/values.yamlparameters:- name: env.normal.KAFKA_CONSUMER_GROUP_IDvalue: YOUR_KAFKA_CONSUMER_GROUP- name: env.normal.PORT_ORG_IDvalue: YOUR_ORG_ID- name: env.normal.STREAMER_NAMEvalue: KAFKA- name: env.secret.PORT_CLIENT_IDvalue: YOUR_PORT_CLIENT_ID- name: env.secret.PORT_CLIENT_SECRETvalue: YOUR_PORT_CLIENT_SECRET- repoURL: YOUR_GIT_REPO_URLtargetRevision: mainref: valuessyncPolicy:automated:prune: trueselfHeal: truesyncOptions:- CreateNamespace=true
-
Apply your application manifest with
kubectl:kubectl apply -f my-port-agent.yaml
Done! The exporter will begin creating and updating objects from your Kubernetes cluster as Port entities shortly.
Next Steps
- Refer to the usage guide to set up a self-service action that sends a webhook.
- Customize the payload mapping to control the payload sent to the target.