Skip to content

Commit

Permalink
OKE arm64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Inbaraj-S committed Oct 9, 2023
1 parent 36327ca commit d0672c1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: amd64
platforms: arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
#

ARG goos=linux
ARG goarch=arm64
ARG osimage=oraclelinux:8-slim

# For open source
FROM golang:1.19-alpine as builder

Expand All @@ -18,10 +22,10 @@ COPY . ./
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
#RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod vendor -a -o dist/onic ./main.go
RUN CGO_ENABLED=0 GOOS=${goos} GOARCH=${goarch} GO111MODULE=on go build -mod vendor -a -o dist/onic ./main.go

# For Open source
FROM oraclelinux:7-slim
FROM $osimage

LABEL author="OKE Foundations Team"

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ version:

# Currently only supports amd
build: ./main.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod vendor -a -o dist/onic ./main.go
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) GO111MODULE=on go build -mod vendor -a -o dist/onic ./main.go

image:
docker build -t ${IMAGE_PATH} -f Dockerfile .
docker build --build-arg goos=$(GOOS) --build-arg goarch=$(GOARCH) -t ${IMAGE_PATH} -f Dockerfile .

push:
docker push ${IMAGE_PATH}
Expand Down
4 changes: 2 additions & 2 deletions helm/oci-native-ingress-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

controller_class: oci.oraclecloud.com/native-ingress-controller
lease_lock_name: oci-native-ingress-controller
compartment_id: ""
subnet_id: ""
compartment_id: "ocid1.compartment.oc1..aaaaaaaah7ygqjvbptfjcuwct2pzrwumc4mrgijtf557zdyjfjm6cjh6cddq"
subnet_id: "ocid1.subnet.oc1.phx.aaaaaaaabhyaaemonaxva2zoezl3yn2gdff6gutdovs3comudrr6xrtgiuya"

deploymentNamespace : native-ingress-controller-system
replicaCount: 1
Expand Down

0 comments on commit d0672c1

Please sign in to comment.