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

cleanup: remove installers and post-compile cleanup #5445

Merged
merged 4 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions build-aux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ COPY --from=envoy /usr/local/bin/envoy-static-stripped /usr/local/bin/envoy
ENV KUBECONFIG=/buildroot/kubeconfig.yaml

# XXX: this will go away
RUN mkdir -p /ambassador/sidecars && \
ln -s /buildroot/ambassador/python/post_update.py /ambassador/post_update.py && \
ln -s /buildroot/ambassador/python/watch_hook.py /ambassador/watch_hook.py
RUN mkdir -p /ambassador/sidecars

RUN adduser dw --disabled-password
# SUDO_USERS HOSTS=(AS_USER) TAGS COMMANDS
Expand Down Expand Up @@ -103,9 +101,7 @@ ADD post-compile.sh post-compile.sh
RUN bash post-compile.sh

# XXX: this will go away
RUN mkdir -p /ambassador/sidecars && \
ln -s /buildroot/ambassador/python/post_update.py /ambassador/post_update.py && \
ln -s /buildroot/ambassador/python/watch_hook.py /ambassador/watch_hook.py
RUN mkdir -p /ambassador/sidecars

# These will be extracted into the optimized image later
ADD manifests/emissary/emissary-crds.yaml.in manifests/emissary/emissary-crds.yaml
Expand All @@ -127,10 +123,6 @@ RUN apk --no-cache add bash curl python3=${py_version} libcap htop
RUN apk upgrade --no-cache
COPY --from=artifacts /usr/lib/libyaml* /usr/lib/

# Other installers
COPY --from=artifacts /opt/image-build /opt/image-build
RUN /opt/image-build/install.sh

# External Python packages we use
COPY --from=artifacts /usr/lib/python3.11/site-packages /usr/lib/python3.11/site-packages

Expand Down
20 changes: 0 additions & 20 deletions build-aux/install.sh

This file was deleted.

10 changes: 0 additions & 10 deletions build-aux/installers/README.md

This file was deleted.

202 changes: 0 additions & 202 deletions cmd/k8sregistryctl/main.go

This file was deleted.

16 changes: 0 additions & 16 deletions post-compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ set -e

busyprograms=(
kubestatus
watt
apiext
)
sudo install -D -t /opt/ambassador/bin/ /buildroot/bin/busyambassador
Expand All @@ -17,18 +16,3 @@ for busyprogram in "${busyprograms[@]}"; do
done

sudo install /buildroot/bin/capabilities_wrapper /opt/ambassador/bin/wrapper

# Copy installer support into /opt/image-build to be run at docker build for the
# production image. Then run the installers for the builder container.
# Note: When this (ambassador's) post-compile runs, it always runs first, and
# every other post-compile runs as well. So this is the place to recreate the
# /opt/image-build tree from scratch so the builder container stays valid.
sudo rm -rf /opt/image-build
sudo install -D -t /opt/image-build /buildroot/ambassador/build-aux/install.sh
sudo cp -a /buildroot/ambassador/build-aux/installers /opt/image-build/
sudo /opt/image-build/install.sh

# run any extra, local post-compile task
if [ -f post-compile.local.sh ] ; then
bash post-compile.local.sh
fi
1 change: 0 additions & 1 deletion python/ambassador/fetch/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ def handle_consul_service(self, consul_rkey: str, consul_object: AnyDict) -> Non
# services and endpoints together (as it should!!).
#
# Note that we currently trust the association ID to contain the datacenter name.
# That's a function of the watch_hook putting it there.

normalized_endpoints: Dict[str, List[Dict[str, Any]]] = {}

Expand Down
6 changes: 0 additions & 6 deletions python/ambassador/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,10 +859,6 @@ def still_needed(self, resource: "IRResource", secret_name: str, namespace: str)
still_needed: remember that a given secret is still needed, so that we can tell watt to
keep paying attention to it.

The default implementation doesn't do much of anything, because it assumes that we're
not running in the watch_hook, so watt has already been told everything it needs to be
told. This should be OK for everything that's not the watch_hook.

:param resource: referencing resource
:param secret_name: name of the secret
:param namespace: namespace of the secret
Expand All @@ -879,8 +875,6 @@ def cache_secret(self, resource: "IRResource", secret_info: SecretInfo) -> Saved
cache_secret: stash the SecretInfo from load_secret into Ambassador’s internal cache,
so that we don’t have to call load_secret again if we need it again.

The default implementation should be usable by everything that's not the watch_hook.

:param resource: referencing resource
:param secret_info: SecretInfo returned from load_secret
:return: SavedSecret
Expand Down
Loading
Loading