Skip to content

Commit

Permalink
feat: replace ACR and MCR with GHCR (#45)
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Baker <[email protected]>
  • Loading branch information
rbtr authored Mar 14, 2024
1 parent 456c54c commit 7b4b5a1
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions controller/Dockerfile.controller
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG builderImage="acnpublic.azurecr.io/retina-builder:0.0.1"
ARG toolsImage="acnpublic.azurecr.io/retina-tools:0.0.1"
ARG builderImage="ghcr.io/microsoft/retina/retina-builder:0.0.1"
ARG toolsImage="ghcr.io/microsoft/retina/retina-tools:0.0.1"

# Stage: Build binary
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS builder
Expand Down
10 changes: 5 additions & 5 deletions deploy/manifests/controller/helm/retina/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ os:

operator:
enabled: false
repository: mcr.microsoft.com/containernetworking/retina-operator
tag: "v0.1.3"
repository: ghcr.io/microsoft/retina/retina-operator
tag: "v0.0.1-pre"
installCRDs: true
enableRetinaEndpoint: false
capture:
debug: "true"
jobNumLimit: 0

image:
repository: mcr.microsoft.com/containernetworking/retina-agent
initRepository: mcr.microsoft.com/containernetworking/retina-init
repository: ghcr.io/microsoft/retina/retina-agent
initRepository: ghcr.io/microsoft/retina/retina-init
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.1.3"
tag: "v0.0.1-pre"

enablePodLevel: false
remoteContext: false
Expand Down
4 changes: 2 additions & 2 deletions docs/captures/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ Blob-upload requires a Blob Shared Access Signature with the write permission to

### Debug mode

With debug mode, when `--debug` is specified, we can overwrite the capture job Pod image from the default official `MCR` one.
With debug mode, when `--debug` is specified, we can overwrite the capture job Pod image from the default official `GHCR` one.

#### Examples

- use `acnpublic` ACR in default debug mode
- use `ghcr.io` image in default debug mode

`kubectl retina capture create --host-path /mnt/test --namespace capture --node-selectors "kubernetes.io/os=linux" --debug`

Expand Down
2 changes: 1 addition & 1 deletion docs/troubleshooting/capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ kubectl get pod -n <capture namespace> --seletor job-name=<capture job name>

## Capture Pod ImagePullBackOff

By default, kubectl retina plugin will eventually create Capture Pods from the [MCR](https://mcr.microsoft.com/) image with the same version as the kubectl plugin. If the kubectl plugin is built from a local environment, the MCR image cannot be found. Check [capture CLI Debug Mode](../captures/cli.md#Debug_mode) for local development and testing.
By default, kubectl retina plugin will eventually create Capture Pods from the [GHCR](https://github.com/microsoft/retina) image with the same version as the kubectl plugin. If the kubectl plugin is built from a local environment, the GHCR image cannot be found. Check [capture CLI Debug Mode](../captures/cli.md#Debug_mode) for local development and testing.

## Windows node allows only one capture job running at one time

Expand Down
6 changes: 3 additions & 3 deletions hack/tools/kapinger/manifests/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
topologyKey: "kubernetes.io/hostname"
containers:
- name: kapinger
image: acnpublic.azurecr.io/kapinger:latest
image: ghcr.io/microsoft/retina/kapinger:latest
resources:
limits:
memory: 20Mi
Expand Down Expand Up @@ -119,7 +119,7 @@ spec:
topologyKey: "kubernetes.io/hostname"
containers:
- name: kapinger
image: acnpublic.azurecr.io/kapinger:windows-ltsc2022-amd64-v35
image: ghcr.io/microsoft/retina/kapinger:windows-ltsc2022-amd64-v35
env:
- name: TARGET_TYPE
value: "service"
Expand Down Expand Up @@ -173,7 +173,7 @@ spec:
topologyKey: "kubernetes.io/hostname"
containers:
- name: kapinger
image: acnpublic.azurecr.io/kapinger:latest
image: ghcr.io/microsoft/retina/kapinger:latest
resources:
limits:
memory: 20Mi
Expand Down
4 changes: 2 additions & 2 deletions pkg/capture/constants/job_specification.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const (
CaptureOutputLocationBlobUploadSecretKey string = "blob-upload-url"

// CaptureWorkloadImageName defines the official capture workload image repo and image name
CaptureWorkloadImageName string = "mcr.microsoft.com/containernetworking/retina-agent"
CaptureWorkloadImageName string = "ghcr.io/microsoft/retina/retina-agent"

// DebugCaptureWorkloadImageName defines the capture workload image for testing and debugging
DebugCaptureWorkloadImageName string = "acnpublic.azurecr.io/retina-agent"
DebugCaptureWorkloadImageName string = "ghcr.io/microsoft/retina/retina-agent"
)
2 changes: 1 addition & 1 deletion pkg/capture/crd_to_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
)

const (
retinaAgentImageForTest = "acnpublic.azurecr.io/retina-agent:v0.0.6-52-g07caaaf"
retinaAgentImageForTest = "ghcr.io/microsoft/retina/retina-agent:v0.0.1-pre"
apiServerURL = "https://retina-test-c4528d-zn0ugsna.hcp.southeastasia.azmk8s.io:443"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/capture/utils/capture_image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestCaptureWorkloadImage(t *testing.T) {
env: map[string]string{},
sourceVersion: "v1.0.0",
versionSource: VersionSourceCLIVersion,
expectedImage: "mcr.microsoft.com/containernetworking/retina-agent:v1.0.0",
expectedImage: "ghcr.io/microsoft/retina/retina-agent:v1.0.0",
},
{
name: "Debug mode: image determined by CLI version",
Expand All @@ -35,7 +35,7 @@ func TestCaptureWorkloadImage(t *testing.T) {
sourceVersion: "v1.0.0",
versionSource: VersionSourceCLIVersion,

expectedImage: "acnpublic.azurecr.io/retina-agent:v1.0.0",
expectedImage: "ghcr.io/microsoft/retina/retina-agent:v1.0.0",
},
{
name: "Debug mode: image determined by environment variable RETINA_AGENT_IMAGE",
Expand Down
2 changes: 1 addition & 1 deletion scripts/windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ function retina-image {
if ($null -eq $env:TAG) { $env:TAG = $args[0] }
docker build `
-f .\Dockerfile.windows `
-t acnpublic.azurecr.io/retina-agent:$env:TAG `
-t ghcr.io/microsoft/retina/retina-agent:$env:TAG `
.
}
4 changes: 2 additions & 2 deletions test/goldpinger/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
fieldPath: status.podIP
# - name: HOSTS_TO_RESOLVE
# value: "1.1.1.1 8.8.8.8 www.bing.com"
image: acnpublic.azurecr.io/goldpinger:v2.0.2
image: docker.io/bloomberg/goldpinger:v3.9.0
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
Expand Down Expand Up @@ -166,7 +166,7 @@ spec:
fieldPath: status.podIP
# - name: HOSTS_TO_RESOLVE
# value: "1.1.1.1 8.8.8.8 www.bing.com"
image: "acnpublic.azurecr.io/goldpinger-win:v2.0.2"
image: "docker.io/bloomberg/goldpinger:v3.9.0"
command: ["\\goldpinger.exe"]
ports:
- containerPort: 7070
Expand Down
2 changes: 1 addition & 1 deletion test/goldpinger/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
fieldPath: status.podIP
- name: HOSTS_TO_RESOLVE
value: "1.1.1.1 8.8.8.8 www.bing.com"
image: "mcr.microsoft.com/aks/e2e/bloomberg-goldpinger:v3.7.0"
image: "docker.io/bloomberg/goldpinger:v3.9.0"
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
Expand Down
2 changes: 1 addition & 1 deletion test/integration/capture/capture_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var _ = Describe("Capture flag tests", func() {
// by user.
if retinaAgentImagePreset := os.Getenv("RETINA_AGENT_IMAGE"); len(retinaAgentImagePreset) == 0 {
retinaVersion := assertExecCommandOutput("kubectl", "retina", "version")
retinaAgentImage := fmt.Sprintf("acnpublic.azurecr.io/retina-agent:%s", strings.TrimSpace(retinaVersion))
retinaAgentImage := fmt.Sprintf("ghcr.io/microsoft/retina/retina-agent:%s", strings.TrimSpace(retinaVersion))
os.Setenv("RETINA_AGENT_IMAGE", retinaAgentImage)
unsetRetinaAgentEnv = true
}
Expand Down
2 changes: 1 addition & 1 deletion test/scale/example-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
image: "mcr.microsoft.com/aks/e2e/bloomberg-goldpinger:v3.7.0"
image: "docker.io/bloomberg/goldpinger:v3.9.0"
imagePullPolicy: Always
securityContext:
allowPrivilegeEscalation: false
Expand Down
4 changes: 2 additions & 2 deletions test/trafficgen/kapinger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
serviceAccountName: kapinger-sa
containers:
- name: kapinger
image: acnpublic.azurecr.io/kapinger:latest
image: ghcr.io/microsoft/retina/kapinger:latest
resources:
limits:
memory: 20Mi
Expand Down Expand Up @@ -92,7 +92,7 @@ spec:
serviceAccountName: kapinger-sa
containers:
- name: kapinger
image: acnpublic.azurecr.io/kapinger:latest
image: ghcr.io/microsoft/retina/kapinger:latest
resources:
limits:
memory: 20Mi
Expand Down
2 changes: 1 addition & 1 deletion windows/manifests/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
hostNetwork: true
containers:
- name: retinawin
image: mcr.microsoft.com/containernetworking/retina-agent:v0.0.6
image: ghcr.io/microsoft/retina/retina-agent:v0.0.1-pre
ports:
- containerPort: 10093
command:
Expand Down

0 comments on commit 7b4b5a1

Please sign in to comment.