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

build: BPFMAN_IMG & BPFMAN_AGENT_IMG to overwrite image #18

Merged
merged 1 commit into from
Jun 5, 2024

Commits on Jun 3, 2024

  1. build: BPFMAN_IMG & BPFMAN_AGENT_IMG to overwrite image

    The bpfman-operator is setup to allow BPFMAN_IMG to overwrite the
    default bpfman image, and BPFMAN_AGENT_IMG to overwrite the bpfman-agent
    image. However, the Makefile is leveraging kustomize. kustomize can
    replace an image string in a yaml when it knows the k8s object layout,
    but these images are passed via a ConfigMap, which is opaque data. So
    the current implementation doesn't work. kustomize does have a
    ConfigMapGenrator, which can replace the contents of a ConfigMap.
    
    The change is to:
    * Change the kustomization.yaml to use a `configMapGenerator`.
    * Use `sed` to replace the default images with those passed in (or just
      the default image if none were passed in). The `kustomize edit set
      image` command doesn't work.  The `sed` command is changing the file
      content, so rename kustomization.yaml to kustomization.yaml.env and
      piped the changes to kustomization.yaml.
    * Add kustomization.yaml to .gitignore so changes aren't tracked by git.
    
    Signed-off-by: Billy McFall <22157057+Billy99@users.noreply.github.com>
    Billy99 committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    aa19fa7 View commit details
    Browse the repository at this point in the history