Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ The release process is semi-automated.
> Upon pushing the tag, a GitHub Action will do the following:
> - Build and publish the container image: `quay.io/jetstack/venafi-agent`,
> - Build and publish the Helm chart: `oci://quay.io/jetstack/charts/venafi-kubernetes-agent`,
> - Build and publish the container image: `quay.io/jetstack/cyberark-disco-agent`,
> - Build and publish the Helm chart: `oci://quay.io/jetstack/charts/cyberark-disco-agent`,
> - Build and publish the container image: `quay.io/jetstack/disco-agent`,
> - Build and publish the Helm chart: `oci://quay.io/jetstack/charts/disco-agent`,
> - Create a draft GitHub release,

1. Upgrade the Go dependencies.
Expand Down Expand Up @@ -75,7 +75,7 @@ For context, the new tag will create the following images:
| Image | Automation |
|-----------------------------------------------------------|----------------------------------------------------------------------------------------------|
| `quay.io/jetstack/venafi-agent` | Automatically built by the [release action](.github/workflows/release.yml) on Git tag pushes |
| `quay.io/jetstack/cyberark-disco-agent` | Automatically built by the [release action](.github/workflows/release.yml) on Git tag pushes |
| `quay.io/jetstack/disco-agent` | Automatically built by the [release action](.github/workflows/release.yml) on Git tag pushes |
| `registry.venafi.cloud/venafi-agent/venafi-agent` | Automatically mirrored by Harbor Replication rule |
| `private-registry.venafi.cloud/venafi-agent/venafi-agent` | Automatically mirrored by Harbor Replication rule |
| `private-registry.venafi.eu/venafi-agent/venafi-agent` | Automatically mirrored by Harbor Replication rule |
Expand All @@ -85,7 +85,7 @@ and the following OCI Helm charts:
| Helm Chart | Automation |
|----------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
| `oci://quay.io/jetstack/charts/venafi-kubernetes-agent` | Automatically built by the [release action](.github/workflows/release.yml) on Git tag pushes |
| `oci://quay.io/jetstack/charts/cyberark-disco-agent` | Automatically built by the [release action](.github/workflows/release.yml) on Git tag pushes |
| `oci://quay.io/jetstack/charts/disco-agent` | Automatically built by the [release action](.github/workflows/release.yml) on Git tag pushes |
| `oci://registry.venafi.cloud/charts/venafi-kubernetes-agent` | Automatically mirrored by Harbor Replication rule |
| `oci://private-registry.venafi.cloud/charts/venafi-kubernetes-agent` | Automatically mirrored by Harbor Replication rule |
| `oci://private-registry.venafi.eu/charts/venafi-kubernetes-agent` | Automatically mirrored by Harbor Replication rule |
Expand Down Expand Up @@ -122,6 +122,6 @@ v1.1.0 (Git tag in the jetstack-secure repo)

NOTE(mael): TBD

### Step 3: Test the Helm chart "cyberark-disco-agent"
### Step 3: Test the Helm chart "disco-agent"

NOTE(wallrj): TBD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: cyberark-disco-agent
name: disco-agent
description: |-
The cyberark-disco-agent connects your Kubernetes or Openshift cluster to CyberArk Discovery and Context.
The disco-agent connects your Kubernetes or Openshift cluster to CyberArk Discovery and Context.

maintainers:
- name: CyberArk
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cyberark-disco-agent
# disco-agent

The Cyberark Discovery and Context Agent connects your Kubernetes or OpenShift
cluster to the Discovery and Context service of the CyberArk Identity Security Platform.
Expand Down Expand Up @@ -61,7 +61,7 @@ stringData:
Deploy the agent:

```sh
helm upgrade agent "oci://${OCI_BASE}/charts/cyberark-disco-agent" \
helm upgrade agent "oci://${OCI_BASE}/charts/disco-agent" \
--install \
--create-namespace \
--namespace "$NAMESPACE" \
Expand All @@ -72,7 +72,7 @@ helm upgrade agent "oci://${OCI_BASE}/charts/cyberark-disco-agent" \

Check the Pod and its events:
```sh
kubectl describe -n cyberark pods -l app.kubernetes.io/name=cyberark-disco-agent
kubectl describe -n cyberark pods -l app.kubernetes.io/name=disco-agent
```

Check the logs:
Expand Down Expand Up @@ -318,7 +318,7 @@ Create a PodMonitor to add the metrics to Prometheus, if you are using Prometheu
#### **metrics.podmonitor.namespace** ~ `string`

The namespace that the pod monitor should live in.
Defaults to the cyberark-disco-agent namespace.
Defaults to the disco-agent namespace.

#### **metrics.podmonitor.prometheusInstance** ~ `string`
> Default value:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "cyberark-disco-agent.name" -}}
{{- define "disco-agent.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "cyberark-disco-agent.fullname" -}}
{{- define "disco-agent.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "cyberark-disco-agent.chart" -}}
{{- define "disco-agent.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "cyberark-disco-agent.labels" -}}
helm.sh/chart: {{ include "cyberark-disco-agent.chart" . }}
{{ include "cyberark-disco-agent.selectorLabels" . }}
{{- define "disco-agent.labels" -}}
helm.sh/chart: {{ include "disco-agent.chart" . }}
{{ include "disco-agent.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "cyberark-disco-agent.selectorLabels" -}}
app.kubernetes.io/name: {{ include "cyberark-disco-agent.name" . }}
{{- define "disco-agent.selectorLabels" -}}
app.kubernetes.io/name: {{ include "disco-agent.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "cyberark-disco-agent.serviceAccountName" -}}
{{- define "disco-agent.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "cyberark-disco-agent.fullname" .) .Values.serviceAccount.name }}
{{- default (include "disco-agent.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "cyberark-disco-agent.fullname" . }}-config
name: {{ include "disco-agent.fullname" . }}-config
namespace: {{ .Release.Namespace }}
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
data:
config.yaml: |-
period: {{ .Values.config.period | quote }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "cyberark-disco-agent.fullname" . }}
name: {{ include "disco-agent.fullname" . }}
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "cyberark-disco-agent.selectorLabels" . | nindent 6 }}
{{- include "disco-agent.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 8 }}
{{- include "disco-agent.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -25,7 +25,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "cyberark-disco-agent.serviceAccountName" . }}
serviceAccountName: {{ include "disco-agent.serviceAccountName" . }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down Expand Up @@ -91,7 +91,7 @@ spec:
args:
- "agent"
- "-c"
- "/etc/cyberark-disco-agent/config.yaml"
- "/etc/disco-agent/config.yaml"
- --machine-hub
- --logging-format=json
{{- if .Values.metrics.enabled }}
Expand All @@ -109,7 +109,7 @@ spec:
{{- end }}
volumeMounts:
- name: config
mountPath: "/etc/cyberark-disco-agent"
mountPath: "/etc/disco-agent"
readOnly: true
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
Expand All @@ -120,7 +120,7 @@ spec:
volumes:
- name: config
configMap:
name: {{ include "cyberark-disco-agent.fullname" . }}-config
name: {{ include "disco-agent.fullname" . }}-config
optional: false
{{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "cyberark-disco-agent.fullname" . }}
name: {{ include "disco-agent.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "cyberark-disco-agent.selectorLabels" . | nindent 6 }}
{{- include "disco-agent.selectorLabels" . | nindent 6 }}

{{- if not (or (hasKey .Values.podDisruptionBudget "minAvailable") (hasKey .Values.podDisruptionBudget "maxUnavailable")) }}
minAvailable: 1 # Default value because minAvailable and maxUnavailable are not set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ include "cyberark-disco-agent.fullname" . }}
name: {{ include "disco-agent.fullname" . }}
{{- if .Values.metrics.podmonitor.namespace }}
namespace: {{ .Values.metrics.podmonitor.namespace }}
{{- else }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
prometheus: {{ .Values.metrics.podmonitor.prometheusInstance }}
{{- with .Values.metrics.podmonitor.labels }}
{{- toYaml . | nindent 4 }}
Expand All @@ -19,10 +19,10 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
jobLabel: {{ include "cyberark-disco-agent.fullname" . }}
jobLabel: {{ include "disco-agent.fullname" . }}
selector:
matchLabels:
{{- include "cyberark-disco-agent.selectorLabels" . | nindent 6 }}
{{- include "disco-agent.selectorLabels" . | nindent 6 }}
{{- if .Values.metrics.podmonitor.namespace }}
namespaceSelector:
matchNames:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "cyberark-disco-agent.fullname" . }}-event-emitted
name: {{ include "disco-agent.fullname" . }}-event-emitted
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
rules:
- apiGroups: [""]
resources: ["events"]
Expand All @@ -13,39 +13,39 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "cyberark-disco-agent.fullname" . }}-event-emitted
name: {{ include "disco-agent.fullname" . }}-event-emitted
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "cyberark-disco-agent.fullname" . }}-event-emitted
name: {{ include "disco-agent.fullname" . }}-event-emitted
subjects:
- kind: ServiceAccount
name: {{ include "cyberark-disco-agent.serviceAccountName" . }}
name: {{ include "disco-agent.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "cyberark-disco-agent.fullname" . }}-cluster-viewer
name: {{ include "disco-agent.fullname" . }}-cluster-viewer
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: view
subjects:
- kind: ServiceAccount
name: {{ include "cyberark-disco-agent.serviceAccountName" . }}
name: {{ include "disco-agent.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "cyberark-disco-agent.fullname" . }}-secret-reader
name: {{ include "disco-agent.fullname" . }}-secret-reader
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
rules:
- apiGroups: [""]
resources: ["secrets"]
Expand All @@ -54,24 +54,24 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "cyberark-disco-agent.fullname" . }}-secret-reader
name: {{ include "disco-agent.fullname" . }}-secret-reader
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
roleRef:
kind: ClusterRole
name: {{ include "cyberark-disco-agent.fullname" . }}-secret-reader
name: {{ include "disco-agent.fullname" . }}-secret-reader
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: {{ include "cyberark-disco-agent.serviceAccountName" . }}
name: {{ include "disco-agent.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "cyberark-disco-agent.fullname" . }}-rbac-reader
name: {{ include "disco-agent.fullname" . }}-rbac-reader
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
rules:
- apiGroups: ["rbac.authorization.k8s.io"]
resources:
Expand All @@ -84,15 +84,15 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "cyberark-disco-agent.fullname" . }}-rbac-reader
name: {{ include "disco-agent.fullname" . }}-rbac-reader
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
roleRef:
kind: ClusterRole
name: {{ include "cyberark-disco-agent.fullname" . }}-rbac-reader
name: {{ include "disco-agent.fullname" . }}-rbac-reader
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: {{ include "cyberark-disco-agent.serviceAccountName" . }}
name: {{ include "disco-agent.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "cyberark-disco-agent.serviceAccountName" . }}
name: {{ include "disco-agent.serviceAccountName" . }}
labels:
{{- include "cyberark-disco-agent.labels" . | nindent 4 }}
{{- include "disco-agent.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
Loading