GithubHelp home page GithubHelp logo

gitops-tests's Introduction

gitops-tests

Prerequisite

This setup assumes you have a local kind cluster ready to be used with the configuration below for the Kubernetes API endpoint.

- cluster:
    insecure-skip-tls-verify: true
    server: https://host.docker.internal:<API_SERVER_PORT>
  name: kind-argo-local

Deployment

To deploy ArgoCD with this test setup, you need to configure the correct clusters. We try to simultate multiple clusters using different namespaces and cluster names, all present on the in-cluster.

For the config to work both locally when debugging ArgoCD and in our remote kind cluster (on MacOS), we use host.docker.internal as the Kubernetes Service external name. You will need to update your local /etc/hosts file to add the following:

127.0.0.1 host.docker.internal
127.0.0.1 staging.argocd.svc
127.0.0.1 dev.argocd.svc
127.0.0.1 production-1.argocd.svc
127.0.0.1 production-2.argocd.svc

Once configured, you can update the cluster configuration:

  1. Create the argocd-manager ServiceAccount to allow ArgoCD to manage the fake clusters:

    kubectl apply -n kube-system -f bootstrap/serviceaccounts/argocd-manager.yaml
  2. Get the token that was created for the ServiceAccount:

    kubectl get -n kube-system secret argocd-manager-token -o jsonpath='{.data.token}' | base64 --decode; echo
  3. Make a copy of example.yaml at ./services/argo-cd/base/clusters and rename it to private.yaml.

  4. Update the cluster configuration file private.yaml:

    • Replace <TOKEN> with the result of step 2
    • Replace <CERT_DATA> with the certData in your ~/.kube/config
    • Replace <KEY_DATA> with the keyData in your ~/.kube/config
    • Replace <API_SERVER_PORT> with the port used to reach the API server locally.
      • Can be found in your ~/.kube/config
  5. Deploy argocd to your local cluster:

    kubectl apply -n argocd -f ./services/argo-cd/base/clusters/private.yaml
    kubectl apply -n argocd -k ./services/argo-cd

Bootstrap

At first, the sync-projects application must be applied manually.

Then, the bootstrap can be applied manually.

kubectl apply -n argocd -f bootstrap/sync/sync-projects.yaml
kubectl apply -n argocd -f bootstrap/sync/bootstrap.yaml

gitops-tests's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.