An open API service indexing awesome lists of open source software.

https://github.com/redhat-developer/gitops-repo-example


https://github.com/redhat-developer/gitops-repo-example

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# Sample GitOps Repo

## Introduction

The given sample GitOps repo is an indication of the capability of the GitOps tool, the given repo structure constituting the entire GitOps configuration can be created by running a couple of day-1 and day-2 commands. A high level structure of the GitOps repo constitutes the config, environments folder and the pipelines.yaml file. This git repo is generated by [kam](https://github.com/redhat-developer/kam) CLI tool. It is for illustration purposes only. To create your GitOps repository, use `kam` CLI instead.

#### Important Note:

This repository cannot be applied to the cluster since the sealed secrets are encrypted with the private key in the cluster at the time the repository was created.

### Pipelines.yaml

```yaml
config:
argocd:
namespace: openshift-gitops
pipelines:
name: cicd
environments:
- apps:
- name: app-taxi
services:
- name: taxi
pipelines:
integration:
bindings:
- dev-app-taxi-taxi-binding
- github-push-binding
source_url: https://github.com//taxi.git
webhook:
secret:
name: webhook-secret-dev-taxi
namespace: cicd
name: dev
pipelines:
integration:
bindings:
- github-push-binding
template: app-ci-template
- apps:
- name: app-bus
services:
- name: bus
pipelines:
integration:
bindings:
- stage-app-bus-bus-binding
- github-push-binding
source_url: https://github.com//bus.git
webhook:
secret:
name: webhook-secret-stage-bus
namespace: cicd
name: stage
pipelines:
integration:
bindings:
- github-push-binding
template: app-ci-template
gitops_url: https://github.com//gitops.git
version: 1
```

The pipelines.yaml is a representation of the current directory structure, it throws light on the essential bits of the GitOps repo. The current GitOps repo structure can be broken down based on the pipelines.yaml file.

### High level directory structure

```
├── config
│ ├── argocd
│ │ ├── argo-app.yaml
│ │ ├── cicd-app.yaml
│ │ ├── dev-app-taxi-app.yaml
│ │ ├── dev-env-app.yaml
│ │ ├── kustomization.yaml
│ │ ├── stage-app-bus-app.yaml
│ │ └── stage-env-app.yaml
│ └── cicd
│ ├── base
│ │ ├── 01-namespaces
│ │ │ └── cicd-environment.yaml
│ │ ├── 02-rolebindings
│ │ │ ├── argocd-admin.yaml
│ │ │ ├── internal-registry-cicd-binding.yaml
│ │ │ ├── pipeline-service-account.yaml
│ │ │ ├── pipeline-service-rolebinding.yaml
│ │ │ ├── pipeline-service-role.yaml
│ │ │ └── sealed-secrets-aggregate-to-admin.yaml
│ │ ├── 03-secrets
│ │ │ ├── docker-config.yaml
│ │ │ ├── git-host-basic-auth-token.yaml
│ │ │ ├── gitops-webhook-secret.yaml
│ │ │ ├── webhook-secret-dev-taxi.yaml
│ │ │ └── webhook-secret-stage-bus.yaml
│ │ ├── 04-tasks
│ │ │ └── deploy-from-source-task.yaml
│ │ ├── 05-pipelines
│ │ │ ├── app-ci-pipeline.yaml
│ │ │ └── ci-dryrun-from-push-pipeline.yaml
│ │ ├── 06-bindings
│ │ │ ├── dev-app-taxi-taxi-binding.yaml
│ │ │ ├── github-push-binding.yaml
│ │ │ └── stage-app-bus-bus-binding.yaml
│ │ ├── 07-templates
│ │ │ ├── app-ci-build-from-push-template.yaml
│ │ │ └── ci-dryrun-from-push-template.yaml
│ │ ├── 08-eventlisteners
│ │ │ └── cicd-event-listener.yaml
│ │ ├── 09-routes
│ │ │ └── gitops-webhook-event-listener.yaml
│ │ └── kustomization.yaml
│ └── overlays
│ └── kustomization.yaml
├── environments
│ ├── dev
│ │ ├── apps
│ │ │ └── app-taxi
│ │ │ ├── base
│ │ │ │ └── kustomization.yaml
│ │ │ ├── kustomization.yaml
│ │ │ ├── overlays
│ │ │ │ └── kustomization.yaml
│ │ │ └── services
│ │ │ └── taxi
│ │ │ ├── base
│ │ │ │ ├── config
│ │ │ │ │ ├── 100-deployment.yaml
│ │ │ │ │ ├── 200-service.yaml
│ │ │ │ │ ├── 300-route.yaml
│ │ │ │ │ └── kustomization.yaml
│ │ │ │ └── kustomization.yaml
│ │ │ ├── kustomization.yaml
│ │ │ └── overlays
│ │ │ └── kustomization.yaml
│ │ └── env
│ │ ├── base
│ │ │ ├── argocd-admin.yaml
│ │ │ ├── dev-environment.yaml
│ │ │ ├── dev-rolebinding.yaml
│ │ │ └── kustomization.yaml
│ │ └── overlays
│ │ └── kustomization.yaml
│ └── stage
│ ├── apps
│ │ └── app-bus
│ │ ├── base
│ │ │ └── kustomization.yaml
│ │ ├── kustomization.yaml
│ │ ├── overlays
│ │ │ └── kustomization.yaml
│ │ └── services
│ │ └── bus
│ │ ├── base
│ │ │ ├── config
│ │ │ └── kustomization.yaml
│ │ ├── kustomization.yaml
│ │ └── overlays
│ │ └── kustomization.yaml
│ └── env
│ ├── base
│ │ ├── argocd-admin.yaml
│ │ ├── kustomization.yaml
│ │ ├── stage-environment.yaml
│ │ └── stage-rolebinding.yaml
│ └── overlays
│ └── kustomization.yaml
└── pipelines.yaml
```