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

Merged
merged 3 commits into from
Jan 6, 2025
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
4 changes: 2 additions & 2 deletions .devcontainer/pre-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ set -eux

# install kubernetes
wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
k3d cluster get k3s-default || k3d cluster create --image rancher/k3s:v1.27.3-k3s1 --wait
k3d cluster get k3s-default || k3d cluster create --image rancher/k3s:v1.29.10-k3s1 --wait
k3d kubeconfig merge --kubeconfig-merge-default

# install kubectl
curl -LO https://dl.k8s.io/release/v1.27.3/bin/linux/$(go env GOARCH)/kubectl
curl -LO https://dl.k8s.io/release/v1.29.10/bin/linux/$(go env GOARCH)/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl cluster-info
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,10 @@ install: githooks
kubectl get ns $(KUBE_NAMESPACE) || kubectl create ns $(KUBE_NAMESPACE)
kubectl config set-context --current --namespace=$(KUBE_NAMESPACE)
@echo "installing PROFILE=$(PROFILE)"
kubectl kustomize --load-restrictor=LoadRestrictionsNone test/e2e/manifests/$(PROFILE) | sed 's|quay.io/argoproj/|$(IMAGE_NAMESPACE)/|' | sed 's/namespace: argo/namespace: $(KUBE_NAMESPACE)/' | kubectl -n $(KUBE_NAMESPACE) apply --prune -l app.kubernetes.io/part-of=argo -f -
kubectl kustomize --load-restrictor=LoadRestrictionsNone test/e2e/manifests/$(PROFILE) \
| sed 's|quay.io/argoproj/|$(IMAGE_NAMESPACE)/|' \
| sed 's/namespace: argo/namespace: $(KUBE_NAMESPACE)/' \
| KUBECTL_APPLYSET=true kubectl -n $(KUBE_NAMESPACE) apply --applyset=configmaps/install --server-side --prune -f -
ifeq ($(PROFILE),stress)
kubectl -n $(KUBE_NAMESPACE) apply -f test/stress/massive-workflow.yaml
endif
Expand Down Expand Up @@ -530,7 +533,8 @@ ifeq ($(shell uname),Darwin)
brew tap kitproj/kit --custom-remote https://github.com/kitproj/kit
brew install kit
else
curl -q https://raw.githubusercontent.com/kitproj/kit/main/install.sh | tag=v0.1.8 sh
@echo "Downloading Kit"
curl -fsL --retry 99 "https://github.com/kitproj/kit/releases/download/v0.1.8/kit_0.1.8_$$(uname)_$$(uname -m | sed 's/aarch64/arm64/').tar.gz" | sudo tar -C /usr/local/bin -xzf - kit
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a workaround for CI failures due to a bug introduced in https://raw.githubusercontent.com/kitproj/kit/main/install.sh recently: kitproj/kit@46fe614

endif
endif

Expand Down
5 changes: 0 additions & 5 deletions manifests/base/crds/kustomization.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions manifests/base/kustomization.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion manifests/cluster-install/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../base
- ../base/workflow-controller
- ../base/argo-server
- ./workflow-controller-rbac
- ./argo-server-rbac

Expand Down
10 changes: 10 additions & 0 deletions manifests/components/mysql/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- argo-mysql-config-secret.yaml
- mysql-deployment.yaml
- mysql-service.yaml

patches:
- path: overlays/workflow-controller-configmap.yaml
10 changes: 10 additions & 0 deletions manifests/components/postgres/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- argo-postgres-config-secret.yaml
- postgres-deployment.yaml
- postgres-service.yaml

patches:
- path: overlays/workflow-controller-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

labels:
- includeSelectors: true
pairs:
app.kubernetes.io/part-of: dex
Copy link
Member 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.


resources:
- dex-cm.yaml
- dex-role.yaml
Expand Down
9 changes: 9 additions & 0 deletions manifests/components/sso/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- dex

patches:
- path: overlays/workflow-controller-configmap.yaml
- path: overlays/argo-server-sa.yaml
4 changes: 3 additions & 1 deletion manifests/namespace-install/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../base
- ../base/crds/minimal
- ../base/workflow-controller
- ../base/argo-server
- ./argo-server-rbac
- ./workflow-controller-rbac

Expand Down
1 change: 1 addition & 0 deletions manifests/quick-start/minimal/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Kustomization

