Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dropgz to use azure-ipam release #1588

Merged
merged 9 commits into from
Sep 13, 2022
Merged

Conversation

camrynl
Copy link
Contributor

@camrynl camrynl commented Sep 8, 2022

Reason for Change:

cni.Dockerfile is currently building local versions of azure-ipam, updating to use the new release.

Issue Fixed:

Requirements:

Notes:

WORKDIR /azure-ipam
COPY ./azure-ipam .
RUN CGO_ENABLED=0 go build -a -o bin/azure-ipam -trimpath -ldflags "-X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" .
RUN curl -LO https://github.com/Azure/azure-container-networking/releases/download/azure-ipam%2Fv0.0.2/azure-ipam-$OS-$ARCH-v0.0.2.tgz && tar -xvf azure-ipam-$OS-$ARCH-v0.0.2.tgz

FROM mcr.microsoft.com/oss/go/microsoft/golang:1.19 AS azure-vnet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are not doing Go compiling, these probably don't need to be FROM a Go base image anymore.
We could create an intermediate mariner image with tar:

FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 as tar
tdnf install -y tar

then change the azure-ipam/azure-vnet images to

FROM tar AS azure-ipam
...

Copy link
Contributor

@rbtr rbtr Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while I was checking the docs for that, I noticed that it's possible to use external images directly without making them in to intermediate images...so we can remove line 1 entirely, and change the cilium copy line to:

COPY --from=mcr.microsoft.com/oss/cilium/cilium:1.12.1.1 /opt/cni/bin/cilium-cni pkg/embed/fs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running into issues after creating the mariner image -- curl for azure-ipam/azure-vnet is now failing with:

curl: (60) SSL certificate problem: unable to get local issuer certificate

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably need to install ca-certificates

Copy link
Member

@tamilmani1989 tamilmani1989 Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@camrynl lets also remove cilium image from dropgz since cilium cni going to be installed by cilium agent

Copy link
Member

@tamilmani1989 tamilmani1989 Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@camrynl are we using same dockerfile for e2e pipeline as well.? If so, this wouldn't test PR branch azure-ipam version right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tamilmani1989 yes this is used in the e2e pipeline to make the image, and the tests are using the tagged version of dropgz and cns

Copy link
Member

@tamilmani1989 tamilmani1989 Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in that case we should use separate dockerfile for e2e pipeline so that it uses PR branch version(locally built version) instead of officially release version of azure-ipam or cns

@camrynl camrynl changed the title Update dropgz to use azure-ipam/v0.0.2 Update dropgz to use azure-ipam release Sep 9, 2022
@camrynl camrynl requested a review from rbtr September 12, 2022 18:19
@camrynl camrynl merged commit 57304a4 into Azure:master Sep 13, 2022
@camrynl camrynl deleted the cniInstaller branch September 13, 2022 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants