mirror of
https://github.com/ION606/argo-temp.git
synced 2026-05-14 20:06:53 +00:00
added initial istio code
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
*.txt
|
||||||
|
*.xml
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: istio-base
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: istio-system
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
chart: base
|
||||||
|
repoURL: https://istio-release.storage.googleapis.com/charts
|
||||||
|
targetRevision: ${ISTIO_VERSION}
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
ignoreDifferences:
|
||||||
|
- group: admissionregistration.k8s.io
|
||||||
|
kind: ValidatingWebhookConfiguration
|
||||||
|
jsonPointers:
|
||||||
|
- /webhooks/0/failurePolicy
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: istio-cni
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: kube-system
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
chart: cni
|
||||||
|
repoURL: https://istio-release.storage.googleapis.com/charts
|
||||||
|
targetRevision: ${ISTIO_VERSION}
|
||||||
|
helm:
|
||||||
|
values: |
|
||||||
|
profile: ambient
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: istiod
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: istio-system
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
chart: istiod
|
||||||
|
repoURL: https://istio-release.storage.googleapis.com/charts
|
||||||
|
targetRevision: ${ISTIO_VERSION}
|
||||||
|
helm:
|
||||||
|
values: |
|
||||||
|
profile: ambient
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
ignoreDifferences:
|
||||||
|
- group: admissionregistration.k8s.io
|
||||||
|
kind: ValidatingWebhookConfiguration
|
||||||
|
jsonPointers:
|
||||||
|
- /webhooks/0/failurePolicy
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: istio-ztunnel
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: istio-system
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
chart: ztunnel
|
||||||
|
repoURL: https://istio-release.storage.googleapis.com/charts
|
||||||
|
targetRevision: ${ISTIO_VERSION}
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
+18
-15
@@ -1,19 +1,22 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: myapp
|
name: myapp
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: myapp
|
app: myapp
|
||||||
replicas: 2
|
replicas: 2
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: myapp
|
app: myapp
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: myapp
|
- name: myapp
|
||||||
image: nanajanashia/argocd-app:1.2
|
image: nanajanashia/argocd-app:1.2
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: ISTIO_VERSION
|
||||||
|
value: "1.22.1"
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# see https://www.solo.io/blog/istio-ambient-argo-cd-kind-15-minutes
|
||||||
|
|
||||||
|
minikube delete
|
||||||
|
|
||||||
|
set -a
|
||||||
|
source .env
|
||||||
|
set +a
|
||||||
|
|
||||||
|
minikube start --driver=docker
|
||||||
|
kubectl create namespace argocd || true
|
||||||
|
|
||||||
|
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.9.5/manifests/install.yaml
|
||||||
|
|
||||||
|
echo "Waiting for Argo CD server pod to be ready..."
|
||||||
|
kubectl wait --namespace argocd --for=condition=Ready pod -l app.kubernetes.io/name=argocd-server --timeout=120s
|
||||||
|
|
||||||
|
kubectl port-forward svc/argocd-server -n argocd 9999:443 &> forward.txt &
|
||||||
|
|
||||||
|
echo "installing Kubernetes Gateway CRDs"
|
||||||
|
kubectl get crd gateways.gateway.networking.k8s.io &> /dev/null || \
|
||||||
|
{ kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v1.0.0" | kubectl apply -f -; }
|
||||||
|
|
||||||
|
echo "Applying Application manifests with ISTIO_VERSION=$ISTIO_VERSION"
|
||||||
|
for f in charts/*.yaml; do
|
||||||
|
echo " -> $f"
|
||||||
|
envsubst < "$f" | kubectl apply -f -
|
||||||
|
done
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 --decode && echo
|
||||||
Reference in New Issue
Block a user