Skip to content

Commit

Permalink
Merge pull request #124 from cybozu-go/migrate-to-ghcr
Browse files Browse the repository at this point in the history
Migrate to ghcr.io
  • Loading branch information
zoetrope authored Jan 25, 2024
2 parents 858e41c + 11309f3 commit 5961d80
Show file tree
Hide file tree
Showing 57 changed files with 75 additions and 88 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: quay.io Login
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Setup go
uses: actions/setup-go@v3
with:
Expand Down
7 changes: 0 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ builds:
- -X github.com/cybozu-go/pod-security-admission.Version={{.Version}}
dockers:
- image_templates:
- "quay.io/cybozu/{{.ProjectName}}:{{ .Version }}-amd64"
- "ghcr.io/cybozu-go/{{.ProjectName}}:{{ .Version }}-amd64"
use: buildx
dockerfile: Dockerfile
Expand All @@ -25,12 +24,6 @@ dockers:
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
docker_manifests:
- name_template: "quay.io/cybozu/{{.ProjectName}}:{{ .Version }}"
image_templates:
- "quay.io/cybozu/{{.ProjectName}}:{{ .Version }}-amd64"
- name_template: "quay.io/cybozu/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}"
image_templates:
- "quay.io/cybozu/{{.ProjectName}}:{{ .Version }}-amd64"
- name_template: "ghcr.io/cybozu-go/{{.ProjectName}}:{{ .Version }}"
image_templates:
- "ghcr.io/cybozu-go/{{.ProjectName}}:{{ .Version }}-amd64"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ https://github.com/kubernetes/kubectl/issues/1108
Docker images
-------------

