Skip to content

Commit 438cf00

Browse files
committed
fix: update container base images and Kyverno v3 policy configuration
This commit addresses GLIBC compatibility issues and corrects Kyverno Cosign v3 policy configuration for proper image signature verification. Container Updates: - Upgrade gkm-agent and gkm-operator base images from Ubuntu 22.04 to 24.04 to resolve GLIBC 2.38 compatibility issues - Update ROCm repository URL from 'jammy' to 'noble' for Ubuntu 24.04 - Fixes gkm-agent CrashLoopBackOff caused by GLIBC version mismatch Kyverno Policy Updates: - Fix Cosign v3 policy issuer: use GitHub Actions token issuer (https://token.actions.githubusercontent.com) instead of OAuth issuer - Replace specific subject email with regex pattern to match any GitHub workflow (subjectRegExp: "https://github.com/.*") - Aligns with actual signatures generated by GitHub Actions workflows Documentation Updates: - Add new Documentation section to main README with links to config docs - Document gkm.io/signature-format label usage (cosign-v2 and cosign-v3) - Add example showing how to use signature format labels - Update Kyverno v3 policy documentation with correct issuer/subject - Add links to Kyverno and webhook configuration READMEs Example Updates: - Update example files to use correct signature format labels - Ensure consistency across namespace and cluster examples These changes enable successful verification of Cosign v3 bundle format signatures and resolve runtime issues in KIND deployments. Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>
1 parent b35f8ec commit 438cf00

File tree

9 files changed

+51
-17
lines changed

9 files changed

+51
-17
lines changed

Containerfile.gkm-agent

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ COPY Makefile Makefile
3131
RUN make build-gkm-agent
3232

3333
# Use a minimal Ubuntu base image that supports CGO binaries
34-
FROM public.ecr.aws/docker/library/ubuntu:22.04
34+
FROM public.ecr.aws/docker/library/ubuntu:24.04
3535

3636
# Copy the binary from the builder
3737
COPY --from=builder /workspace/bin/gkm-agent /agent
@@ -65,7 +65,7 @@ ARG OPT_ROCM_VERSION=7.0.1
6565

6666
# Conditionally install ROCm packages based on NO_GPU flag
6767
RUN if [ "$NO_GPU" = "false" ]; then \
68-
wget https://repo.radeon.com/amdgpu-install/${ROCM_VERSION}/ubuntu/jammy/amdgpu-install_${AMDGPU_VERSION}-1_all.deb && \
68+
wget https://repo.radeon.com/amdgpu-install/${ROCM_VERSION}/ubuntu/noble/amdgpu-install_${AMDGPU_VERSION}-1_all.deb && \
6969
apt install -y ./*.deb && \
7070
apt update && DEBIAN_FRONTEND=noninteractive apt install -y amd-smi-lib rocm-smi-lib && \
7171
apt-get clean && rm -rf /var/lib/apt/lists/* && \

Containerfile.gkm-operator

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ COPY Makefile Makefile
3232
RUN make build-gkm-operator
3333

3434
# Use a minimal Ubuntu base image that supports CGO binaries
35-
FROM public.ecr.aws/docker/library/ubuntu:22.04
35+
FROM public.ecr.aws/docker/library/ubuntu:24.04
3636

3737
# Copy the binary from the builder
3838
COPY --from=builder /workspace/bin/gkm-operator /operator

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,40 @@ users.
387387
<!-- markdownlint-enable MD013 -->
388388
<!-- markdownlint-enable MD033 -->
389389

390+
## Documentation
391+
392+
### Configuration
393+
394+
- [Kyverno Integration](config/kyverno/README.md) - Image signature verification with Kyverno
395+
- [Webhook Configuration](config/webhook/README.md) - GKM webhook configuration details
396+
397+
### Image Signature Verification
398+
399+
GKM supports image signature verification using Kyverno for namespace-scoped `GKMCache` resources. Use the `gkm.io/signature-format` label to specify the signature format:
400+
401+
- **`gkm.io/signature-format: cosign-v2`** - For images signed with Cosign v2 (legacy `.sig` tag format)
402+
- **`gkm.io/signature-format: cosign-v3`** - For images signed with Cosign v3 (OCI 1.1 bundle format)
403+
404+
Example:
405+
406+
```yaml
407+
apiVersion: gkm.io/v1alpha1
408+
kind: GKMCache
409+
metadata:
410+
name: my-cache
411+
namespace: my-namespace
412+
labels:
413+
gkm.io/signature-format: cosign-v3 # Use cosign-v3 for bundle format
414+
spec:
415+
image: quay.io/example/my-image:tag
416+
```
417+
418+
For detailed information about image verification, see:
419+
- [Kyverno Image Verification Guide](docs/examples/kyverno-image-verification.md)
420+
- [Kyverno Policies Documentation](docs/examples/kyverno-policies.md)
421+
422+
**Note:** `ClusterGKMCache` resources have built-in signature verification and automatically detect both Cosign v2 and v3 formats without requiring labels.
423+
390424
## Contributing
391425

392426
// TODO(user): Add detailed information on how you would like others to

config/kyverno/policies/gkmcache-policy-v3.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
- count: 1
2929
entries:
3030
- keyless:
31-
issuer: https://github.com/login/oauth
32-
subject: mtahhan@redhat.com
31+
issuer: https://token.actions.githubusercontent.com
32+
subjectRegExp: "https://github.com/.*"
3333
rekor:
3434
url: https://rekor.sigstore.dev

docs/examples/kyverno-image-verification.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ spec:
219219
- count: 1
220220
entries:
221221
- keyless:
222-
issuer: https://github.com/login/oauth
223-
subject: mtahhan@redhat.com
222+
issuer: https://token.actions.githubusercontent.com
223+
subjectRegExp: "https://github.com/.*"
224224
rekor:
225225
url: https://rekor.sigstore.dev
226226
```
@@ -230,8 +230,8 @@ spec:
230230
- **selector**: Matches resources with label
231231
`gkm.io/signature-format: cosign-v3`
232232
- **type**: `SigstoreBundle` for bundle format
233-
- **issuer**: GitHub OAuth token issuer (different from Actions)
234-
- **subject**: Specific user email for keyless signing
233+
- **issuer**: GitHub Actions OIDC token issuer (same as v2)
234+
- **subjectRegExp**: Matches any GitHub repository workflow
235235

236236
## How It Works
237237

examples/cluster/11-clustergkmcache.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
apiVersion: gkm.io/v1alpha1
33
kind: ClusterGKMCache
44
metadata:
5-
name: vector-add-cache-rocm
5+
name: vector-add-cache-rocm-v2
66
spec:
7-
image: quay.io/gkm/cache-examples:vector-add-cache-rocm
7+
image: quay.io/gkm/cache-examples:vector-add-cache-rocm-v2

examples/cluster/12-clustergkmcache-cosign-v3.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
apiVersion: gkm.io/v1alpha1
33
kind: ClusterGKMCache
44
metadata:
5-
name: vllm-flash-attention
5+
name: vector-add-cache-rocm-v3
66
spec:
7-
image: quay.io/mtahhan/vllm-flash-attention:rocm
7+
image: quay.io/gkm/cache-examples:vector-add-cache-rocm

examples/namespace/11-gkmcache.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
apiVersion: gkm.io/v1alpha1
33
kind: GKMCache
44
metadata:
5-
name: vector-add-cache-rocm-1
5+
name: vector-add-cache-rocm-v2
66
namespace: gkm-test-ns-scoped-1
77
labels:
88
gkm.io/signature-format: cosign-v2
99
spec:
10-
image: quay.io/gkm/cache-examples:vector-add-cache-rocm
10+
image: quay.io/gkm/cache-examples:vector-add-cache-rocm-v2

examples/namespace/12-gkmcache-cosign-v3.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
apiVersion: gkm.io/v1alpha1
33
kind: GKMCache
44
metadata:
5-
name: vllm-flash-attention-1
5+
name: vector-add-cache-rocm-v3
66
namespace: gkm-test-ns-scoped-1
77
labels:
88
gkm.io/signature-format: cosign-v3
99
spec:
10-
image: quay.io/mtahhan/vllm-flash-attention:rocm
10+
image: quay.io/gkm/cache-examples:vector-add-cache-rocm

0 commit comments

Comments
 (0)