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

Initial commit for mta v6.2.2 and v7.0.2 manifests #266

Merged
merged 7 commits into from
Jul 21, 2024
Merged
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
23 changes: 23 additions & 0 deletions charts/mta-v6.x/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
26 changes: 26 additions & 0 deletions charts/mta-v6.x/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v2
name: mta-v6
description: A Helm chart for MTA serverless workflow

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.24

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

icon: https://raw.githubusercontent.com/parodos-dev/parodos-dev.github.io/main/assets/images/WO_black.svg
63 changes: 63 additions & 0 deletions charts/mta-v6.x/INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
MTA
===========

# Installation
## Persistence pre-requisites
The MTA workflow has persistence enabled, you must have a PostgreSQL instance running in the cluster, in the same `namespace` as the workflows.
A `secret` containing the instance credentials must exist as well.

See [this](https://www.parodos.dev/orchestrator-helm-chart/postgresql) on how to install a PostgreSQL instance. Please follow the section detailing how to install using Helm. In this document, a `secret` holding the credentials is created.

## Installing helm chart
From `charts` folder run
```console
helm install mta workflows/mta -n sonataflow-infra
```

The rest of the installation steps can be found [here](https://github.com/parodos-dev/serverless-workflows-config/blob/gh-pages/docs/mta/README.md#configuration)

### Persistence configuration
For a different persistence configuration, edit the `sonataflow` resource to set the correct value for the `persistence` `spec`.
The defaults are:
```
persistence:
postgresql:
secretRef:
name: sonataflow-psql-postgresql
userKey: postgres-username
passwordKey: postgres-password
serviceRef:
name: sonataflow-psql-postgresql
port: 5432
databaseName: sonataflow
databaseSchema: mtaanalysis
```

Make sure the above values match what is deployed on your namespace.

You can patch the resource by running (update it if needed with your values):
```bash
oc patch sonataflow/mtaanalysis -n sonataflow-infra \
--type merge \
-p '
{
"spec": {
"persistence": {
"postgresql": {
"secretRef": {
"name": "sonataflow-psql-postgresql",
"userKey": "postgres-username",
"passwordKey": "postgres-password"
},
"serviceRef": {
"name": "sonataflow-psql-postgresql",
"port": 5432,
"databaseName": "sonataflow",
"databaseSchema": "mtaanalysis"
}
}
}
}
}'
```

20 changes: 20 additions & 0 deletions charts/mta-v6.x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Mta
===========

A Helm chart for MTA serverless workflow


## Configuration

The following table lists the configurable parameters of the Mta chart and their default values.

| Parameter | Description | Default |
| ------------------------ | ----------------------- | -------------- |
| `mta.url` | | `"http://mta-ui.openshift-mta.svc.cluster.local:8080"` |



---
_Documentation generated by [Frigate](https://frigate.readthedocs.io)._

44 changes: 44 additions & 0 deletions charts/mta-v6.x/crds/tackle.konveyor.io_tackles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: tackles.tackle.konveyor.io
spec:
group: tackle.konveyor.io
names:
kind: Tackle
listKind: TackleList
plural: tackles
singular: tackle
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: Tackle is the Schema for the tackles API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: Spec defines the desired state of Tackle
type: object
x-kubernetes-preserve-unknown-fields: true
status:
description: Status defines the observed state of Tackle
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
served: true
storage: true
subresources:
status: {}
26 changes: 26 additions & 0 deletions charts/mta-v6.x/templates/00-mta-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v1
kind: Namespace
metadata:
name: openshift-mta
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: openshift-mta
namespace: openshift-mta
spec:
targetNamespaces:
- openshift-mta
upgradeStrategy: Default
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: mta-operator
namespace: openshift-mta
spec:
channel: stable-v6.2
installPlanApproval: Automatic
name: mta-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
9 changes: 9 additions & 0 deletions charts/mta-v6.x/templates/00-tackle-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: Tackle
apiVersion: tackle.konveyor.io/v1alpha1
metadata:
name: tackle
namespace: openshift-mta
spec:
feature_auth_required: false
hub_database_volume_size: 1Gi
hub_bucket_volume_size: 1Gi
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: v1
data:
mta-input.json: |+
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"repositoryURL": {
"type": "string",
"pattern": "^(git|http|https)://.+$"
},
"recipients": {
"title": "Recipients",
"type": "array",
"description": "A list of recipients for the notification in the format of 'user:<namespace>/<username>' or 'group:<namespace>/<groupname>', i.e. 'user:default/jsmith'",
"items": {
"title": "Recipient",
"type": "string",
"pattern": "^(user|group):[a-z0-9]([-a-z0-9]*[a-z0-9])?/([a-z0-9]([-a-z0-9]*[a-z0-9])?)$"
},
"minItems": 1
},
"exportToIssueManager": {
"type": "string"
},
"migrationStartDatetime": {
"type": "string"
},
"migrationEndDatetime": {
"type": "string"
}
},
"required": [
"repositoryURL",
"exportToIssueManager",
"recipients"
]
}

kind: ConfigMap
metadata:
creationTimestamp: null
name: 01-mta-analysis-v6-resources
8 changes: 8 additions & 0 deletions charts/mta-v6.x/templates/01-secret_mta-analysis-v6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
data:
NOTIFICATIONS_BEARER_TOKEN: ""
kind: Secret
metadata:
creationTimestamp: null
name: mta-analysis-v6-creds
namespace: sonataflow-infra
Loading