Fix broken build targets, ld-flags during docker builds, work-tree state during docker builds, etc.#70
Merged
Conversation
… the repository. * Introduce root level `Makefile` to call common targets for all modules. * Deduplicate redundant scripts across the repository, through a centralized `hack` directory. * Introduce more directories that are to be ignored in `.gitignore`. Signed-off-by: Saketh Kalaga <51327242+renormalize@users.noreply.github.com>
* The `make docker-build-<x>` target which used to fail due to not finding the relevant make target inside the build is now fixed. * The `make docker-build-<x>` did not parse the platform from the target correctly and pass it to the `hack/docker-build.sh` script. This is also fixed. * The entire repository is copied into the build layer, as access to the `.git` directory is necessary for `ld-flags`. * The Go base image used for the build step is upgraded to `1.24.2`. * Add `operator/hack/kind/` to `operator/Dockerfile.dockerignore`, as it dirties the work tree in the docker image builds. * The `operator/.dockerignore` file is renamed to `operator/Dockerfile.dockerignore` to solve only the `.dockerignore` present in the root of the context being considered by Docker. This can be circumvented by placing the ignore file in the same directory as the `Dockerfile`, and naming it as `<Dockerfile-name>.dockerignore`. Reference: https://docs.docker.com/build/concepts/context/#filename-and-location. Signed-off-by: Saketh Kalaga <51327242+renormalize@users.noreply.github.com>
Signed-off-by: Saketh Kalaga <51327242+renormalize@users.noreply.github.com>
Signed-off-by: Saketh Kalaga <51327242+renormalize@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR primarily focuses on fixing the build targets in
operator, among other things.Introduce root level
Makefileto call common targets for all modules.Deduplicate redundant scripts across the repository, through a centralized
hackdirectory.Introduce more directories that are to be ignored in
.gitignore.The
make docker-build-<x>target which used to fail due to not finding the relevant make target inside the build is now fixed.The
make docker-build-<x>did not parse the platform from the target correctly and pass it to thehack/docker-build.shscript. This is also fixed.The entire repository is copied into the build layer, as access to the
.gitdirectory is necessary forld-flags.The Go base image used for the build step is upgraded to
1.24.2.Add
operator/hack/kind/tooperator/Dockerfile.dockerignore, as it dirties the work tree in the docker image builds.The
operator/.dockerignorefile is renamed tooperator/Dockerfile.dockerignoreto solve only the.dockerignorepresent in the root of the context being considered by Docker. This can be circumvented by placing the ignore file in the same directory as theDockerfile, and naming it as<Dockerfile-name>.dockerignore.Upgrade to
kindest/node:v1.32.2.Remove unnecessary
extraPortMappingsfor the kind cluster.NOTE: Please squash and merge, as I've made multiple commits for easy commit-by-commit review.