diff --git a/README.md b/README.md index 99cdc99..5b4b074 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,6 @@ kubectl proxy -w='.' Open Web UI with this link: [http://127.0.0.1:8001/static/kyma.html](http://127.0.0.1:8001/static/kyma.html) -## Architecture - ## Contribute your module Checkout the community-modules repository and add your own module by adding an entry in the [channels.json](app/channels.json) file. Example: @@ -33,6 +31,8 @@ Checkout the community-modules repository and add your own module by adding an e "name": "api-gateway", "deploymentYaml": "https://github.com/kyma-project/api-gateway/releases/latest/download/api-gateway-manager.yaml", "crYaml": "https://github.com/kyma-project/api-gateway/releases/latest/download/apigateway-default-cr.yaml", + "documentation": "https://kyma-project.io/#/api-gateway/user/README", + "repository": "https://github.com/kyma-project/api-gateway.git", "managedResources": [ "/apis/operator.kyma-project.io/v1alpha1/apigateways", "/apis/gateway.kyma-project.io/v1beta1/apirules" @@ -43,6 +43,8 @@ Mandatory fields: - **name** - name of your module (keep it short) - **deploymentYaml** - URL of your module deployment YAML (usually the artifact of your module release) - **crYaml** - URL of your module default configuration (custom resource) +- **documentatio** - documentation URL +- **repository** - main source code repository - **managedResources** - list of api server resources (paths) that are managed by your module (including the configuration resource) The channels.json file is processed by the build process and generates release channels files (right now only latest release is generated: [https://kyma-project.github.io/community-modules/latest.json](https://kyma-project.github.io/community-modules/latest.json) diff --git a/app/channels.json b/app/channels.json index 9210ece..077cb11 100644 --- a/app/channels.json +++ b/app/channels.json @@ -8,9 +8,6 @@ "crYaml": "https://github.com/kyma-project/istio/releases/latest/download/istio-default-cr.yaml", "documentation": "https://kyma-project.io/#/istio/user/00-overview/README", "repository": "https://github.com/kyma-project/istio.git", - "managerSelector": { - "app.kubernetes.io/component": "istio-operator.kyma-project.io" - }, "managedResources": [ "/apis/extensions.istio.io/v1alpha1/wasmplugins", "/apis/install.istio.io/v1alpha1/istiooperators", @@ -49,10 +46,7 @@ "managedResources": [ "/apis/operator.kyma-project.io/v1alpha1/apigateways", "/apis/gateway.kyma-project.io/v1beta1/apirules" - ], - "managerSelector": { - "app.kubernetes.io/component": "api-gateway-operator.kyma-project.io" - } + ] }, { "name": "serverless", @@ -63,10 +57,7 @@ "managedResources": [ "/apis/serverless.kyma-project.io/v1alpha2/functions", "/apis/operator.kyma-project.io/v1alpha1/serverlesses" - ], - "managerSelector": { - "app.kubernetes.io/component": "serverless-operator.kyma-project.io" - } + ] }, { "name": "btp-operator", @@ -96,10 +87,7 @@ "/apis/telemetry.kyma-project.io/v1alpha1/logparsers", "/apis/telemetry.kyma-project.io/v1alpha1/logpipelines", "/apis/telemetry.kyma-project.io/v1alpha1/tracepipelines" - ], - "managerSelector": { - "app.kubernetes.io/instance": "telemetry" - } + ] }, { "name": "nats", @@ -109,10 +97,7 @@ "repository": "https://github.com/kyma-project/nats-manager.git", "managedResources": [ "/apis/operator.kyma-project.io/v1alpha1/nats" - ], - "managerSelector": { - "control-plane": "manager" - } + ] }, { "name": "eventing", @@ -124,10 +109,7 @@ "/apis/eventing.kyma-project.io/v1alpha1/subscriptions", "/apis/eventing.kyma-project.io/v1alpha2/subscriptions", "/apis/operator.kyma-project.io/v1alpha1/eventings" - ], - "managerSelector": { - "app.kubernetes.io/component": "eventing-manager" - } + ] }, { "name": "application-connector", @@ -137,10 +119,7 @@ "repository": "https://github.com/kyma-project/application-connector-manager.git", "managedResources": [ "/apis/operator.kyma-project.io/v1alpha1/applicationconnectors" - ], - "managerSelector": { - "control-plane": "controller-manager" - } + ] }, { "name": "keda", @@ -154,10 +133,7 @@ "/apis/keda.sh/v1alpha1/scaledjobs", "/apis/keda.sh/v1alpha1/scaledobjects", "/apis/keda.sh/v1alpha1/triggerauthentications" - ], - "managerSelector": { - "app.kubernetes.io/component": "keda-manager.kyma-project.io" - } + ] }, { "name": "cap-operator", @@ -168,9 +144,6 @@ "managedResources": [ "/apis/operator.sme.sap.com/v1alpha1/capoperators" ], - "managerSelector": { - "app.kubernetes.io/component": "cap-operator.sme.sap.com" - }, "community": true }, { @@ -180,9 +153,6 @@ "documentation": "https://github.com/pbochynski/cluster-ip#readme", "repository": "https://github.com/pbochynski/cluster-ip.git", "managedResources": [], - "managerSelector": { - "app.kubernetes.io/component": "cluster-ip.kyma-project.io" - }, "community": true } ] diff --git a/script/release-channels.js b/script/release-channels.js index 1d6f68d..6916b5a 100644 --- a/script/release-channels.js +++ b/script/release-channels.js @@ -10,14 +10,10 @@ async function loadModules(modules) { m.resources = [] jsyaml.loadAll(body, (doc) => { m.resources.push({ resource: doc }) - if (doc.kind == 'Deployment' && m.managerSelector) { - let labels = doc.spec.template.metadata.labels - let miss = Object.keys(m.managerSelector).some(key => m.managerSelector[key]!=labels[key]) - if (!miss) { - m.version='unknown' - for (let c of doc.spec.template.spec.containers) { - m.version=c.image - } + if (doc.kind == 'Deployment' && m.managerSelector) { + m.version = 'unknown' + for (let c of doc.spec.template.spec.containers) { + m.version = c.image } } }); @@ -26,15 +22,15 @@ async function loadModules(modules) { response = await fetch(url) body = await response.text() m.cr = { resource: jsyaml.load(body) } - m.cr.resource.metadata.namespace='kyma-system' + m.cr.resource.metadata.namespace = 'kyma-system' } } -async function releaseChannels(){ - for(let ch of channels) { +async function releaseChannels() { + for (let ch of channels) { await loadModules(ch.modules) console.log("channel loaded") - fs.writeFileSync(`${ch.name}.json`,JSON.stringify(ch.modules,null,2)) + fs.writeFileSync(`${ch.name}.json`, JSON.stringify(ch.modules, null, 2)) console.log("channel written") } }