diff --git a/argo-cd/deployments/deployments.yaml b/argo-cd/deployments/deployments.yaml index 8e2dd7f..1bca906 100644 --- a/argo-cd/deployments/deployments.yaml +++ b/argo-cd/deployments/deployments.yaml @@ -4,7 +4,7 @@ metadata: name: fast-api-deployment namespace: test-ns spec: - replicas: 1 + replicas: 3 selector: matchLabels: app: python-app diff --git a/argo-cd/install.sh b/argo-cd/install.sh index 52634e1..5fcfe6a 100644 --- a/argo-cd/install.sh +++ b/argo-cd/install.sh @@ -15,20 +15,20 @@ echo "You're also going to need the pw - find it using the cli by running \nargo echo "Or you can find it by decoding the secret \n kubectl get secret argocd-initial-admin-secret -n argocd --template={{.data.password}} | base64 -D" -echo "argo workflows" -kubectl apply -n argo -f https://github.com/argoproj/argo-workflows/releases/download/v3.5.5/install.yaml -kubectl patch deployment \ - argo-server \ - --namespace argo \ - --type='json' \ - -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args", "value": [ - "server", - "--auth-mode=server" -]}]' - - -echo "argo events" -kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/install.yaml -kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/install-validating-webhook.yaml -kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/eventbus/native.yaml +# echo "argo workflows" +# kubectl apply -n argo -f https://github.com/argoproj/argo-workflows/releases/download/v3.5.5/install.yaml +# kubectl patch deployment \ +# argo-server \ +# --namespace argo \ +# --type='json' \ +# -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args", "value": [ +# "server", +# "--auth-mode=server" +# ]}]' + + +# echo "argo events" +# kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/install.yaml +# kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/install-validating-webhook.yaml +# kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/eventbus/native.yaml diff --git a/argo-cd/pr-generator.yaml b/argo-cd/pr-generator.yaml index 7796ccb..b0eea77 100644 --- a/argo-cd/pr-generator.yaml +++ b/argo-cd/pr-generator.yaml @@ -23,11 +23,11 @@ spec: # appSecretName: github-app-repo-creds # Labels is used to filter the PRs that you want to target. (optional) labels: - - pr-test - requeueAfterSeconds: 10 + - preview + requeueAfterSeconds: 15 template: metadata: - name: "myapp-{{branch}}-{{number}}" + name: "pr-generated-{{branch}}-{{number}}" namespace: argocd spec: source: @@ -46,5 +46,3 @@ spec: selfHeal: true syncOptions: - CreateNamespace=true - - ApplyOutOfSyncOnly=true - - ServerSideApply=true diff --git a/argo-cd/vcluster.yaml b/argo-cd/vcluster.yaml deleted file mode 100644 index 8b705a6..0000000 --- a/argo-cd/vcluster.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 -kind: VCluster -metadata: - name: vcluster-example -spec: - kubernetesVersion: "1.28.3" - # kubernetesImage: "${KUBERNETES_IMAGE:=null}" - # virtualClusterVersion: "${VCLUSTER_VERSION:=}" - # helmRelease: - # values: "${HELM_VALUES:=}" - # chart: - # name: ${CHART_NAME:=null} - # repo: ${CHART_REPO:=null} - # controlPlaneEndpoint: - # host: ${VCLUSTER_HOST:=""} - # port: ${VCLUSTER_PORT:=0} diff --git a/vclusters/apps/vcluster-generator/values.yaml b/vclusters/apps/vcluster-generator/values.yaml index 8e2c554..a223931 100644 --- a/vclusters/apps/vcluster-generator/values.yaml +++ b/vclusters/apps/vcluster-generator/values.yaml @@ -1,4 +1,4 @@ -cluster_name: "" +cluster_name: "test-cluster-name" chart_name: "null" # chart_name: "vcluster-k8s" chart_repo: "null" diff --git a/vclusters/argocd/pr-applicationset.yaml b/vclusters/argocd/pr-applicationset.yaml index c252281..1da5309 100644 --- a/vclusters/argocd/pr-applicationset.yaml +++ b/vclusters/argocd/pr-applicationset.yaml @@ -18,19 +18,20 @@ spec: # key: token labels: - pr-test + requeueAfterSeconds: 10 template: metadata: name: "pr-demo--{{branch}}--pr-{{number}}" spec: source: repoURL: "https://github.com/philiplee13/k8s-learning.git" - targetRevision: "HEAD" - path: basic-deployments - helm: - parameters: - - name: cluster_name - value: demo-pr-{{number}} - project: vcluster + targetRevision: "{{head_sha}}" + path: vclusters/apps/vcluster-generator + # helm: + # parameters: + # - name: cluster_name + # value: demo-pr-{{number}} + project: default destination: name: in-cluster namespace: vcluster