Skip to content

Commit

Permalink
Added version, documentation and repository
Browse files Browse the repository at this point in the history
  • Loading branch information
pbochynski committed Nov 15, 2023
1 parent e1829af commit 46e253e
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 25 deletions.
20 changes: 14 additions & 6 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function removeModuleFromKymaCR(name) {
}
async function deleteModule(m) {
if (m.managed) {
modal("This is managed module. Do you want to remove it from SKR managed resources?", "Delete confirmation", async () => {
modal("This is a managed module. Do you want to remove it from SKR managed resources?", "Delete confirmation", async () => {
removeModuleFromKymaCR(m.name)
})
return
Expand Down Expand Up @@ -276,10 +276,16 @@ function moduleCard(m) {
let cardBody = document.createElement('div')
cardBody.setAttribute('class', 'card-body')
let txt = document.createElement("div")
let version = m.version.split(':')[m.version.split(':').length-1]
let html = `<h5>${m.name} ${moduleBadge(m)}</h5>
<small>
<a href="${m.deploymentYaml}" target="_blank">deployment YAML</a> ${resourcesBadge(m)}<br/>
<a href="${m.cr.path}" target="_blank">configuration CR</a> ${crBadge(m)}<br/></small><br/>`
<a href="${m.deploymentYaml}" class="text-decoration-none" target="_blank">deployment YAML</a> ${resourcesBadge(m)}<br/>
<a href="${m.cr.path}" class="text-decoration-none" target="_blank">configuration CR</a> ${crBadge(m)}<br/>
version: ${version}<br/>
<a href="${m.documentation}" class="text-decoration-none" target="_blank">docs <i class="bi bi-box-arrow-up-right"></i></a>
<a href="${m.repository}" class="text-decoration-none" target="_blank">repo <i class="bi bi-box-arrow-up-right"></i></a><br/>
<br/>
</small>`
txt.innerHTML = html
cardBody.appendChild(txt)
cardBody.appendChild(buttons)
Expand All @@ -304,13 +310,15 @@ function renderModules(m) {
}
}
}
async function actualVersion(m){

}
async function managedModules() {
let kyma = await get(KYMA_PATH)
if (kyma) {

for (let m of modules) {
if (m.name=='istio' || m.name=='api-gateway') {
if (m.name=='istio') {
m.managed=true
continue;
}
Expand Down Expand Up @@ -408,5 +416,5 @@ function renderNotManagedResources(list) {
}

loadChannel()
.then(notManagedResources)
.then(renderNotManagedResources)
// .then(notManagedResources)
// .then(renderNotManagedResources)
90 changes: 76 additions & 14 deletions app/channels.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"name": "istio",
"deploymentYaml": "https://github.com/kyma-project/istio/releases/latest/download/istio-manager.yaml",
"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",
Expand All @@ -32,95 +37,152 @@
"/apis/security.istio.io/v1beta1/authorizationpolicies",
"/apis/security.istio.io/v1beta1/peerauthentications",
"/apis/security.istio.io/v1beta1/requestauthentications",
"/apis/telemetry.istio.io/v1alpha1/telemetries" ]
"/apis/telemetry.istio.io/v1alpha1/telemetries"
]
},
{
"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"
]
],
"managerSelector": {
"app.kubernetes.io/component": "api-gateway-operator.kyma-project.io"
}
},
{
"name": "serverless",
"deploymentYaml": "https://github.com/kyma-project/serverless-manager/releases/latest/download/serverless-operator.yaml",
"crYaml": "https://github.com/kyma-project/serverless-manager/releases/latest/download/default-serverless-cr.yaml",
"managedResources" : [
"documentation": "https://kyma-project.io/#/serverless-manager/user/README",
"repository": "https://github.com/kyma-project/serverless-manager.git",
"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",
"deploymentYaml": "https://github.com/kyma-project/btp-manager/releases/latest/download/btp-manager.yaml",
"crYaml": "https://github.com/kyma-project/btp-manager/releases/latest/download/btp-operator-default-cr.yaml",
"documentation": "https://kyma-project.io/#/btp-manager/user/README",
"repository": "https://github.com/kyma-project/btp-manager.git",
"managedResources": [
"/apis/services.cloud.sap.com/v1/serviceinstances",
"/apis/services.cloud.sap.com/v1/servicebindings",
"/apis/services.cloud.sap.com/v1alpha1/servicebindings",
"/apis/services.cloud.sap.com/v1alpha1/serviceinstances",
"/apis/operator.kyma-project.io/v1alpha1/btpoperators"
]
],
"managerSelector": {
"app.kubernetes.io/component": "btp-manager.kyma-project.io"
}
},
{
"name": "telemetry",
"deploymentYaml": "https://github.com/kyma-project/telemetry-manager/releases/latest/download/telemetry-manager.yaml",
"crYaml": "https://github.com/kyma-project/telemetry-manager/releases/latest/download/telemetry-default-cr.yaml",
"managedResources":[
"documentation": "https://kyma-project.io/#/telemetry-manager/user/README",
"repository": "https://github.com/kyma-project/telemetry-manager.git",
"managedResources": [
"/apis/operator.kyma-project.io/v1alpha1/telemetries",
"/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",
"deploymentYaml": "https://github.com/kyma-project/nats-manager/releases/latest/download/nats-manager.yaml",
"crYaml": "https://github.com/kyma-project/nats-manager/releases/latest/download/nats_default_cr.yaml",
"documentation": "https://kyma-project.io/#/nats-manager/user/README",
"repository": "https://github.com/kyma-project/nats-manager.git",
"managedResources": [
"/apis/operator.kyma-project.io/v1alpha1/nats"
]
],
"managerSelector": {
"control-plane": "manager"
}
},
{
"name": "eventing",
"deploymentYaml": "https://github.com/kyma-project/eventing-manager/releases/latest/download/eventing-manager.yaml",
"crYaml": "https://github.com/kyma-project/eventing-manager/releases/latest/download/eventing_default_cr.yaml",
"documentation": "https://kyma-project.io/#/eventing-manager/user/README",
"repository": "https://github.com/kyma-project/eventing-manager.git",
"managedResources": [
"/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",
"deploymentYaml": "https://github.com/kyma-project/application-connector-manager/releases/latest/download/application-connector-manager.yaml",
"crYaml": "https://github.com/kyma-project/application-connector-manager/releases/latest/download/default_application_connector_cr.yaml",
"documentation": "https://kyma-project.io/#/application-connector-manager/user/README",
"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",
"deploymentYaml": "https://github.com/kyma-project/keda-manager/releases/latest/download/keda-manager.yaml",
"crYaml": "https://github.com/kyma-project/keda-manager/releases/latest/download/keda-default-cr.yaml",
"managedResources":[
"documentation": "https://kyma-project.io/#/keda-manager/user/README",
"repository": "https://github.com/kyma-project/keda-manager.git",
"managedResources": [
"/apis/operator.kyma-project.io/v1alpha1/kedas",
"/apis/keda.sh/v1alpha1/clustertriggerauthentications",
"/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",
"deploymentYaml": "https://github.com/SAP/cap-operator-lifecycle/releases/download/manager%2Fv0.0.1/manager_manifest.yaml",
"crYaml": "https://github.com/SAP/cap-operator-lifecycle/releases/download/manager%2Fv0.0.1/manager_default_CR.yaml",
"managedResources":[
"documentation": "https://sap.github.io/cap-operator/docs/",
"repository": "https://github.com/SAP/cap-operator-lifecycle.git",
"managedResources": [
"/apis/operator.sme.sap.com/v1alpha1/capoperators"
],
"managerSelector": {
"app.kubernetes.io/component": "cap-operator.sme.sap.com"
},
"community": true
},
{
"name": "cluster-ip",
"deploymentYaml": "https://github.com/pbochynski/cluster-ip/releases/download/0.0.27/cluster-ip-operator.yaml",
"crYaml": "https://github.com/pbochynski/cluster-ip/releases/download/0.0.27/cluster-ip-nodes.yaml",
"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
}
]
Expand Down
11 changes: 6 additions & 5 deletions app/kyma.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
</head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
</head>

<body class="p-3 m-0 border-0 bd-example m-1 border-0">
<div class="container-fluid bg-dark">
<nav class="navbar navbar-dark bg-dark">
<svg width="92" height="25" xmlns="http://www.w3.org/2000/svg"><g fill="#FFFFFF" fill-rule="nonzero"><path d="M34.3833 20.325V4.5h3.45v6.5417L43.0667 4.5h4.0083l-5.3 6.1833 5.8333 9.6417H43.75l-4.2083-6.9917-1.6667 1.95V20.35z"/><path d="M47.3667 24.275l.7083-2.6083c.1583.0416.4333.1083.8333.1833a6.1667 6.1667 0 0 0 1.325.125c.313.0144.623-.0639.8917-.225a1.5333 1.5333 0 0 0 .5417-.7667l.2166-.5583-4.3333-11.5h3.5083l2.5 7.4 2.5-7.4H59.35l-4.725 12.6a8.425 8.425 0 0 1-.6417 1.3167 4.4 4.4 0 0 1-.8333 1c-.3241.28-.701.4925-1.1083.625a4.4 4.4 0 0 1-1.475.2166 11.5833 11.5833 0 0 1-2.0167-.1416c-.4917-.0917-.8833-.1834-1.1833-.2667zM61.2583 20.325v-11.4h3.4v1.7833a4.9167 4.9167 0 0 1 .6084-.6833 5.4583 5.4583 0 0 1 .8333-.65 4.4667 4.4667 0 0 1 1.025-.4833A3.65 3.65 0 0 1 68.3583 8.7a3.55 3.55 0 0 1 2.1334.5333 2.5 2.5 0 0 1 .95 1.475c.175-.2083.3833-.4333.6166-.675.2503-.2522.53-.4732.8334-.6583a4.7 4.7 0 0 1 1.0333-.4833A3.6667 3.6667 0 0 1 75.1667 8.7a3.9333 3.9333 0 0 1 1.4583.25 2.825 2.825 0 0 1 1.0333.725c.2784.3213.4832.6996.6 1.1083.1358.454.2004.9263.1917 1.4v8.1417h-3.4167v-7.2417c.0233-.406-.06-.811-.2416-1.175a1.0667 1.0667 0 0 0-.9834-.3916 2.1917 2.1917 0 0 0-1.1583.325 7.425 7.425 0 0 0-1.0917.8333v7.6667h-3.4v-7.2584c.0233-.406-.06-.811-.2416-1.175a1.075 1.075 0 0 0-.9834-.3916 2.225 2.225 0 0 0-1.175.325 7.5 7.5 0 0 0-1.1.8333v7.6667l-3.4-.0167zM80.825 17.4083a3.4583 3.4583 0 0 1 1.6667-3.0666 12.0083 12.0083 0 0 1 5.4166-1.4167v-.275a1.4 1.4 0 0 0-.3416-1 1.5333 1.5333 0 0 0-1.1667-.375 5.125 5.125 0 0 0-2 .3917 7.275 7.275 0 0 0-1.6667 1.025l-1.4416-1.975a8.5 8.5 0 0 1 .975-.7167 7.6167 7.6167 0 0 1 1.2166-.65 7.9333 7.9333 0 0 1 1.5334-.4583 10.2333 10.2333 0 0 1 1.9083-.1667 4.275 4.275 0 0 1 3.3333 1.1333 4.85 4.85 0 0 1 1.0167 3.3334v4.3833c-.007.5563.0152 1.1127.0667 1.6667.0338.3734.1179.7407.25 1.0916h-3.3834c-.0666-.25-.125-.5-.175-.775a4.2917 4.2917 0 0 1-.0833-.9A5.3833 5.3833 0 0 1 86.2333 20a4.8083 4.8083 0 0 1-2.2.475 3.6333 3.6333 0 0 1-1.2-.1917 3.1417 3.1417 0 0 1-1.025-.5916 2.6917 2.6917 0 0 1-.6916-.975 3.2417 3.2417 0 0 1-.2917-1.3084zm3.3333-.5916a1 1 0 0 0 .3417.8333c.2607.1892.5783.2833.9.2667a3.8333 3.8333 0 0 0 1.525-.275 3.2083 3.2083 0 0 0 1.0417-.7167v-2.1083a7.975 7.975 0 0 0-2.9167.7083 1.4833 1.4833 0 0 0-.9083 1.2917h.0166zM0 5v9.6a4.575 4.575 0 0 1 2.0833-.5h2.0834a11.95 11.95 0 0 0 7.6166-2.5c-.55-.5-1.0916-1-1.6166-1.5C7.5 7.6083 4.775 5.2417 0 5z"/><path d="M25.5083 5.1167c-4.675.225-7.175 2.5666-9.7666 5.0416C12.9 12.8583 9.9083 15.65 4.125 15.65H2.0833a2.0583 2.0583 0 0 0-1.8166 1.0917 2.1167 2.1167 0 0 0-.2667.975v2.6166h25.5l.0083-15.2166zM12.2583 4.1667C10.0833 2.075 7.9 0 3.55 0v4.1667a13.8 13.8 0 0 1 5 2.6916 13.275 13.275 0 0 0 3.7083-2.6916z"/><path d="M21.2833.7167c-3.6166.2083-5.525 2.0333-7.5 3.9583A18.0417 18.0417 0 0 1 9.775 7.8167c.4583.4166.9167.8333 1.3583 1.275.4417.4416 1.1584 1.0916 1.7584 1.6166.6166-.5333 1.2166-1.1 1.825-1.6666 1.8833-1.7917 3.825-3.6 6.6083-4.6334L21.2833.7167z"/></g></svg>
<a class="navbar-brand" href="#">modules 2023-11-14 10:12</a>
<a class="navbar-brand" href="#">modules 2023-11-15 22:23</a>
</nav>

</div>
Expand All @@ -24,8 +25,8 @@
The list of modules is loading. Please wait...
</div>
<div id="unmanaged" >

</div>
</div>
<br />
<!-- Button trigger modal
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
Expand Down Expand Up @@ -54,7 +55,7 @@ <h1 class="modal-title fs-5" id="modalTitle">Modal title</h1>
<script src="https://kyma-project.github.io/community-modules/app.js"></script>

<!-- For local development replace the line above with this: -->
<!-- <script src="app.js"></script> -->
<!-- <script src="app.js"></script> -->

</body>

Expand Down
10 changes: 10 additions & 0 deletions script/release-channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ 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
}
}
}
});

url = m.crYaml
Expand Down

0 comments on commit 46e253e

Please sign in to comment.