Skip to content

Commit

Permalink
Helm 2.32.0: ARM64 support, credentials update improvement #152
Browse files Browse the repository at this point in the history
- ARM64 support: ARM64 support is now available for all agents, except Runtime Protection blade and Shiftleft environment
- ECS scanner: supporting customer certificates for Container Registries scan from ECS via CG_REG_CA_CERTIFICATE environment variable
- Labels Unification: standardized labeling across all components
- Agents restart on credential change: all agents will be restarted when credentials or cluster ID is updated
- Telemetry Enhancements

Agents versions:
- Inventory 1.15.0
- Image Assurance 2.36.0
- Admission Control: Enforcer 2.13.0, Policy 1.9.0
- Runtime Policy 1.9.0
- Flow Logs (Intelligence) 0.15.0
  • Loading branch information
chkp-talbenor authored Sep 19, 2024
1 parent a566514 commit 8e060f6
Show file tree
Hide file tree
Showing 16 changed files with 156 additions and 91 deletions.
4 changes: 2 additions & 2 deletions checkpoint/cloudguard/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: 2.31.0
appVersion: 2.32.0
description: A Helm chart for Check Point CloudGuard Workload Security
home: https://portal.checkpoint.com
icon: https://www.checkpoint.com/wp-content/uploads/icon-cloudguard-nav.png
Expand Down Expand Up @@ -35,4 +35,4 @@ keywords:
- gke
- autopilot
name: cloudguard
version: 2.31.0
version: 2.32.0
22 changes: 9 additions & 13 deletions checkpoint/cloudguard/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ inventory:

## Specify image and tag
image: checkpoint/consec-inventory-agent
tag: 1.14.0
tag: 1.15.0

## Specify existing service account name ("" to create)
serviceAccountName: ""
Expand Down Expand Up @@ -112,7 +112,7 @@ addons:
priorityClassName: "system-node-critical"
## Specify image and tag
image: checkpoint/consec-imagescan-daemon
tag: 2.30.0
tag: 2.36.0

## Specify existing service account name ("" to create)
serviceAccountName: ""
Expand All @@ -134,7 +134,7 @@ addons:
shim:
## Specify image and tag
image: checkpoint/consec-imagescan-shim
tag: 2.30.0
tag: 2.36.0

## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
Expand All @@ -159,7 +159,6 @@ addons:
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
nodeSelector:
kubernetes.io/os: linux
kubernetes.io/arch: amd64
tolerations:
- operator: Exists
affinity: {}
Expand All @@ -170,7 +169,7 @@ addons:
engine:
## Specify image and tag
image: checkpoint/consec-imagescan-engine
tag: 2.30.0
tag: 2.36.0

## Specify existing service account name ("" to create)
serviceAccountName: ""
Expand All @@ -194,7 +193,6 @@ addons:
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
nodeSelector:
kubernetes.io/os: linux
kubernetes.io/arch: amd64
tolerations: []
affinity: {}
podAnnotations:
Expand All @@ -203,7 +201,7 @@ addons:
list:
## Specify image and tag
image: checkpoint/consec-imagescan-engine
tag: 2.30.0
tag: 2.36.0

## Specify existing service account name ("" to create)
serviceAccountName: ""
Expand All @@ -225,7 +223,6 @@ addons:
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
nodeSelector:
kubernetes.io/os: linux
kubernetes.io/arch: amd64
tolerations: [ ]
affinity: { }
podAnnotations:
Expand Down Expand Up @@ -260,7 +257,6 @@ addons:
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
nodeSelector:
kubernetes.io/os: linux
kubernetes.io/arch: amd64
tolerations:
- operator: Exists
affinity: {}
Expand All @@ -276,7 +272,7 @@ addons:
priorityClassName: "system-node-critical"
## Specify image and tag
image: checkpoint/consec-flowlogs-daemon
tag: 0.14.0
tag: 0.15.0

## Specify existing service account name ("" to create)
serviceAccountName: ""
Expand Down Expand Up @@ -316,7 +312,7 @@ addons:
policy:
## Specify image and tag
image: checkpoint/consec-admission-policy
tag: 1.8.0
tag: 1.9.0

## Specify existing service account name ("" to create)
serviceAccountName: ""
Expand Down Expand Up @@ -346,7 +342,7 @@ addons:
enforcer:
## Specify image and tag
image: checkpoint/consec-admission-enforcer
tag: 2.12.0
tag: 2.13.0

## Specify existing service account name ("" to create)
serviceAccountName: ""
Expand Down Expand Up @@ -452,7 +448,7 @@ addons:

## Specify custom image ("" to use default)
image: checkpoint/consec-runtime-policy
tag: 1.8.0
tag: 1.9.0

