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: minor upgrades/refactoring to support full CRDs #14048

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MasonM
Copy link
Contributor

@MasonM MasonM commented Jan 3, 2025

Motivation

This was split off from #14044 to make it easier to review. This makes a few minor improvements to the build to support those changes.

Modifications

  1. Update devcontainer to install k3s 1.29.10, since that's what we use in CI:
    install_k3s_version: v1.29.10+k3s1
    1.27 is EOL and doesn't support things like validation rules in CRDs.
  2. Update make install to use server-side apply, which is meant to replace client-side apply and isn't affected by size limitations for the CRDs. Since kubectl apply --server-side isn't compatible with kubectl apply --prune, I had to switch to apply sets, which is intended to replace allow list pruning, and seems to work just as well.
  3. Minor refactoring of the manifests under manifests/ to use Kustomize Components so that we can share code with the the manifests under test/e2e/manifests without duplication. See test: deduplicate test manifests and fix "stress" profile #14001 for more details on this approach.

Verification

Built devcontainer locally and ran tests

This was split off from
argoproj#14044 to make it easier
to review. This makes a few minor improvements to the build to support
the full CRD fixes:
1. Update devcontainer to install k3s 1.29.10, since that's what we use
   in CI: https://github.com/argoproj/argo-workflows/blob/ef41f83f801a6ff48c87f882a6b75d0e37529134/.github/workflows/ci-build.yaml#L263
   1.27 is EOL and doesn't support things like validation rules in CRDs.
2. Update `make install` to use [server-side
   apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/),
   which is meant to replace client-side apply and isn't affected by
   size limitations for the CRDs. Since `kubectl apply --server-side`
   isn't compatible with `kubectl apply --prune`, I had to switch to
   [apply
   sets](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune),
   which is intended to replace allow list pruning, and seems to work
   just as wlel.
3. Minor refactoring of the manifests under `manifests/` to use
   [Kustomize
   Components](https://kubectl.docs.kubernetes.io/guides/config_management/components/)
   so that we can share code with the the manifests under
   `test/e2e/manifests` without duplication. See argoproj#14001 for more details
   on this approach.

Signed-off-by: Mason Malone <[email protected]>
@MasonM
Copy link
Contributor Author

MasonM commented Jan 3, 2025

/retest

@MasonM MasonM marked this pull request as ready for review January 3, 2025 02:09
@MasonM MasonM added area/build Build or GithubAction/CI issues area/manifests labels Jan 3, 2025
@MasonM MasonM changed the title build: minor refactoring to support full CRDs build: minor upgrades/refactoring to support full CRDs Jan 3, 2025
labels:
- includeSelectors: true
pairs:
app.kubernetes.io/part-of: dex
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need to add this anymore since apply-set pruning automatically adds the appropriate label (source):

With ApplySet-based pruning, kubectl adds the applyset.kubernetes.io/part-of= label to each object in the set before they are sent to the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Build or GithubAction/CI issues area/manifests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant