Skip to content

Commit f3ee976

Browse files
feat: add Wiz setup and configuration for Linode Kubernetes Integration (#2465)
Co-authored-by: svcAPLBot <[email protected]>
1 parent 71f740d commit f3ee976

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
wizApiToken:
2+
clientId: "__WIZ_CLIENT_ID__"
3+
clientToken: "__WIZ_CLIENT_TOKEN__"
4+
clientEndpoint: ""
5+
wiz-kubernetes-connector:
6+
enabled: true
7+
autoCreateConnector:
8+
connectorName: "<connectorName>"
9+
webhook:
10+
clusterExternalId: "<clusterExternalId>"
11+
wiz-admission-controller:
12+
enabled: true
13+
kubernetesAuditLogsWebhook:
14+
enabled: true
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
global:
2+
wizApiToken:
3+
clientId: "__WIZ_CLIENT_ID__"
4+
clientToken: "__WIZ_CLIENT_TOKEN__"
5+
clientEndpoint: ""
6+
7+
wiz-kubernetes-connector:
8+
enabled: true
9+
autoCreateConnector:
10+
connectorName: "<connectorName>"
11+
clusterExternalId: "<clusterExternalId>"
12+
wiz-broker:
13+
enabled: true
14+
15+
wiz-sensor:
16+
enabled: true
17+
imagePullSecret:
18+
create: false
19+
name: "sensor-image-pull"
20+
21+
wiz-admission-controller:
22+
enabled: true
23+
kubernetesAuditLogsWebhook:
24+
enabled: true
25+
opaWebhook:
26+
enabled: true
27+
imageIntegrityWebhook:
28+
enabled: false
29+
policies:
30+
- my-image-trust-policy

.github/workflows/integration.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,48 @@ jobs:
253253
sleep 10
254254
done
255255
echo LINODE_CLUSTER_CONTEXT=`kubectl config current-context` >> $GITHUB_ENV
256+
- name: Set up Wiz
257+
if: ${{ inputs.install_profile != 'no-apl' }}
258+
run: |
259+
260+
# Use cluster information from environment variables
261+
CLUSTER_NAME="${{ env.LINODE_CLUSTER_NAME }}"
262+
CLUSTER_ID="${{ env.LINODE_CLUSTER_ID }}"
263+
264+
echo "Setting up Wiz for cluster: $CLUSTER_NAME (ID: $CLUSTER_ID)"
265+
266+
# Create YAML configuration files from templates
267+
KUB_INTEGRATION_PATH="./${CLUSTER_NAME}_kub_integration.yaml"
268+
ADMISSION_PATH="./${CLUSTER_NAME}_admission_control.yaml"
269+
270+
sed "s/__WIZ_CLIENT_ID__/${{ secrets.WIZ_CLIENT_ID }}/g; s/__WIZ_CLIENT_TOKEN__/${{ secrets.WIZ_CLIENT_TOKEN }}/g; s/<connectorName>/${CLUSTER_NAME}/g; s/<clusterExternalId>/${CLUSTER_ID}/g" .github/templates/wiz-kubernetes-integration.yaml > "$KUB_INTEGRATION_PATH"
271+
sed "s/__WIZ_CLIENT_ID__/${{ secrets.WIZ_CLIENT_ID }}/g; s/__WIZ_CLIENT_TOKEN__/${{ secrets.WIZ_CLIENT_TOKEN }}/g; s/<connectorName>/${CLUSTER_NAME}/g; s/<clusterExternalId>/${CLUSTER_ID}/g" .github/templates/wiz-admission-control.yaml > "$ADMISSION_PATH"
272+
273+
# Verify cluster connectivity
274+
echo "Verifying cluster connectivity..."
275+
kubectl get nodes
276+
277+
# Add Helm repo for Wiz
278+
helm repo add wiz-sec https://charts.wiz.io/
279+
helm repo update
280+
281+
# Create namespace if not exists
282+
kubectl create namespace wiz --dry-run=client -o yaml | kubectl apply -f -
283+
284+
# Set release name
285+
RELEASE_NAME="wiz-${CLUSTER_NAME//_/-}"
286+
RELEASE_NAME="${RELEASE_NAME,,}" # Convert to lowercase
287+
NAMESPACE="wiz"
288+
289+
# Install Wiz components
290+
echo "🚀 Installing Wiz Kubernetes Integration..."
291+
helm install "$RELEASE_NAME" wiz-sec/wiz-kubernetes-integration --values "$KUB_INTEGRATION_PATH" -n "$NAMESPACE"
292+
293+
echo "🚀 Installing Wiz Admission Controller..."
294+
helm install wiz-lke-ac wiz-sec/wiz-admission-controller --values "$ADMISSION_PATH" -n "$NAMESPACE" --wait
295+
296+
echo "✅ Wiz deployment for cluster $CLUSTER_NAME completed."
297+
256298
- name: Create image pull secret on test cluster
257299
if: ${{ inputs.install_profile != 'no-apl' }}
258300
run: |

0 commit comments

Comments
 (0)