## Specify existing service account name ("" to create)
serviceAccountName: ""
Expand Down
25 changes: 22 additions & 3 deletions checkpoint/cloudguard/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@
{{- default $image $containerConfig.fullImage }}
{{- end -}}

{{- /* Labels commonly used in our k8s resources */ -}}
{{- define "common.labels" -}}
{{- /* Labels commonly used in our selectors - don't use anywhere else
usage: `{{- include "common.selector.labels" $config -}}`
*/ -}}
{{- define "common.selector.labels" -}}
app.kubernetes.io/name: {{ include "agent.resource.name" . }}
app.kubernetes.io/instance: {{ include "name.prefix" . }}
{{- end -}}
Expand All @@ -86,11 +88,13 @@ helm.sh/chart: {{ printf "%s-%s" .Chart.name .Chart.version | replace "+" "_" |
app.kubernetes.io/managed-by: {{ $.Release.Service }}
app.kubernetes.io/version: {{ $.Chart.appVersion }}
app.created.by.template: {{ (include "is.helm.template.command" .) | quote }}
{{ template "common.labels" . }}
{{ include "common.selector.labels" . }}
{{- end -}}
{{- /* Pod annotations commonly used in agents */ -}}
{{- define "common.pod.annotations" -}}
{{- /* workloads would restart upon some configurations change */ -}}
{{- include "annotations.sha256" . -}}
{{- /* Openshift does not allow seccomp - So we don't add seccomp in openshift case */ -}}
{{- /* From k8s 1.19 and up we use the seccomp in securityContext so no need for it here, in case of template we don't know the version so we fall back to annotation */ -}}
{{- if and (not (contains "openshift" .platform)) (semverCompare "<1.19-0" .Capabilities.KubeVersion.Version) }}
Expand Down Expand Up @@ -567,3 +571,18 @@ usage:
{{- define "supported.containerRuntimes" -}}
docker containerd cri-o
{{- end -}}

{{- /* value for annotations to change so resources are triggered again
usage:
{{- include "annotations.sha256" $config -}}`
*/ -}}
{{- define "annotations.sha256" -}}
{{- if not (hasKey .Values "sha256annotations") -}}
{{- $sha256AnnotationsDict := dict -}}
{{- $_ := set $sha256AnnotationsDict "checksum/config" (include (print .Template.BasePath "/cg-config.yaml") . | sha256sum | trunc 63) -}}
{{- $_ := set $sha256AnnotationsDict "checksum/cgsecret" (include (print .Template.BasePath "/cg-creds-secret.yaml") . | sha256sum | trunc 63) -}}
{{- $_ := set $sha256AnnotationsDict "checksum/regsecret" (include (print .Template.BasePath "/registry-creds-secret.yaml") . | sha256sum | trunc 63) -}}
{{- $_ := set .Values "sha256annotations" $sha256AnnotationsDict -}}
{{- end -}}
{{- .Values.sha256annotations | toYaml -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ spec:
replicas: {{ $config.agentConfig.replicaCount }}
selector:
matchLabels:
{{ include "common.labels" $config | indent 6 }}
{{ include "common.selector.labels" $config | indent 6 }}
template:
metadata:
annotations:
{{ include "common.pod.annotations" $config | indent 8 }}
# adding it so workload will be restarted to be updated with a certificate that was re-generated
timestamp: {{ now | quote }}
labels:
{{ include "common.labels" $config | indent 8 }}
{{ include "common.labels.with.chart" $config | indent 8 }}
spec:
# the affinity definition should be BEFORE include "common.pod.properties" .since in case the
#user will add his own "affinity" we want to take his definition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ spec:
port: 443
targetPort: 8443
selector:
{{ include "common.labels" $config | indent 4 }}
{{ include "common.selector.labels" $config | indent 4 }}
{{ end }}
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ metadata:
spec:
selector:
matchLabels:
{{ include "common.labels" $config | indent 6 }}
{{ include "common.selector.labels" $config | indent 6 }}
replicas: 1
template:
metadata:
annotations:
{{ include "common.pod.annotations" $config | indent 8 }}
labels:
{{ include "common.labels" $config | indent 8 }}
{{ include "common.labels.with.chart" $config | indent 8 }}
spec:
affinity:
{{ include "common.node.affinity.multiarch" $config | indent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ metadata:
spec:
selector:
matchLabels:
{{ include "common.labels" $config | indent 6 }}
{{ include "common.selector.labels" $config | indent 6 }}
{{ include "daemonset.updateStrategy" $config | indent 2}}
template:
metadata:
annotations:
{{ include "common.pod.annotations" $config | indent 8 }}
labels:
{{ include "common.labels" $config | indent 8 }}
{{ include "common.labels.with.chart" $config | indent 8 }}
spec:
{{ include "common.pod.properties" $config | indent 6 }}
hostNetwork: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ metadata:
spec:
selector:
matchLabels:
{{ include "common.labels" $config | indent 6 }}
{{ include "common.selector.labels" $config | indent 6 }}
{{ include "daemonset.updateStrategy" $config | indent 2}}
template:
metadata:
annotations:
{{ include "common.pod.annotations" $config | indent 8 }}
labels:
{{ include "common.labels" $config | indent 8 }}
{{ include "common.labels.with.chart" $config | indent 8 }}
spec:
affinity:
{{ include "common.node.affinity.multiarch" $config | indent 8 }}
{{ include "common.pod.properties" $config | indent 6 }}
containers:
- name: {{ $config.agentName }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:
spec:
selector:
matchLabels:
{{ include "common.labels" $config | indent 6 }}
{{ include "common.selector.labels" $config | indent 6 }}
{{ include "daemonset.updateStrategy" $config | indent 2}}
template:
metadata:
Expand All @@ -23,8 +23,10 @@ spec:
# adding it so workload will be restarted to be updated with certificates that were re-generated
timestamp: {{ now | quote }}
labels:
{{ include "common.labels" $config | indent 8 }}
{{ include "common.labels.with.chart" $config | indent 8 }}
spec:
affinity:
{{ include "common.node.affinity.multiarch" $config | indent 8 }}
{{ include "common.pod.properties" $config | indent 6 }}
containers:
# Main container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
spec:
selector:
matchLabels:
{{ include "common.labels" $config | indent 6 }}
{{ include "common.selector.labels" $config | indent 6 }}
replicas: {{ $config.agentConfig.replicaCount }}
template:
metadata:
Expand All @@ -21,8 +21,10 @@ spec:
# adding it so workload will be restarted to be updated with certificates that were re-generated
timestamp: {{ now | quote }}
labels:
{{ include "common.labels" $config | indent 8 }}
{{ include "common.labels.with.chart" $config | indent 8 }}
spec:
affinity:
{{ include "common.node.affinity.multiarch" $config | indent 8 }}
{{ include "common.pod.properties" $config | indent 6 }}
containers:
# Main container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
spec:
selector:
matchLabels:
{{ include "common.labels" $config | indent 6 }}
{{ include "common.selector.labels" $config | indent 6 }}
imagescan-agent-type: list
replicas: 1
template:
Expand All @@ -23,9 +23,11 @@ spec:
# adding it so workload will be restarted to be updated with certificates that were re-generated
timestamp: {{ now | quote }}
labels:
{{ include "common.labels" $config | indent 8 }}
{{ include "common.labels.with.chart" $config | indent 8 }}
imagescan-agent-type: list
spec:
affinity:
{{ include "common.node.affinity.multiarch" $config | indent 8 }}
{{ include "common.pod.properties" $config | indent 6 }}
containers:
# Main container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ spec:
replicas: {{ $config.agentConfig.replicaCount }}
selector:
matchLabels:
{{ include "common.labels" $config | indent 6 }}
{{ include "common.selector.labels" $config | indent 6 }}
template:
metadata:
annotations:
{{ include "common.pod.annotations" $config | indent 8 }}
labels:
{{ include "common.labels" $config | indent 8 }}
{{ include "common.labels.with.chart" $config | indent 8 }}
spec:
affinity:
{{ include "common.node.affinity.multiarch" $config | indent 8 }}
Expand Down
4 changes: 2 additions & 2 deletions checkpoint/cloudguard/templates/runtime/daemon/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ metadata:
spec:
selector:
matchLabels:
{{ include "common.labels" $config | indent 6 }}
{{ include "common.selector.labels" $config | indent 6 }}
{{ include "daemonset.updateStrategy" $config | indent 2}}
template:
metadata:
annotations:
{{ include "common.pod.annotations" $config | indent 8 }}
container.apparmor.security.beta.kubernetes.io/daemon: unconfined
labels:
{{ include "common.labels" $config | indent 8 }}
{{ include "common.labels.with.chart" $config | indent 8 }}
spec:
{{ include "common.pod.properties" $config | indent 6 }}
hostNetwork: true # needed for DNS request listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ metadata:
spec:
selector:
matchLabels:
{{ include "common.labels" $config | indent 6 }}
{{ include "common.selector.labels" $config | indent 6 }}
replicas: 1
template:
metadata:
annotations:
{{ include "common.pod.annotations" $config | indent 8 }}
labels:
{{ include "common.labels" $config | indent 8 }}
{{ include "common.labels.with.chart" $config | indent 8 }}
spec:
affinity:
{{ include "common.node.affinity.multiarch" $config | indent 8 }}
Expand Down
Binary file added repository/cloudguard-2.32.0.tgz
Binary file not shown.
Loading

0 comments on commit 8e060f6

Please sign in to comment.