resources:
- ../base
- ../../base/crds/minimal

patches:
- path: overlays/workflow-controller-configmap.yaml
8 changes: 3 additions & 5 deletions manifests/quick-start/mysql/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ kind: Kustomization

resources:
- ../base
- argo-mysql-config-secret.yaml
- mysql-deployment.yaml
- mysql-service.yaml
- ../../base/crds/minimal

patches:
- path: overlays/workflow-controller-configmap.yaml
components:
- ../../components/mysql
8 changes: 3 additions & 5 deletions manifests/quick-start/postgres/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ kind: Kustomization

resources:
- ../base
- argo-postgres-config-secret.yaml
- postgres-deployment.yaml
- postgres-service.yaml
- ../../base/crds/minimal

patches:
- path: overlays/workflow-controller-configmap.yaml
components:
- ../../components/postgres
7 changes: 3 additions & 4 deletions manifests/quick-start/sso/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ kind: Kustomization

resources:
- ../base
- dex
- ../../base/crds/minimal

patches:
- path: overlays/workflow-controller-configmap.yaml
- path: overlays/argo-server-sa.yaml
components:
- ../../components/sso
7 changes: 2 additions & 5 deletions test/e2e/manifests/components/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- ../../../../../manifests/base/crds/minimal
- ../../../../../manifests/quick-start/base
- argo-server.service-account-token-secret.yaml

patches:
Expand All @@ -10,8 +12,3 @@ patches:
- path: workflow-controller-deployment.yaml
- path: workflow-controller-cluster-workflow-template-rbac.yaml
- path: minio-deployment.yaml

labels:
- includeSelectors: true
pairs:
app.kubernetes.io/part-of: argo
5 changes: 2 additions & 3 deletions test/e2e/manifests/events/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../../../manifests/quick-start/minimal
- https://raw.githubusercontent.com/argoproj/argo-events/v1.2.0/manifests/install.yaml
- https://raw.githubusercontent.com/argoproj/argo-events/v1.2.0/examples/eventbus/native.yaml
- https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/install.yaml
- https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/eventbus/native.yaml

components:
- ../components/base
Expand Down
1 change: 0 additions & 1 deletion test/e2e/manifests/minimal/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../../../manifests/quick-start/minimal
- https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/base/crds/argoproj.io_eventbus.yaml
- https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/base/crds/argoproj.io_eventsources.yaml
- https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/base/crds/argoproj.io_sensors.yaml
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/manifests/mysql/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../../../manifests/quick-start/mysql
- https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/base/crds/argoproj.io_eventbus.yaml
- https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/base/crds/argoproj.io_eventsources.yaml
- https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/base/crds/argoproj.io_sensors.yaml

components:
- ../components/base
- ../../../../manifests/components/mysql
- ../components/local-argo

namespace: argo
4 changes: 0 additions & 4 deletions test/e2e/manifests/plugins/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@ resources:
- hello-executor-plugin.service-account-token-secret.yaml
- hello-executor-plugin-configmap.yaml

labels:
- includeSelectors: true
pairs:
app.kubernetes.io/part-of: argo
namespace: argo
2 changes: 1 addition & 1 deletion test/e2e/manifests/postgres/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../../../manifests/quick-start/postgres
- https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/base/crds/argoproj.io_eventbus.yaml
- https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/base/crds/argoproj.io_eventsources.yaml
- https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/base/crds/argoproj.io_sensors.yaml

components:
- ../components/base
- ../../../../manifests/components/postgres
- ../components/local-argo

namespace: argo
1 change: 0 additions & 1 deletion test/e2e/manifests/prometheus/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../../../manifests/quick-start/minimal
- ../../../../manifests/quick-start/base/prometheus

components:
Expand Down
4 changes: 1 addition & 3 deletions test/e2e/manifests/sso/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../../../manifests/quick-start/sso

components:
- ../components/base
- ../../../../manifests/components/sso
- ../components/local-argo

namespace: argo
7 changes: 1 addition & 6 deletions test/e2e/manifests/stress/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,4 @@ patches:
- path: workflow-controller-configmap.yaml
- path: workflow-controller-deployment.yaml
- path: argo-server-deployment.yaml
- path: minio-deployment.yaml

labels:
- includeSelectors: true
pairs:
app.kubernetes.io/part-of: argo
- path: minio-deployment.yaml
Loading