Docker images are available on [Quay.io](https://quay.io/repository/cybozu/pod-security-admission)
Docker images are available on [ghcr.io](https://github.com/cybozu-go/pod-security-admission/pkgs/container/pod-security-admission)

License
-------
Expand Down
2 changes: 1 addition & 1 deletion charts/pod-security-admission/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ controllerManager:
containerSecurityContext:
allowPrivilegeEscalation: false
image:
repository: quay.io/cybozu/pod-security-admission
repository: ghcr.io/cybozu-go/pod-security-admission
tag: app-version-placeholder
imagePullPolicy: IfNotPresent
resources:
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resources:
images:
- name: pod-security-admission
newTag: 0.6.1
newName: quay.io/cybozu/pod-security-admission
newName: ghcr.io/cybozu-go/pod-security-admission

generatorOptions:
disableNameSuffixHash: true
Expand Down
24 changes: 12 additions & 12 deletions hooks/ephemeral_container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ metadata:
spec:
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
securityContext:
runAsNonRoot: true
`
Expand Down Expand Up @@ -58,7 +58,7 @@ spec:
Entry("Valid Ephemeral Container", "restricted", "test-simple-ec", corev1.EphemeralContainer{
EphemeralContainerCommon: corev1.EphemeralContainerCommon{
Name: "debug",
Image: "quay.io/cybozu/ubuntu-debug",
Image: "ghcr.io/cybozu/ubuntu-debug",
SecurityContext: &corev1.SecurityContext{
RunAsNonRoot: ptr.To(true),
},
Expand All @@ -67,7 +67,7 @@ spec:
Entry("Privileged Ephemeral Container", "baseline", "test-privileged-ec", corev1.EphemeralContainer{
EphemeralContainerCommon: corev1.EphemeralContainerCommon{
Name: "debug",
Image: "quay.io/cybozu/ubuntu-debug",
Image: "ghcr.io/cybozu/ubuntu-debug",
SecurityContext: &corev1.SecurityContext{
RunAsNonRoot: ptr.To(true),
Privileged: ptr.To(true),
Expand All @@ -77,7 +77,7 @@ spec:
Entry("AllowPrivilegeEscalation Ephemeral Container", "restricted", "test-allow-privilege-escalation-ec", corev1.EphemeralContainer{
EphemeralContainerCommon: corev1.EphemeralContainerCommon{
Name: "debug",
Image: "quay.io/cybozu/ubuntu-debug",
Image: "ghcr.io/cybozu/ubuntu-debug",
SecurityContext: &corev1.SecurityContext{
RunAsNonRoot: ptr.To(true),
AllowPrivilegeEscalation: ptr.To(true),
Expand All @@ -87,7 +87,7 @@ spec:
Entry("RootGroup Ephemeral Container", "restricted", "test-root-group-ec", corev1.EphemeralContainer{
EphemeralContainerCommon: corev1.EphemeralContainerCommon{
Name: "debug",
Image: "quay.io/cybozu/ubuntu-debug",
Image: "ghcr.io/cybozu/ubuntu-debug",
SecurityContext: &corev1.SecurityContext{
RunAsNonRoot: ptr.To(true),
RunAsGroup: ptr.To[int64](0),
Expand All @@ -100,7 +100,7 @@ spec:
Entry("RunAsRoot Ephemeral Container", "restricted", "test-run-as-root-ec", corev1.EphemeralContainer{
EphemeralContainerCommon: corev1.EphemeralContainerCommon{
Name: "debug",
Image: "quay.io/cybozu/ubuntu-debug",
Image: "ghcr.io/cybozu/ubuntu-debug",
SecurityContext: &corev1.SecurityContext{
RunAsNonRoot: pointer.Bool(false),
},
Expand All @@ -110,7 +110,7 @@ spec:
Entry("UnsafeCapability Ephemeral Container", "restricted", "test-unsafe-capability-ec", corev1.EphemeralContainer{
EphemeralContainerCommon: corev1.EphemeralContainerCommon{
Name: "debug",
Image: "quay.io/cybozu/ubuntu-debug",
Image: "ghcr.io/cybozu/ubuntu-debug",
SecurityContext: &corev1.SecurityContext{
RunAsNonRoot: ptr.To(true),
Capabilities: &corev1.Capabilities{
Expand All @@ -124,7 +124,7 @@ spec:
Entry("UnsafeProcMount Ephemeral Container", "restricted", "test-unsafe-procmount-ec", corev1.EphemeralContainer{
EphemeralContainerCommon: corev1.EphemeralContainerCommon{
Name: "debug",
Image: "quay.io/cybozu/ubuntu-debug",
Image: "ghcr.io/cybozu/ubuntu-debug",
SecurityContext: &corev1.SecurityContext{
RunAsNonRoot: ptr.To(true),
ProcMount: &unmasked,
Expand All @@ -134,7 +134,7 @@ spec:
Entry("UnsafeSeccomp Ephemeral Container", "restricted", "test-unsafe-seccomp-ec", corev1.EphemeralContainer{
EphemeralContainerCommon: corev1.EphemeralContainerCommon{
Name: "debug",
Image: "quay.io/cybozu/ubuntu-debug",
Image: "ghcr.io/cybozu/ubuntu-debug",
SecurityContext: &corev1.SecurityContext{
RunAsNonRoot: ptr.To(true),
SeccompProfile: &corev1.SeccompProfile{
Expand All @@ -147,7 +147,7 @@ spec:
Entry("UnsafeSELinux Ephemeral Container", "restricted", "test-unsafe-selinux-ec", corev1.EphemeralContainer{
EphemeralContainerCommon: corev1.EphemeralContainerCommon{
Name: "debug",
Image: "quay.io/cybozu/ubuntu-debug",
Image: "ghcr.io/cybozu/ubuntu-debug",
SecurityContext: &corev1.SecurityContext{
RunAsNonRoot: ptr.To(true),
SELinuxOptions: &corev1.SELinuxOptions{
Expand All @@ -171,7 +171,7 @@ spec:
spec:
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
securityContext:
runAsNonRoot: true
`
Expand All @@ -189,7 +189,7 @@ spec:
ec := corev1.EphemeralContainer{
EphemeralContainerCommon: corev1.EphemeralContainerCommon{
Name: "debug",
Image: "quay.io/cybozu/ubuntu-debug",
Image: "ghcr.io/cybozu/ubuntu-debug",
},
}
pod.Spec.EphemeralContainers = append(pod.Spec.EphemeralContainers, ec)
Expand Down
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/additional-capability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
securityContext:
capabilities:
add:
Expand Down
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/host-ports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
ports:
- containerPort: 8080
hostPort: 65500
Expand Down
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/noncore-volume1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
volumes:
- name: nfs
nfs:
Expand Down
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/noncore-volume2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
volumes:
- name: config
configMap:
Expand Down
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/privilege-escalation1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
securityContext:
allowPrivilegeEscalation: true
4 changes: 2 additions & 2 deletions hooks/testdata/baseline/privilege-escalation2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
initContainers:
- name: debug
image: quay.io/cybozu/ubuntu-debug
image: ghcr.io/cybozu/ubuntu-debug
securityContext:
allowPrivilegeEscalation: true
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/root-group1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ spec:
runAsGroup: 0
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/root-group2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ spec:
- 0
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/root-group3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ spec:
fsGroup: 0
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/root-group4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
securityContext:
runAsGroup: 0
4 changes: 2 additions & 2 deletions hooks/testdata/baseline/root-group5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
initContainers:
- name: debug
image: quay.io/cybozu/ubuntu-debug
image: ghcr.io/cybozu/ubuntu-debug
securityContext:
runAsGroup: 0
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/run-as-root1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ spec:
runAsNonRoot: false
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/run-as-root2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ spec:
runAsUser: 0
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/run-as-root3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ metadata:
spec:
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/run-as-root4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ metadata:
spec:
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
securityContext:
runAsNonRoot: false
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/run-as-root5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
securityContext:
runAsUser: 0
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/seccomp1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ spec:
localhostProfile: profiles/audit.json
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
2 changes: 1 addition & 1 deletion hooks/testdata/baseline/seccomp2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
securityContext:
seccompProfile:
type: "Localhost"
Expand Down
4 changes: 2 additions & 2 deletions hooks/testdata/baseline/seccomp3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
initContainers:
- name: debug
image: quay.io/cybozu/ubuntu-debug
image: ghcr.io/cybozu/ubuntu-debug
securityContext:
seccompProfile:
type: "Localhost"
Expand Down
2 changes: 1 addition & 1 deletion hooks/testdata/hostpath/host-path3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
volumes:
- name: host
hostPath:
Expand Down
2 changes: 1 addition & 1 deletion hooks/testdata/hostpath/host-path4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
volumes:
- name: host
hostPath:
Expand Down
2 changes: 1 addition & 1 deletion hooks/testdata/mutating/run-as-root1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ spec:
runAsNonRoot: false
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
2 changes: 1 addition & 1 deletion hooks/testdata/privileged/apparmor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
4 changes: 2 additions & 2 deletions hooks/testdata/privileged/capability1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
initContainers:
- name: debug
image: quay.io/cybozu/ubuntu-debug
image: ghcr.io/cybozu/ubuntu-debug
securityContext:
capabilities:
drop:
Expand Down
2 changes: 1 addition & 1 deletion hooks/testdata/privileged/capability2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
securityContext:
capabilities:
add:
Expand Down
2 changes: 1 addition & 1 deletion hooks/testdata/privileged/host-ipc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
hostIPC: true
2 changes: 1 addition & 1 deletion hooks/testdata/privileged/host-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
hostNetwork: true
2 changes: 1 addition & 1 deletion hooks/testdata/privileged/host-path.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
runAsNonRoot: true
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu
image: ghcr.io/cybozu/ubuntu
volumes:
- name: host
hostPath:
Expand Down
Loading

0 comments on commit 5961d80

Please sign in to comment.