Skip to content

Instantly share code, notes, and snippets.

View bpradipt's full-sized avatar

Pradipta Banerjee bpradipt

View GitHub Profile
@bpradipt
bpradipt / test-pol.yaml
Last active February 27, 2025 17:02
sample pod yaml with policy
---
apiVersion: v1
kind: Pod
metadata:
name: test
labels:
app: test
annotations:
io.katacontainers.config.agent.policy: IyBDb3B5cmlnaHQgKGMpIDIwMjMgTWljcm9zb2Z0IENvcnBvcmF0aW9uCiMKIyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMAojCnBhY2thZ2UgYWdlbnRfcG9saWN5CgppbXBvcnQgZnV0dXJlLmtleXdvcmRzLmluCmltcG9ydCBmdXR1cmUua2V5d29yZHMuZXZlcnkKCiMgRGVmYXVsdCB2YWx1ZXMsIHJldHVybmVkIGJ5IE9QQSB3aGVuIHJ1bGVzIGNhbm5vdCBiZSBldmFsdWF0ZWQgdG8gdHJ1ZS4KZGVmYXVsdCBBZGRBUlBOZWlnaGJvcnNSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgQWRkU3dhcFJlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBDbG9zZVN0ZGluUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENvcHlGaWxlUmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IENyZWF0ZUNvbnRhaW5lclJlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBDcmVhdGVTYW5kYm94UmVxdWVzdCA6PSBmYWxzZQpkZWZhdWx0IERlc3Ryb3lTYW5kYm94UmVxdWVzdCA6PSB0cnVlCmRlZmF1bHQgRXhlY1Byb2Nlc3NSZXF1ZXN0IDo9IGZhbHNlCmRlZmF1bHQgR2V0T09NRXZlbnRSZXF1ZXN0IDo9IHRydWUKZGVmYXVsdCBHdWVzdERldGFpbHNSZXF1ZXN0IDo9IHRydWUKZGVmYXVsdCBMaXN0SW50ZXJmYWNlc1JlcXVlc3QgOj0gZmFsc2UKZGVmYXVsdCBMaXN0Um91dGVzUmVxdWVzdCA6PS
@bpradipt
bpradipt / kata-ds.yaml
Last active December 15, 2023 07:51
Daemonset to replace Kata shim in a CoCo install
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: shim-copy-daemonset
namespace: confidential-containers-system
spec:
selector:
matchLabels:
app: shim-copy
template:
@bpradipt
bpradipt / azure-image-private-job.yaml
Created September 22, 2023 09:59
K8s job manifest to create Azure podvm image on local subnet
apiVersion: batch/v1
kind: Job
metadata:
name: azure-image-creation-priv
namespace: openshift-sandboxed-containers-operator
spec:
parallelism: 1
completions: 1
backoffLimit: 1
template:
@bpradipt
bpradipt / timestamp-command.sh
Created July 11, 2023 15:07
time Dockerfile steps
#!/bin/bash
function timestamp() {
while IFS= read -r 'LINE' ; do
printf "%s %s\n" "$(TZ=GMT-0 date '+%Y-%m-%dT%T.%N' | cut -c1-26)" "$LINE" 1>&2
done
}
"$@" 2>&1 | timestamp
@bpradipt
bpradipt / time-buildah-build.sh
Last active June 29, 2023 14:14 — forked from philpoore/time-docker-build.sh
Generate JSON output of buildah build step timing, useful for profiling
#!/bin/bash
# script: time-buildah-build.sh
#
# All command line arguments are passed to buildah build command.
#
# usage: ./time-buildah-build.sh
#
# Acknowledgement: https://gist.github.com/philpoore/05eca572f3aadf70f529c470ac679147
DATE_FORMAT="+%s"
@bpradipt
bpradipt / ccv0-patch.patch
Last active January 23, 2023 14:16
ccv0 patch for stable-2.5
This file has been truncated, but you can view the full file.
diff --git a/.github/workflows/cargo-deny-runner.yaml b/.github/workflows/cargo-deny-runner.yaml
index 5d6dfeb6c..65237c7be 100644
--- a/.github/workflows/cargo-deny-runner.yaml
+++ b/.github/workflows/cargo-deny-runner.yaml
@@ -1,5 +1,12 @@
name: Cargo Crates Check Runner
-on: [pull_request]
+on:
+ pull_request:
+ types:
@bpradipt
bpradipt / Dockerfile
Created May 23, 2022 12:49
Dockerfile for peer-pods payload
FROM quay.io/confidential-containers/runtime-payload:v0
@bpradipt
bpradipt / ccruntime-peer-pods-containerd-aws.yaml
Last active July 22, 2022 11:45
peer-pods ccruntime yaml
apiVersion: confidentialcontainers.org/v1beta1
kind: CcRuntime
metadata:
name: ccruntime-sample
namespace: confidential-containers-system
spec:
# Add fields here
runtimeName: kata
ccNodeSelector:
matchLabels:
@bpradipt
bpradipt / ocp410-params.yaml
Last active March 17, 2023 11:10
kcli params for deploying OpenShift 4.10
# Cluster domain
domain: test410.com
# Cluster name
cluster: test
# RHCOS image name in the libvirt storage pool
# You can leave it empty for kcli to download and use the release specific image
# image:
imagecontentsources: []
mdns: True
diff --git a/controllers/scc.go b/controllers/scc.go
index f9d490e..c0401fe 100644
--- a/controllers/scc.go
+++ b/controllers/scc.go
@@ -38,6 +38,6 @@ func GetScc() *secv1.SecurityContextConstraints {
},
},
Volumes: []secv1.FSType{secv1.FSTypeAll},
- Users: []string{"system:serviceaccount:openshift-sandboxed-containers-operator:monitor"},
+ //Users: []string{"system:serviceaccount:openshift-sandboxed-containers-operator:monitor"},