Skip to content

Commit

Permalink
Merge branch 'main' of github.com:kubefirst/gitops-catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
johndietz committed Sep 16, 2023
2 parents 471affa + 77acf14 commit 57e22a7
Show file tree
Hide file tree
Showing 26 changed files with 483 additions and 53 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/check-signed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Validate if commits in PR are signed
on: pull_request

jobs:
signed-commits-check:
runs-on: ubuntu-latest
steps:

- name: Check out code
uses: actions/[email protected]

- name: Check signed commits in PR
uses: 1Password/check-signed-commits-action@v1
19 changes: 19 additions & 0 deletions .github/workflows/check-yaml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: YAML Validation
on: [push, workflow_dispatch]

jobs:
yaml-check:
runs-on: ubuntu-latest
steps:

- name: Checkout this repository
uses: actions/[email protected]

- name: Lint YAML files
uses: karancode/[email protected]
with:
yamllint_config_datapath: .yamllint.yml
yamllint_strict: true
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 7 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
extends: default

rules:
line-length: disable
truthy:
check-keys: false
76 changes: 65 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,75 @@
# gitops-catalog
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="img/kubefirst-light.svg" alt="Kubefirst Logo">
<img alt="" src="img/kubefirst.svg">
</picture>
</p>

The marketplace bound to your gitops desired state.
# Community-driven Cloud Native GitOps

## Community-driven Cloud Native Gitops

The kubefirst gitops catalog repository is a community-driven series of cloud native apps that can be added onto the kubefirst platform easily once the platform has been provisioned.
The kubefirst GitOps Catalog repository is a community-driven series of cloud native apps that can be added onto the kubefirst platform easily once the platform has been provisioned.

## Contributing

To make a new app available for installation, you'll need to:
To make a new application available for installation, you'll need to:

- Fork this repository.
- Create a new directory with your new app's name in your fork.
- Update [index.yaml](index.yaml) with your app's name and directory.
- In your app directory, add, and organize your Argo CD gitops file(s).
- Add a new entry to the [index.yaml](index.yaml) file with:
- **name**: application name as described in your YAML file.
- **displayName**: name to be displayed in the GitOps catalog (120 characters maximum).
- **website**: application website or GitHub repository.
- **imageUrl**: full web URL for the application's logo. It will be displayed in the GitOps catalog. _For now, it needs to be located on a third-party server, but we'll update this field to grab them from the GitHub repository soon, so it doesn't depend on external URL._
- **description**: an insightful description about your application. It will be displayed in the GitOps Catalog (200 characters maximum).
- **categories**: one category amongts the following ones:
- App management
- Architecture
- CI/CD
- Database
- FinOps
- Infrastructure
- Monitoring
- Observability
- Security
- Storage
- Testing
- Create a new directory with your new application's name in your fork.
- Add, and organize your Argo CD gitops file(s) into it, if any.
- Create a pull request with the changes from your branch to our main branch.

## Need help
### Acceptance Criteria

We will approve all GitOps Catalog application submissions as long as they are working with the latest version of kubefirst.

### Application Maintenance and Removal

We may remove an application from the GitOps Catalog with no notice if a severe vulnerability is discovered. Another reason for removing an application is if an application becomes abandoned or unmaintained by the upstream project.

### Testing

If you want to test the application you are adding to the catalog, you need to run a couple of things locally.

Firstly, if it's not already done, you need to [create a fork](https://github.com/kubefirst/kubefirst-api/fork) of the gitops-catalog repository.

