venafi-integration-core 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.mjs +416 -34
- package/package.json +1 -1
package/bundle.mjs
CHANGED
|
@@ -32400,11 +32400,308 @@ Save frequently -- sessions aren't persisted.`;
|
|
|
32400
32400
|
- Verify error messages are helpful and descriptive
|
|
32401
32401
|
- Test with invalid credentials, unreachable hosts, etc.
|
|
32402
32402
|
|
|
32403
|
+
---
|
|
32404
|
+
|
|
32403
32405
|
## vSatellite Testing
|
|
32404
|
-
|
|
32405
|
-
|
|
32406
|
-
|
|
32407
|
-
|
|
32406
|
+
|
|
32407
|
+
Deploying to a vSatellite is the only way to fully test the connector end-to-end. This section covers the complete workflow including container registry setup, deployment, log capture, and debugging.
|
|
32408
|
+
|
|
32409
|
+
### Container Registry for Testing
|
|
32410
|
+
|
|
32411
|
+
**Recommended: Public container registry (no auth required)**
|
|
32412
|
+
|
|
32413
|
+
The simplest approach is a **public** container registry. This avoids auth token management entirely \u2014 the vSatellite can pull images without any credentials or registries.yaml changes.
|
|
32414
|
+
|
|
32415
|
+
**AWS ECR Public** (\`public.ecr.aws\`) is a good option:
|
|
32416
|
+
- Free for public repositories
|
|
32417
|
+
- No pull authentication required (anyone can pull)
|
|
32418
|
+
- Push requires AWS credentials (your dev machine only)
|
|
32419
|
+
- No expiring tokens to manage on the vSatellite
|
|
32420
|
+
|
|
32421
|
+
\`\`\`bash
|
|
32422
|
+
# One-time setup: create a public ECR repository
|
|
32423
|
+
aws ecr-public create-repository --repository-name tls-protect-my-connector --region us-east-1
|
|
32424
|
+
|
|
32425
|
+
# Authenticate Docker for push (dev machine only)
|
|
32426
|
+
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
|
|
32427
|
+
|
|
32428
|
+
# Build and push
|
|
32429
|
+
export CONTAINER_REGISTRY=public.ecr.aws/<your-alias>
|
|
32430
|
+
make push
|
|
32431
|
+
\`\`\`
|
|
32432
|
+
|
|
32433
|
+
Other public registry options: Docker Hub (public repos), GitHub Container Registry (public packages), Quay.io.
|
|
32434
|
+
|
|
32435
|
+
**If you must use a private registry**: You'll need to configure \`/etc/rancher/k3s/registries.yaml\` on the vSatellite with credentials. See \`get_guidance("container-registry")\` for details. Note that some registries (AWS ECR private) use tokens that expire every 12 hours, which adds operational burden during testing.
|
|
32436
|
+
|
|
32437
|
+
### vSatellite registries.yaml for Public ECR
|
|
32438
|
+
|
|
32439
|
+
Even with a public registry, the vSatellite's default \`registries.yaml\` has a \`"*"\` catch-all mirror that routes ALL image pulls through \`registry.venafi.cloud\`. Your custom image doesn't exist there, so pulls fail silently.
|
|
32440
|
+
|
|
32441
|
+
**You must add an explicit entry for \`public.ecr.aws\`:**
|
|
32442
|
+
|
|
32443
|
+
\`\`\`yaml
|
|
32444
|
+
# /etc/rancher/k3s/registries.yaml
|
|
32445
|
+
mirrors:
|
|
32446
|
+
"public.ecr.aws":
|
|
32447
|
+
endpoint:
|
|
32448
|
+
- "https://public.ecr.aws" # YOUR images pull directly (first)
|
|
32449
|
+
- "https://registry.venafi.cloud" # Venafi platform images (fallback)
|
|
32450
|
+
rewrite:
|
|
32451
|
+
"^knative/(.*)": "public/venafi-vsatellite/knative/$1"
|
|
32452
|
+
"^venafi-vsatellite/(.*)": "public/venafi-vsatellite/$1"
|
|
32453
|
+
"^(.*)": "$1" # passthrough for all other images \u2014 REQUIRED for k3s to generate certs.d entry
|
|
32454
|
+
# ... keep existing docker.io and "*" entries unchanged
|
|
32455
|
+
\`\`\`
|
|
32456
|
+
|
|
32457
|
+
**Key points:**
|
|
32458
|
+
- \`https://public.ecr.aws\` must be the **first** endpoint \u2014 k3s tries endpoints in order
|
|
32459
|
+
- The passthrough rewrite \`"^(.*)": "$1"\` is required \u2014 without it, k3s v1.30+ doesn't create \`certs.d/public.ecr.aws/hosts.toml\` and the \`*\` catch-all catches everything
|
|
32460
|
+
- Keep the Venafi rewrite rules so platform images (knative, satellite) still route correctly
|
|
32461
|
+
- After editing: \`sudo systemctl restart k3s\`
|
|
32462
|
+
- Then restart the satellite pod: \`kubectl rollout restart deployment/satellite -n satellite\`
|
|
32463
|
+
|
|
32464
|
+
### Deployment Workflow for Testing
|
|
32465
|
+
|
|
32466
|
+
\`\`\`bash
|
|
32467
|
+
# 1. Build and push container image
|
|
32468
|
+
export CONTAINER_REGISTRY=public.ecr.aws/<your-alias>
|
|
32469
|
+
make push
|
|
32470
|
+
|
|
32471
|
+
# 2. Generate deployment manifests (injects image digest)
|
|
32472
|
+
make manifests
|
|
32473
|
+
|
|
32474
|
+
# 3a. First time \u2014 register the connector
|
|
32475
|
+
curl -X POST "https://api.venafi.cloud/v1/plugins" \\
|
|
32476
|
+
-H "tppl-api-key: <your-api-key>" \\
|
|
32477
|
+
-H "Content-Type: application/json" \\
|
|
32478
|
+
-d @manifest.create.json
|
|
32479
|
+
|
|
32480
|
+
# 3b. Updates \u2014 PATCH the manifest (MUST use manifest.update.json, not raw manifest.json)
|
|
32481
|
+
curl -X PATCH "https://api.venafi.cloud/v1/plugins/<plugin-id>" \\
|
|
32482
|
+
-H "tppl-api-key: <your-api-key>" \\
|
|
32483
|
+
-H "Content-Type: application/json" \\
|
|
32484
|
+
-d @manifest.update.json
|
|
32485
|
+
|
|
32486
|
+
# 4. Click "Test Connection" in the Venafi UI to trigger deployment
|
|
32487
|
+
# The platform sends req.plugin.deploy to the satellite only on user action.
|
|
32488
|
+
# PATCHing the manifest alone does NOT deploy \u2014 a UI action is required.
|
|
32489
|
+
\`\`\`
|
|
32490
|
+
|
|
32491
|
+
**Important**: The platform compares the stored \`deployment.image\` string to decide whether to redeploy. Pushing to the same \`:latest\` tag and PATCHing with the same URL does nothing. Use \`make manifests\` which injects the build digest, or use versioned tags (\`:v0.1.0\`, \`:v0.2.0\`).
|
|
32492
|
+
|
|
32493
|
+
### Namespaces on the vSatellite
|
|
32494
|
+
|
|
32495
|
+
| Namespace | What runs there | How to access logs |
|
|
32496
|
+
|---|---|---|
|
|
32497
|
+
| \`plugins\` | Connector pods (your code) | \`kubectl logs <pod> -n plugins -c user-container\` |
|
|
32498
|
+
| \`satellite\` | Satellite agent (orchestration) | \`kubectl logs <pod> -n satellite\` |
|
|
32499
|
+
| \`venafi\` | Other vSatellite system components | Rarely needed for connector debugging |
|
|
32500
|
+
|
|
32501
|
+
### Capturing Logs from Connector Pods
|
|
32502
|
+
|
|
32503
|
+
Connector pods are **ephemeral** \u2014 Knative scales them to zero after ~60 seconds of inactivity. This makes log capture challenging. Here are three approaches:
|
|
32504
|
+
|
|
32505
|
+
#### Approach 1: Follow logs in real-time (simplest)
|
|
32506
|
+
|
|
32507
|
+
Trigger an action in the Venafi UI (Test Connection, Discovery, etc.) and immediately watch for the pod:
|
|
32508
|
+
|
|
32509
|
+
\`\`\`bash
|
|
32510
|
+
# Watch for pods to appear
|
|
32511
|
+
kubectl get pods -n plugins -w
|
|
32512
|
+
|
|
32513
|
+
# As soon as a pod appears, grab logs (the -f flag follows in real-time)
|
|
32514
|
+
kubectl logs -f <pod-name> -n plugins -c user-container
|
|
32515
|
+
|
|
32516
|
+
# Or combine: wait for any pod and stream logs
|
|
32517
|
+
kubectl get pods -n plugins -w | while read line; do
|
|
32518
|
+
pod=$(echo "$line" | awk '{print $1}')
|
|
32519
|
+
status=$(echo "$line" | awk '{print $3}')
|
|
32520
|
+
if [ "$status" = "Running" ]; then
|
|
32521
|
+
echo "=== Capturing logs from $pod ==="
|
|
32522
|
+
kubectl logs -f "$pod" -n plugins -c user-container
|
|
32523
|
+
break
|
|
32524
|
+
fi
|
|
32525
|
+
done
|
|
32526
|
+
\`\`\`
|
|
32527
|
+
|
|
32528
|
+
#### Approach 2: Disable scale-to-zero for testing
|
|
32529
|
+
|
|
32530
|
+
Add a \`minScale\` annotation to the Knative service so pods stay running between requests:
|
|
32531
|
+
|
|
32532
|
+
\`\`\`bash
|
|
32533
|
+
# Find the ksvc name
|
|
32534
|
+
kubectl get ksvc -n plugins
|
|
32535
|
+
|
|
32536
|
+
# Patch it to keep at least 1 pod running
|
|
32537
|
+
kubectl annotate ksvc <service-name> -n plugins \\
|
|
32538
|
+
autoscaling.knative.dev/min-scale="1" --overwrite
|
|
32539
|
+
|
|
32540
|
+
# Verify the pod stays running
|
|
32541
|
+
kubectl get pods -n plugins -w
|
|
32542
|
+
\`\`\`
|
|
32543
|
+
|
|
32544
|
+
This keeps the pod alive so you can \`kubectl logs\` and \`kubectl exec\` at your leisure.
|
|
32545
|
+
|
|
32546
|
+
**Remember to re-enable scale-to-zero when done** (or just delete the ksvc \u2014 next deployment recreates it):
|
|
32547
|
+
|
|
32548
|
+
\`\`\`bash
|
|
32549
|
+
# Remove the annotation to restore scale-to-zero behavior
|
|
32550
|
+
kubectl annotate ksvc <service-name> -n plugins \\
|
|
32551
|
+
autoscaling.knative.dev/min-scale- --overwrite
|
|
32552
|
+
|
|
32553
|
+
# Or delete the ksvc entirely (clean slate for next deploy)
|
|
32554
|
+
kubectl delete ksvc <service-name> -n plugins
|
|
32555
|
+
\`\`\`
|
|
32556
|
+
|
|
32557
|
+
#### Approach 3: Deploy a log collector pod
|
|
32558
|
+
|
|
32559
|
+
For persistent log capture across multiple test runs, deploy a sidecar-style pod that tails all connector logs:
|
|
32560
|
+
|
|
32561
|
+
\`\`\`bash
|
|
32562
|
+
# Deploy a long-running pod that captures logs from all connector pods
|
|
32563
|
+
kubectl run log-collector -n plugins --image=bitnami/kubectl:latest --restart=Always -- \\
|
|
32564
|
+
sh -c 'while true; do
|
|
32565
|
+
for pod in $(kubectl get pods -n plugins -l serving.knative.dev/service -o name 2>/dev/null); do
|
|
32566
|
+
kubectl logs "$pod" -c user-container --since=10s 2>/dev/null
|
|
32567
|
+
done
|
|
32568
|
+
sleep 5
|
|
32569
|
+
done'
|
|
32570
|
+
|
|
32571
|
+
# Read collected output
|
|
32572
|
+
kubectl logs log-collector -n plugins -f
|
|
32573
|
+
|
|
32574
|
+
# Clean up when done
|
|
32575
|
+
kubectl delete pod log-collector -n plugins
|
|
32576
|
+
\`\`\`
|
|
32577
|
+
|
|
32578
|
+
Alternatively, use \`stern\` (a multi-pod log tailer) if available:
|
|
32579
|
+
|
|
32580
|
+
\`\`\`bash
|
|
32581
|
+
# Install stern: brew install stern (macOS) or go install github.com/stern/stern@latest
|
|
32582
|
+
# Tail all pods in the plugins namespace
|
|
32583
|
+
stern -n plugins -c user-container '.*'
|
|
32584
|
+
\`\`\`
|
|
32585
|
+
|
|
32586
|
+
### Satellite Agent Logs
|
|
32587
|
+
|
|
32588
|
+
The satellite agent logs contain connector invocation events, deploy commands, and error reporting. These are essential when connector pods aren't being created or when discovery completes but results aren't appearing.
|
|
32589
|
+
|
|
32590
|
+
\`\`\`bash
|
|
32591
|
+
# Find the satellite pod
|
|
32592
|
+
kubectl get pods -n satellite
|
|
32593
|
+
|
|
32594
|
+
# Stream satellite logs
|
|
32595
|
+
kubectl logs -f <satellite-pod> -n satellite
|
|
32596
|
+
|
|
32597
|
+
# Key log patterns to watch for:
|
|
32598
|
+
# "processing WebSocket command","command":"req.plugin.invokeWebhook" \u2192 webhook triggered
|
|
32599
|
+
# "processing WebSocket command","command":"req.plugin.deploy" \u2192 deployment triggered
|
|
32600
|
+
# "Credential GetAccessToken: new way" \u2192 satellite reporting results to TLSPC
|
|
32601
|
+
# "error waiting for service to be ready" + "error reply" \u2192 pod failed to start
|
|
32602
|
+
# "encryption key secret invalid content" \u2192 stale secret blocking deploy
|
|
32603
|
+
\`\`\`
|
|
32604
|
+
|
|
32605
|
+
**Key diagnostic**: If the satellite gets an access token after a discovery run but machine identities never appear in the UI, the connector response was accepted by the satellite but rejected by the platform. Check \`GET /v1/machines/{id}/discovery\` for \`errorCount > 0\`.
|
|
32606
|
+
|
|
32607
|
+
### Debugging Discovery Results via API
|
|
32608
|
+
|
|
32609
|
+
\`discoveryStatus: COMPLETED\` does NOT mean certificates were stored. It only means the workflow finished. The platform silently rejects malformed certificates.
|
|
32610
|
+
|
|
32611
|
+
\`\`\`bash
|
|
32612
|
+
# Check discovery results
|
|
32613
|
+
curl -s "https://api.venafi.cloud/v1/machines/{machineId}/discovery" \\
|
|
32614
|
+
-H "tppl-api-key: <key>" | jq .
|
|
32615
|
+
|
|
32616
|
+
# Good result:
|
|
32617
|
+
# {"certificatesCountTotal": 5, "machineIdentitiesCount": 5, "errorCount": 0}
|
|
32618
|
+
|
|
32619
|
+
# Bad result (connector response format issue):
|
|
32620
|
+
# {"certificatesCountTotal": 0, "machineIdentitiesCount": 0, "errorCount": 5}
|
|
32621
|
+
# errorCount > 0 means the platform rejected the discovery response content
|
|
32622
|
+
|
|
32623
|
+
# Check activity logs for specific error messages:
|
|
32624
|
+
curl -s -X POST "https://api.venafi.cloud/v1/activitylogsearch" \\
|
|
32625
|
+
-H "tppl-api-key: <key>" \\
|
|
32626
|
+
-H "Content-Type: application/json" \\
|
|
32627
|
+
-d '{"expression":{"operands":[{"field":"activityType","operator":"MATCH","value":"Discovery"}]},"ordering":{"orders":[{"direction":"DESC","field":"activityDate"}]},"paging":{"pageNumber":0,"pageSize":10}}' | jq .
|
|
32628
|
+
\`\`\`
|
|
32629
|
+
|
|
32630
|
+
### Troubleshooting: Pod Won't Start
|
|
32631
|
+
|
|
32632
|
+
\`\`\`bash
|
|
32633
|
+
# Check pod status and events
|
|
32634
|
+
kubectl get pods -n plugins
|
|
32635
|
+
kubectl describe pod <pod-name> -n plugins
|
|
32636
|
+
|
|
32637
|
+
# ImagePullBackOff \u2014 verify the image can be pulled
|
|
32638
|
+
sudo crictl pull <image-url>
|
|
32639
|
+
|
|
32640
|
+
# If crictl pull fails with redirect/HTML content, clear the cache
|
|
32641
|
+
sudo crictl rmi "<image-url>" 2>/dev/null
|
|
32642
|
+
sudo ctr -n k8s.io images rm "<image-url>" 2>/dev/null
|
|
32643
|
+
|
|
32644
|
+
# ProgressDeadlineExceeded \u2014 Knative revision failed permanently
|
|
32645
|
+
# Recovery: delete the stuck ksvc and retry
|
|
32646
|
+
kubectl delete ksvc <service-name> -n plugins
|
|
32647
|
+
# Then click Test Connection in UI to trigger fresh deployment
|
|
32648
|
+
|
|
32649
|
+
# CrashLoopBackOff \u2014 check previous container logs
|
|
32650
|
+
kubectl logs <pod-name> -n plugins -c user-container --previous
|
|
32651
|
+
\`\`\`
|
|
32652
|
+
|
|
32653
|
+
### Troubleshooting: Satellite Not Deploying
|
|
32654
|
+
|
|
32655
|
+
If Test Connection fails but no connector pods appear:
|
|
32656
|
+
|
|
32657
|
+
\`\`\`bash
|
|
32658
|
+
# 1. Check satellite pod is running
|
|
32659
|
+
kubectl get pods -n satellite
|
|
32660
|
+
|
|
32661
|
+
# 2. Check satellite logs for errors
|
|
32662
|
+
kubectl logs <satellite-pod> -n satellite | tail -50
|
|
32663
|
+
|
|
32664
|
+
# 3. Restart satellite if WebSocket is stale (common after k3s restart)
|
|
32665
|
+
kubectl rollout restart deployment/satellite -n satellite
|
|
32666
|
+
|
|
32667
|
+
# 4. Check for stale secrets blocking deployment
|
|
32668
|
+
kubectl get secrets -n plugins
|
|
32669
|
+
# Delete any stale secret for your connector
|
|
32670
|
+
kubectl delete secret <connector-slug> -n plugins
|
|
32671
|
+
|
|
32672
|
+
# 5. Verify registries.yaml is correct and k3s has been restarted
|
|
32673
|
+
cat /etc/rancher/k3s/registries.yaml
|
|
32674
|
+
\`\`\`
|
|
32675
|
+
|
|
32676
|
+
### Iterating During Development
|
|
32677
|
+
|
|
32678
|
+
The typical edit-build-test cycle during vSatellite testing:
|
|
32679
|
+
|
|
32680
|
+
\`\`\`bash
|
|
32681
|
+
# 1. Make code changes
|
|
32682
|
+
|
|
32683
|
+
# 2. Build and push (single command)
|
|
32684
|
+
make push
|
|
32685
|
+
|
|
32686
|
+
# 3. Generate updated manifests
|
|
32687
|
+
make manifests
|
|
32688
|
+
|
|
32689
|
+
# 4. PATCH the plugin
|
|
32690
|
+
curl -X PATCH "https://api.venafi.cloud/v1/plugins/<id>" \\
|
|
32691
|
+
-H "tppl-api-key: <key>" \\
|
|
32692
|
+
-H "Content-Type: application/json" \\
|
|
32693
|
+
-d @manifest.update.json
|
|
32694
|
+
|
|
32695
|
+
# 5. (Optional) Delete existing pods to force fresh pull
|
|
32696
|
+
kubectl delete pods -n plugins --all
|
|
32697
|
+
|
|
32698
|
+
# 6. Click Test Connection / run Discovery in the UI
|
|
32699
|
+
|
|
32700
|
+
# 7. Watch logs
|
|
32701
|
+
kubectl logs -f <new-pod> -n plugins -c user-container
|
|
32702
|
+
\`\`\`
|
|
32703
|
+
|
|
32704
|
+
**Tip**: If you set \`minScale=1\` (Approach 2 above), you may need to delete the running pod after each push to force it to pull the new image. The running pod continues using the old image until it's terminated.`;
|
|
32408
32705
|
},
|
|
32409
32706
|
deployment: () => DEPLOYMENT,
|
|
32410
32707
|
troubleshooting: () => DEPLOYMENT,
|
|
@@ -32651,9 +32948,109 @@ the correct wrapper via \`jq '{manifest: .}'\`. Never manually construct the PAT
|
|
|
32651
32948
|
The vSatellite uses k3s (lightweight Kubernetes) to run connector pods. Image pulls go through
|
|
32652
32949
|
k3s's containerd runtime, which is configured via \`/etc/rancher/k3s/registries.yaml\`.
|
|
32653
32950
|
|
|
32654
|
-
**You need SSH or console access to the vSatellite host** to configure registry
|
|
32951
|
+
**You need SSH or console access to the vSatellite host** to configure the registry mirror entry.
|
|
32952
|
+
|
|
32953
|
+
## Recommended: Public Container Registry (No Auth Required)
|
|
32954
|
+
|
|
32955
|
+
The simplest and most reliable approach is a **public** container registry. This eliminates auth token management entirely \u2014 the vSatellite can pull images without credentials.
|
|
32956
|
+
|
|
32957
|
+
### AWS ECR Public (\`public.ecr.aws\`) \u2014 Recommended
|
|
32958
|
+
|
|
32959
|
+
- **Free** for public repositories
|
|
32960
|
+
- **No pull authentication** required \u2014 anyone can pull
|
|
32961
|
+
- **Push** requires AWS credentials (dev machine only, not the vSatellite)
|
|
32962
|
+
- **No expiring tokens** to manage on the vSatellite
|
|
32655
32963
|
|
|
32656
|
-
|
|
32964
|
+
\`\`\`bash
|
|
32965
|
+
# One-time: create a public ECR repository (requires AWS CLI + account)
|
|
32966
|
+
aws ecr-public create-repository --repository-name tls-protect-my-connector --region us-east-1
|
|
32967
|
+
|
|
32968
|
+
# Authenticate Docker for pushing (dev machine only)
|
|
32969
|
+
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
|
|
32970
|
+
|
|
32971
|
+
# Build and push
|
|
32972
|
+
export CONTAINER_REGISTRY=public.ecr.aws/<your-alias>
|
|
32973
|
+
make push
|
|
32974
|
+
\`\`\`
|
|
32975
|
+
|
|
32976
|
+
### Other Public Registry Options
|
|
32977
|
+
|
|
32978
|
+
| Registry | Setup | Notes |
|
|
32979
|
+
|---|---|---|
|
|
32980
|
+
| Docker Hub | Create public repo at hub.docker.com | Free, widely supported |
|
|
32981
|
+
| GitHub Container Registry | \`ghcr.io/<user>\` with public packages | Free with GitHub account |
|
|
32982
|
+
| Quay.io | Create public repo at quay.io | Red Hat hosted |
|
|
32983
|
+
|
|
32984
|
+
### Private Registry Options (When Public Isn't Possible)
|
|
32985
|
+
|
|
32986
|
+
If you must use a private registry, you'll need to configure \`/etc/rancher/k3s/registries.yaml\` with credentials. Be aware of token expiry:
|
|
32987
|
+
|
|
32988
|
+
| Registry | Token Lifetime | Notes |
|
|
32989
|
+
|---|---|---|
|
|
32990
|
+
| Docker Hub | Long-lived (PAT) | Simplest private option |
|
|
32991
|
+
| GitHub Container Registry | Long-lived (PAT) | Use \`read:packages\` scope |
|
|
32992
|
+
| AWS ECR (private) | **12 hours** | Requires frequent refresh \u2014 adds operational burden |
|
|
32993
|
+
| Azure ACR | Configurable | Service principal recommended |
|
|
32994
|
+
| JFrog Artifactory | API key/token | Enterprise option |
|
|
32995
|
+
|
|
32996
|
+
## vSatellite registries.yaml Configuration
|
|
32997
|
+
|
|
32998
|
+
### For Public ECR (Recommended)
|
|
32999
|
+
|
|
33000
|
+
Even with a public registry, the vSatellite's default \`registries.yaml\` has a \`"*"\` catch-all mirror that routes ALL image pulls through \`registry.venafi.cloud\`. Your custom image doesn't exist there, so pulls fail silently.
|
|
33001
|
+
|
|
33002
|
+
**Add an explicit entry for \`public.ecr.aws\`:**
|
|
33003
|
+
|
|
33004
|
+
\`\`\`yaml
|
|
33005
|
+
# /etc/rancher/k3s/registries.yaml
|
|
33006
|
+
mirrors:
|
|
33007
|
+
"public.ecr.aws":
|
|
33008
|
+
endpoint:
|
|
33009
|
+
- "https://public.ecr.aws" # YOUR images pull directly (first)
|
|
33010
|
+
- "https://registry.venafi.cloud" # Venafi platform images (fallback)
|
|
33011
|
+
rewrite:
|
|
33012
|
+
"^knative/(.*)": "public/venafi-vsatellite/knative/$1"
|
|
33013
|
+
"^venafi-vsatellite/(.*)": "public/venafi-vsatellite/$1"
|
|
33014
|
+
"^(.*)": "$1" # passthrough \u2014 REQUIRED for k3s to generate certs.d entry
|
|
33015
|
+
# ... keep existing docker.io and "*" entries unchanged
|
|
33016
|
+
\`\`\`
|
|
33017
|
+
|
|
33018
|
+
**Key details:**
|
|
33019
|
+
- \`https://public.ecr.aws\` must be **first** \u2014 k3s tries endpoints in order
|
|
33020
|
+
- The passthrough rewrite \`"^(.*)": "$1"\` is required \u2014 without it, k3s v1.30+ doesn't create \`certs.d/public.ecr.aws/hosts.toml\` and the \`*\` catch-all catches everything
|
|
33021
|
+
- Keep the Venafi rewrite rules so platform images (knative, satellite) still route correctly
|
|
33022
|
+
- No \`configs\` section needed for public registries
|
|
33023
|
+
|
|
33024
|
+
### For Private Registries
|
|
33025
|
+
|
|
33026
|
+
Your registry must appear under BOTH \`mirrors\` and \`configs\`:
|
|
33027
|
+
|
|
33028
|
+
\`\`\`yaml
|
|
33029
|
+
mirrors:
|
|
33030
|
+
"your-registry.example.com":
|
|
33031
|
+
endpoint:
|
|
33032
|
+
- "https://your-registry.example.com"
|
|
33033
|
+
configs:
|
|
33034
|
+
"your-registry.example.com":
|
|
33035
|
+
auth:
|
|
33036
|
+
username: <your-username>
|
|
33037
|
+
password: <your-password-or-token>
|
|
33038
|
+
\`\`\`
|
|
33039
|
+
|
|
33040
|
+
### After Any registries.yaml Change
|
|
33041
|
+
|
|
33042
|
+
\`\`\`bash
|
|
33043
|
+
# Restart k3s to pick up new config
|
|
33044
|
+
sudo systemctl restart k3s
|
|
33045
|
+
|
|
33046
|
+
# Restart satellite pod (k3s restart breaks WebSocket)
|
|
33047
|
+
kubectl rollout restart deployment/satellite -n satellite
|
|
33048
|
+
|
|
33049
|
+
# Verify pull works
|
|
33050
|
+
sudo crictl pull <your-image-url>
|
|
33051
|
+
\`\`\`
|
|
33052
|
+
|
|
33053
|
+
## Pre-Flight Checklist
|
|
32657
33054
|
|
|
32658
33055
|
Before your first \`make push\`, verify these items:
|
|
32659
33056
|
|
|
@@ -32661,19 +33058,18 @@ Before your first \`make push\`, verify these items:
|
|
|
32661
33058
|
- Without this, Docker Buildx wraps images in manifest lists that break containerd
|
|
32662
33059
|
- The MCP Makefile template includes this by default
|
|
32663
33060
|
|
|
32664
|
-
2. **Registry
|
|
33061
|
+
2. **Registry mirror is configured on the vSatellite**
|
|
32665
33062
|
- SSH into the vSatellite and check: \`cat /etc/rancher/k3s/registries.yaml\`
|
|
32666
|
-
- Your registry must
|
|
32667
|
-
-
|
|
33063
|
+
- Your registry must have an explicit mirror entry (not relying on \`*\` catch-all)
|
|
33064
|
+
- For private registries: credentials must be in the \`configs\` section
|
|
32668
33065
|
|
|
32669
|
-
3. **Auth tokens are not expired** (
|
|
32670
|
-
-
|
|
32671
|
-
-
|
|
32672
|
-
- Check your registry's documentation for token lifetime
|
|
33066
|
+
3. **Auth tokens are not expired** (private registries only)
|
|
33067
|
+
- AWS ECR private tokens expire every 12 hours \u2014 avoid if possible
|
|
33068
|
+
- Public registries don't need tokens
|
|
32673
33069
|
|
|
32674
|
-
|
|
33070
|
+
## Acceptance Tests
|
|
32675
33071
|
|
|
32676
|
-
|
|
33072
|
+
### Test 1: Verify Pull Works (Most Important)
|
|
32677
33073
|
|
|
32678
33074
|
\`\`\`bash
|
|
32679
33075
|
# SSH into the vSatellite, then:
|
|
@@ -32682,7 +33078,7 @@ sudo crictl pull <registry>/<repo>:<tag>
|
|
|
32682
33078
|
|
|
32683
33079
|
If this fails, the pod WILL fail with ImagePullBackOff. Fix registry access first.
|
|
32684
33080
|
|
|
32685
|
-
###
|
|
33081
|
+
### Test 2: Verify Image Format
|
|
32686
33082
|
|
|
32687
33083
|
\`\`\`bash
|
|
32688
33084
|
# On your dev machine:
|
|
@@ -32691,7 +33087,7 @@ docker buildx imagetools inspect <registry>/<repo>:<tag>
|
|
|
32691
33087
|
# Bad: manifest list with multiple entries (attestation/provenance present)
|
|
32692
33088
|
\`\`\`
|
|
32693
33089
|
|
|
32694
|
-
|
|
33090
|
+
## Common Failures
|
|
32695
33091
|
|
|
32696
33092
|
| Symptom | Cause | Fix |
|
|
32697
33093
|
|---|---|---|
|
|
@@ -32700,24 +33096,10 @@ docker buildx imagetools inspect <registry>/<repo>:<tag>
|
|
|
32700
33096
|
| \`manifest unknown\` | Tag doesn't exist in registry | Verify with \`docker manifest inspect\` |
|
|
32701
33097
|
| Pod stuck in ImagePullBackOff | Any of the above | Check \`kubectl describe pod\` events |
|
|
32702
33098
|
| Pull routed to wrong endpoint | Missing explicit mirror entry | Add your registry to \`mirrors\` in registries.yaml |
|
|
33099
|
+
| Pull works via crictl but pod fails | Stale cached content | Clear: \`sudo crictl rmi <image>; sudo ctr -n k8s.io images rm <image>\` |
|
|
32703
33100
|
|
|
32704
|
-
|
|
32705
|
-
|
|
32706
|
-
\`\`\`yaml
|
|
32707
|
-
mirrors:
|
|
32708
|
-
"your-registry.example.com":
|
|
32709
|
-
endpoint:
|
|
32710
|
-
- "https://your-registry.example.com"
|
|
32711
|
-
configs:
|
|
32712
|
-
"your-registry.example.com":
|
|
32713
|
-
auth:
|
|
32714
|
-
username: <your-username>
|
|
32715
|
-
password: <your-password-or-token>
|
|
32716
|
-
\`\`\`
|
|
32717
|
-
|
|
32718
|
-
After any change to registries.yaml: \`sudo systemctl restart k3s\`
|
|
32719
|
-
|
|
32720
|
-
For full deployment guide including network access, build process, and troubleshooting, use: get_guidance("deployment")`;
|
|
33101
|
+
For full deployment guide including network access, build process, and troubleshooting, use: get_guidance("deployment")
|
|
33102
|
+
For vSatellite testing workflow including log capture and scale-to-zero management, use: get_guidance("testing")`;
|
|
32721
33103
|
}
|
|
32722
33104
|
};
|
|
32723
33105
|
function getGuidance(args) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "venafi-integration-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "MCP server providing shared knowledge, templates, and tools for building Venafi integrations (connectors and adaptable drivers)",
|
|
5
5
|
"main": "bundle.mjs",
|
|
6
6
|
"type": "module",
|