Skip to content

aenix-io/cozystack-gitops-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cozystack GitOps repo example

This repo is created to show how to configure Cozystack platform using GitOps approach

FluxCD Configuration

To use this repo with FluxCD you need to configure GitRepo in Cozystack:

apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: infra-main
  namespace: tenant-root
spec:
  url: https://github.com/aenix-io/cozystack-gitops-example
  ref:
    branch: main
  interval: 1m0s
  timeout: 60s
  #secretRef:
  #  name: infra-main

Optionally you can specify token for accessing this repo from private Gitlab repository:

apiVersion: v1
metadata:
  name: infra-main
  namespace: tenant-root
stringData:
  password: token-string-here123
  username: pat
kind: Secret

Kustomize resource for every cluster:

apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: infra-main-cluster1
  namespace: tenant-root
spec:
  force: false
  interval: 10m0s
  path: ./clusters/cluster1
  prune: true
  sourceRef:
    kind: GitRepository
    name: infra-main

Check configuration

# kubectl get gitrepositories  -n tenant-root
NAME         URL                                                    AGE   READY   STATUS
infra-main   https://github.com/aenix-io/cozystack-gitops-example   21s   True    stored artifact for revision 'main@sha1:c413c728b036996164278957e7f93a3276076f42'

# kubectl get kustomizations -n tenant-root
NAME                  AGE   READY   STATUS
infra-main-cluster1   13s   False   GitRepository.source.toolkit.fluxcd.io "main" not found

# kubectl get helmreleases -n tenant-root
NAME                      AGE     READY   STATUS
tenant-example            7h27m   True    Helm install succeeded for release tenant-root/tenant-example.v1 with chart [email protected]
tenant-example-services   7h27m   True    Helm upgrade succeeded for release tenant-root/tenant-example-services.v15 with chart [email protected]+a9b790b5ffe2

# kubectl get helmreleases -n tenant-example
NAME                                 AGE     READY   STATUS
clickhouse-service                   6h50m   True    Helm install succeeded for release tenant-example/clickhouse-service.v1 with chart [email protected]
kafka-service                        6h50m   True    Helm upgrade succeeded for release tenant-example/kafka-service.v2 with chart [email protected]
kubernetes-service                   6h34m   True    Helm upgrade succeeded for release tenant-example/kubernetes-service.v2 with chart [email protected]
kubernetes-service-cert-manager      6h34m   True    Helm install succeeded for release cozy-cert-manager/cert-manager.v1 with chart [email protected]
kubernetes-service-cilium            6h34m   True    Helm install succeeded for release cozy-cilium/cilium.v1 with chart [email protected]
kubernetes-service-copy-secrets      5h59m   True    Helm upgrade succeeded for release default/default-kubernetes-service-copy-secrets.v5 with chart [email protected]+a9b790b5ffe2
kubernetes-service-csi               6h34m   True    Helm install succeeded for release cozy-csi/csi.v1 with chart [email protected]
kubernetes-service-fluxcd            6h34m   True    Helm install succeeded for release cozy-fluxcd/fluxcd.v1 with chart [email protected]
kubernetes-service-fluxcd-operator   6h34m   True    Helm install succeeded for release cozy-fluxcd/fluxcd-operator.v1 with chart [email protected]
postgres-service                     6h50m   True    Helm upgrade succeeded for release tenant-example/postgres-service.v2 with chart [email protected]
rabbitmq-service                     6h50m   True    Helm install succeeded for release tenant-example/rabbitmq-service.v1 with chart [email protected]

ArgoCD Configuration

TODO

About

How to configure Cozystack using GitOps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published