Secondly, you need to clone the [Kubefirst API](https://github.com/kubefirst/kubefirst-api/) repository locally, and edit the file `internal/gitShim/gitopsCatalog.go`:

1. Update the `KubefirstGitHubOrganization` constant with the organization or username on which you forked the gitops-catalog repository.
2. Update the `KubefirstGitopsCatalogRepository` constant if you change the repository name when you forked it into your account.

Once it's done, follow [the instructions from the README](https://github.com/kubefirst/kubefirst-api/#running-locally) to run the API locally.

Thirdly, you will also need to run the [console application](https://github.com/kubefirst/console) locally. To do so, clone the repository locally, and follow [the instructions from the README](https://github.com/kubefirst/console#setup-instructions). It will be the equivalent of using the CLI with the `launch up` command.

Lastly, you will need to create a new cluster like you would usually do, using the UI installation. Once your new cluster is created, you'll see the [GitOps Catalog](https://docs.kubefirst.io/civo/gitops-catalog) tab, and you should see your new application listed, and try to install it.

#### Debugging

If you need to refresh the GitOps catalog list of applications, instead of restarting the whole process, which can be cumbersome with the creation of a new cluster, you can connect to the MongoDB instance (using their [CLI](https://www.mongodb.com/docs/mongodb-shell/connect/) or [UI client](https://www.mongodb.com/docs/compass/current/connect/)), delete the `gitops-catalog` collection from the `api` database, and restart the API. You can now refresh the console browser tab, and you should see a new list. If you use the CLI, you can run `echo 'use api;\ndb.getCollection("gitops-catalog").drop();' | mongosh mongodb://<username>:<password>@<hostname>:<port>` in the terminal after replacing the `<username>`, `<password>`, `<hostname>`, and `<port>` with your database connection information.

If you already installed the application, to reinstall it another time without restarting the whole process, you'll need to follow these two steps:

1. Go into your `gitops` repository, the one created when you created your cluster from the console application. In the repository, go into the `registry` folder, followed by going into the folder named after your cluster name. You will need to delete the application YAML file inside this directory. Check also inside the `components` folder: if there is a folder with the name of the application you want to remove, delete it also. Once your changes are committed, Argo CD should sync, and remove the application. This is the usual process for removing an application from your cluster, GitOps catalog or not.
2. To be able to see the application as installable again in the catalog, you will need to update the `services` collection within the `api` database in MongoDB. You will need to remove the specific object associated with the application from the `services` array. If you use the CLI, you can run `echo 'use api;\ndb.services.updateOne({'cluster_name': "<clustername>" }, { $pull: { services: { name: "<appname>" } } } );' | mongosh mongodb://<username>:<password>@<hostname>:<port>` in the terminal after, as before, replacing the `<username>`, `<password>`, `<hostname>`, and `<port>` with your database connection information. You will also need to update the `<clustername>` with the name of the cluster you created, and the `<appname>` value in the query, with the name of the application to remove from the document.

### Need Help

As always, we are on our [Slack community](https://kubefirst.io/slack) if you need any help. We also welcome any constructive feedback or feature suggestions.
As always, we are on our [Slack community](https://kubefirst.io/slack) in the #gitops-catalog channel if you need any help. We also welcome any constructive feedback or feature suggestions.
5 changes: 3 additions & 2 deletions argo-events/application.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argo-events
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: argo-events
Expand All @@ -23,4 +24,4 @@ spec:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- CreateNamespace=true
5 changes: 3 additions & 2 deletions argo-rollouts/application.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argo-rollouts
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: argo-rollouts
Expand All @@ -23,4 +24,4 @@ spec:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- CreateNamespace=true
5 changes: 3 additions & 2 deletions datadog-agent/application.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
Expand Down Expand Up @@ -44,7 +45,7 @@ spec:
selfHeal: true
syncOptions:
- CreateNamespace=true
# ### NOTE: uncomment below to establish a datadog apm service for your cluster to leverage
# NOTE: uncomment below to establish a datadog apm service for your cluster to leverage
# ---
# apiVersion: v1
# kind: Service
Expand All @@ -57,4 +58,4 @@ spec:
# ports:
# - protocol: TCP
# port: 8126
# targetPort: 8126
# targetPort: 8126
1 change: 1 addition & 0 deletions datadog-agent/external-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
Expand Down
1 change: 1 addition & 0 deletions goldilocks/application.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
Expand Down
Loading

0 comments on commit 57e22a7

Please sign in to comment.