Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Litmus 2.0 to Kubesphere App Store #150

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/main/litmus/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
21 changes: 21 additions & 0 deletions src/main/litmus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
appVersion: "2.1.1"
description: A Helm chart to install ChaosCenter
name: litmus
version: 2.1.3
kubeVersion: ">=1.16.0-0"
home: https://litmuschaos.io
sources:
- https://github.com/litmuschaos/litmus
keywords:
- chaos-engineering
- resiliency
- kubernetes
maintainers:
- name: rajdas98
email: [email protected]
- name: ispeakc0de
email: [email protected]
- name: jasstkn
email: [email protected]
icon: https://raw.githubusercontent.com/litmuschaos/icons/master/litmus.png
165 changes: 165 additions & 0 deletions src/main/litmus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# litmus

![Version: 2.1.3](https://img.shields.io/badge/Version-2.1.3-informational?style=flat-square) ![AppVersion: 2.1.1](https://img.shields.io/badge/AppVersion-2.1.1-informational?style=flat-square)

A Helm chart to install ChaosCenter

**Homepage:** <https://litmuschaos.io>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| rajdas98 | [email protected] | |
| ispeakc0de | [email protected] | |
| jasstkn | [email protected] | |

## Source Code

* <https://github.com/litmuschaos/litmus>

## Requirements

Kubernetes: `>=1.16.0-0`

## Installing the Chart

To install this chart with the release name `litmus-portal`:

```console
$ helm repo add main https://charts.kubesphere.io/main
$ helm install litmus-portal main/litmus
```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| adminConfig.DBPASSWORD | string | `"1234"` | |
| adminConfig.DBUSER | string | `"admin"` | |
| adminConfig.DB_PORT | string | `"27017"` | |
| adminConfig.DB_SERVER | string | `""` | leave empty if uses Mongo DB deployed by this chart |
| adminConfig.JWTSecret | string | `"litmus-portal@123"` | |
| adminConfig.VERSION | string | `"2.2.0"` | |
| customLabels | object | `{}` | Additional labels |
| image.imagePullSecrets | list | `[]` | |
| image.imageRegistryName | string | `"litmuschaos"` | |
| ingress.annotations | object | `{}` | |
| ingress.enabled | bool | `false` | |
| ingress.host.name | string | `""` | This is ingress hostname (ex: my-domain.com) |
| ingress.host.paths.backend | string | `"/backend/(.*)"` | You may need adapt the path depending your ingress-controller |
| ingress.host.paths.frontend | string | `"/(.*)"` | You may need adapt the path depending your ingress-controller |
| ingress.name | string | `"litmus-ingress"` | |
| ingress.tls | list | `[]` | |
| mongo.affinity | object | `{}` | |
| mongo.containerPort | int | `27017` | |
| mongo.customLabels | object | `{}` | |
| mongo.image.pullPolicy | string | `"Always"` | |
| mongo.image.repository | string | `"mongo"` | |
| mongo.image.tag | string | `"4.2.8"` | |
| mongo.livenessProbe.failureThreshold | int | `5` | |
| mongo.livenessProbe.initialDelaySeconds | int | `30` | |
| mongo.livenessProbe.periodSeconds | int | `10` | |
| mongo.livenessProbe.successThreshold | int | `1` | |
| mongo.livenessProbe.timeoutSeconds | int | `5` | |
| mongo.nodeSelector | object | `{}` | |
| mongo.persistence.accessMode | string | `"ReadWriteOnce"` | |
| mongo.persistence.size | string | `"20Gi"` | |
| mongo.readinessProbe.initialDelaySeconds | int | `5` | |
| mongo.readinessProbe.periodSeconds | int | `10` | |
| mongo.readinessProbe.successThreshold | int | `1` | |
| mongo.readinessProbe.timeoutSeconds | int | `1` | |
| mongo.replicas | int | `1` | |
| mongo.resources | object | `{}` | |
| mongo.service.port | int | `27017` | |
| mongo.service.targetPort | int | `27017` | |
| mongo.service.type | string | `"ClusterIP"` | |
| mongo.tolerations | list | `[]` | |
| nameOverride | string | `""` | |
| openshift.route.annotations | object | `{}` | |
| openshift.route.enabled | bool | `false` | |
| openshift.route.host | string | `""` | |
| openshift.route.name | string | `"litmus-portal"` | |
| portal.frontend.affinity | object | `{}` | |
| portal.frontend.containerPort | int | `8080` | |
| portal.frontend.customLabels | object | `{}` | |
| portal.frontend.image.pullPolicy | string | `"Always"` | |
| portal.frontend.image.repository | string | `"litmusportal-frontend"` | |
| portal.frontend.image.tag | string | `"2.2.0"` | |
| portal.frontend.livenessProbe.failureThreshold | int | `5` | |
| portal.frontend.livenessProbe.initialDelaySeconds | int | `30` | |
| portal.frontend.livenessProbe.periodSeconds | int | `10` | |
| portal.frontend.livenessProbe.successThreshold | int | `1` | |
| portal.frontend.livenessProbe.timeoutSeconds | int | `5` | |
| portal.frontend.nodeSelector | object | `{}` | |
| portal.frontend.readinessProbe.initialDelaySeconds | int | `5` | |
| portal.frontend.readinessProbe.periodSeconds | int | `10` | |
| portal.frontend.readinessProbe.successThreshold | int | `1` | |
| portal.frontend.readinessProbe.timeoutSeconds | int | `1` | |
| portal.frontend.replicas | int | `1` | |
| portal.frontend.resources | object | `{}` | |
| portal.frontend.service.port | int | `9091` | |
| portal.frontend.service.targetPort | int | `8080` | |
| portal.frontend.service.type | string | `"NodePort"` | |
| portal.frontend.tolerations | list | `[]` | |
| portal.frontend.updateStrategy | object | `{}` | |
| portal.frontend.virtualService.enabled | bool | `false` | |
| portal.frontend.virtualService.gateways | list | `[]` | |
| portal.frontend.virtualService.hosts | list | `[]` | |
| portal.server.affinity | object | `{}` | |
| portal.server.authServer.containerPort | int | `3000` | |
| portal.server.authServer.env.ADMIN_PASSWORD | string | `"litmus"` | |
| portal.server.authServer.env.ADMIN_USERNAME | string | `"admin"` | |
| portal.server.authServer.image.pullPolicy | string | `"Always"` | |
| portal.server.authServer.image.repository | string | `"litmusportal-auth-server"` | |
| portal.server.authServer.image.tag | string | `"2.2.0"` | |
| portal.server.authServer.resources | object | `{}` | |
| portal.server.customLabels | object | `{}` | |
| portal.server.graphqlServer.containerPort | int | `8080` | |
| portal.server.graphqlServer.genericEnv.AGENT_DEPLOYMENTS | string | `"[\"app=chaos-exporter\", \"name=chaos-operator\", \"app=event-tracker\", \"app=workflow-controller\"]"` | |
| portal.server.graphqlServer.genericEnv.CONTAINER_RUNTIME_EXECUTOR | string | `"k8sapi"` | |
| portal.server.graphqlServer.genericEnv.HUB_BRANCH_NAME | string | `"v2.1.x"` | |
| portal.server.graphqlServer.genericEnv.SELF_CLUSTER | string | `"true"` | |
| portal.server.graphqlServer.image.pullPolicy | string | `"Always"` | |
| portal.server.graphqlServer.image.repository | string | `"litmusportal-server"` | |
| portal.server.graphqlServer.image.tag | string | `"2.2.0"` | |
| portal.server.graphqlServer.imageEnv.ARGO_WORKFLOW_CONTROLLER_IMAGE | string | `"workflow-controller:v2.11.0"` | |
| portal.server.graphqlServer.imageEnv.ARGO_WORKFLOW_EXECUTOR_IMAGE | string | `"argoexec:v2.11.0"` | |
| portal.server.graphqlServer.imageEnv.EVENT_TRACKER_IMAGE | string | `"litmusportal-event-tracker:2.2.0"` | |
| portal.server.graphqlServer.imageEnv.LITMUS_CHAOS_EXPORTER_IMAGE | string | `"chaos-exporter:2.1.1"` | |
| portal.server.graphqlServer.imageEnv.LITMUS_CHAOS_OPERATOR_IMAGE | string | `"chaos-operator:2.1.1"` | |
| portal.server.graphqlServer.imageEnv.LITMUS_CHAOS_RUNNER_IMAGE | string | `"chaos-runner:2.1.1"` | |
| portal.server.graphqlServer.imageEnv.SUBSCRIBER_IMAGE | string | `"litmusportal-subscriber:2.2.0"` | |
| portal.server.graphqlServer.livenessProbe.failureThreshold | int | `5` | |
| portal.server.graphqlServer.livenessProbe.initialDelaySeconds | int | `30` | |
| portal.server.graphqlServer.livenessProbe.periodSeconds | int | `10` | |
| portal.server.graphqlServer.livenessProbe.successThreshold | int | `1` | |
| portal.server.graphqlServer.livenessProbe.timeoutSeconds | int | `5` | |
| portal.server.graphqlServer.readinessProbe.initialDelaySeconds | int | `5` | |
| portal.server.graphqlServer.readinessProbe.periodSeconds | int | `10` | |
| portal.server.graphqlServer.readinessProbe.successThreshold | int | `1` | |
| portal.server.graphqlServer.readinessProbe.timeoutSeconds | int | `1` | |
| portal.server.graphqlServer.resources | object | `{}` | |
| portal.server.nodeSelector | object | `{}` | |
| portal.server.replicas | int | `1` | |
| portal.server.service.authServer.port | int | `9003` | |
| portal.server.service.authServer.targetPort | int | `3000` | |
| portal.server.service.graphqlServer.port | int | `9002` | |
| portal.server.service.graphqlServer.targetPort | int | `8080` | |
| portal.server.service.type | string | `"NodePort"` | |
| portal.server.serviceAccountName | string | `"litmus-server-account"` | |
| portal.server.tolerations | list | `[]` | |
| portal.server.updateStrategy | object | `{}` | |
| portal.server.waitForMongodb.image.pullPolicy | string | `"Always"` | |
| portal.server.waitForMongodb.image.repository | string | `"curl"` | |
| portal.server.waitForMongodb.image.tag | string | `"latest"` | |
| portalScope | string | `"cluster"` | |
| upgradeAgent.affinity | object | `{}` | |
| upgradeAgent.controlPlane.image.pullPolicy | string | `"Always"` | |
| upgradeAgent.controlPlane.image.repository | string | `"upgrade-agent-cp"` | |
| upgradeAgent.controlPlane.image.tag | string | `"ci"` | |
| upgradeAgent.nodeSelector | object | `{}` | |
| upgradeAgent.tolerations | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
26 changes: 26 additions & 0 deletions src/main/litmus/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{ template "chart.header" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

## Installing the Chart

To install this chart with the release name `litmus-portal`:

```console
$ helm repo add litmuschaos https://litmuschaos.github.io/litmus-helm/
$ helm install litmus-portal litmuschaos/litmus
```

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
5 changes: 5 additions & 0 deletions src/main/litmus/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Thank you for installing {{ .Chart.Name }} 😀

Your release is named {{ .Release.Name }} and it's installed to namespace: {{ .Release.Namespace }}.

Visit https://docs.litmuschaos.io to find more info.
56 changes: 56 additions & 0 deletions src/main/litmus/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "litmus-portal.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "litmus-portal.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "litmus-portal.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Specify default labels
*/}}
{{- define "litmus-portal.labels" -}}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "litmus-portal.name" . }}
app.kubernetes.io/part-of: {{ template "litmus-portal.name" . }}
app.kubernetes.io/version: "{{ .Chart.Version }}"
helm.sh/chart: {{ include "litmus-portal.chart" . }}
litmuschaos.io/version: {{ .Chart.AppVersion }}
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels }}
{{- end }}
{{- end -}}

