This updates several components in order to switch to scratch images. The move to scratch is to reduce additional OS dependencies and also added ldflags to remove golang debug symbols.
This resulted in a reduction from 96.6MB to 54.9MB for the release image
This also removes all other files except for the operator itself and the ca-certificates.
This is the new image structure
Switched off of golang-alpine image because of issues with alpine images as well as the alpine golang image being experimental. https://hub.docker.com/_/golang declares "This variant is highly experimental, and not officially supported by the Go project" There are several issues with alpine due to musl as well
are some examples. golang:$ver is the supported version
This required some additional changes to fix the e2e tests, mainly replacing the kubectl exec for curl and wget and replacing it with port-forward and using python requests instead. This method does not require curl or wget to be included in the operator image.
since both the image and the k8s manifests reference the user id of 1000:1000, there is no need to pre-create the user or to even have a passwd file in the image, if the user was set to pgo:pgo then this would require the passwd file to be able to map the name to an id.
update kubectl version to match the kind version used for testing
updated e2e tests to automatically build image if it doesn't exist during pipeline tests
This updates several components in order to switch to scratch images. The move to scratch is to reduce additional OS dependencies and also added ldflags to remove golang debug symbols.
This resulted in a reduction from 96.6MB to 54.9MB for the release image
This also removes all other files except for the operator itself and the ca-certificates. This is the new image structure
Switched off of golang-alpine image because of issues with alpine images as well as the alpine golang image being experimental. https://hub.docker.com/_/golang declares "This variant is highly experimental, and not officially supported by the Go project" There are several issues with alpine due to musl as well
are some examples. golang:$ver is the supported version
This required some additional changes to fix the e2e tests, mainly replacing the kubectl exec for curl and wget and replacing it with port-forward and using python requests instead. This method does not require curl or wget to be included in the operator image.
pgo:pgo
then this would require the passwd file to be able to map the name to an id.Ran e2e tests to numerous times to confirm all the changes worked.