{{/*
Specify default selectors
*/}}
{{- define "litmus-portal.selectors" -}}
app.kubernetes.io/name: {{ include "litmus-portal.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
75 changes: 75 additions & 0 deletions src/main/litmus/templates/controlplane-configs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "litmus-portal.fullname" . }}-admin-config
namespace: {{ .Release.Namespace }}
labels:
{{- include "litmus-portal.labels" . | nindent 4 }}
app.kubernetes.io/component: {{ include "litmus-portal.name" . }}-admin-config
data:
AGENT_SCOPE: "{{ .Values.portalScope }}"
AGENT_NAMESPACE: "{{ .Release.Namespace }}"
{{- if .Values.adminConfig.DB_SERVER }}
DB_SERVER: "mongodb://{{ .Values.adminConfig.DB_SERVER }}:{{ .Values.adminConfig.DB_PORT }}"
{{- else }}
DB_SERVER: "mongodb://{{ include "litmus-portal.fullname" . }}-mongo:{{ .Values.adminConfig.DB_PORT }}"
{{- end }}
VERSION: "{{ .Values.adminConfig.VERSION }}"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "litmus-portal.fullname" . }}-frontend-nginx-configuration
namespace: {{ .Release.Namespace }}
labels:
{{- include "litmus-portal.labels" . | nindent 4 }}
app.kubernetes.io/component: {{ include "litmus-portal.name" . }}-admin-config
data:
default.conf: |
server {
listen 8080;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri /index.html;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
location /auth/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass "http://{{ include "litmus-portal.fullname" . }}-server-service:9003/";
}
location /api/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass "http://{{ include "litmus-portal.fullname" . }}-server-service:9002/";
}
location /ws/ {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass "http://{{ include "litmus-portal.fullname" . }}-server-service:9002/";
}
}
12 changes: 12 additions & 0 deletions src/main/litmus/templates/controlplane-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "litmus-portal.fullname" . }}-admin-secret
namespace: {{ .Release.Namespace }}
labels:
{{- include "litmus-portal.labels" . | nindent 4 }}
app.kubernetes.io/component: {{ include "litmus-portal.name" . }}-admin-secret
stringData:
JWT_SECRET: "litmus-portal@123"
DB_USER: "admin"
DB_PASSWORD: "1234"
Loading