diff --git a/assets/cluster-api/cluster-api-0.1.0.tgz b/assets/cluster-api/cluster-api-0.1.0.tgz new file mode 100644 index 0000000..c8b86df Binary files /dev/null and b/assets/cluster-api/cluster-api-0.1.0.tgz differ diff --git a/assets/index.yaml b/assets/index.yaml new file mode 100644 index 0000000..e8375f2 --- /dev/null +++ b/assets/index.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +entries: + cluster-api: + - annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.28.0-0' + catalog.cattle.io/namespace: cattle-ui-plugin-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux, windows + catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' + catalog.cattle.io/scope: management + catalog.cattle.io/ui-component: plugins + apiVersion: v2 + appVersion: 0.1.0 + created: "2023-07-10T13:25:55.788354799Z" + description: cluster-api plugin + digest: bef4f503d87b70630c7647c605f3c7b387f46fdbda1fbe354b280fc6550dbe73 + name: cluster-api + type: application + urls: + - assets/cluster-api/cluster-api-0.1.0.tgz + version: 0.1.0 +generated: "2023-07-10T13:25:55.78722239Z" diff --git a/charts/cluster-api/0.1.0/Chart.yaml b/charts/cluster-api/0.1.0/Chart.yaml new file mode 100644 index 0000000..c1d66a3 --- /dev/null +++ b/charts/cluster-api/0.1.0/Chart.yaml @@ -0,0 +1,15 @@ +annotations: + catalog.cattle.io/certified: rancher # Any application we are adding as a helm chart + catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.28.0-0' + catalog.cattle.io/namespace: cattle-ui-plugin-system # Must prefix with cattle- and suffix with -system= + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux, windows + catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' + catalog.cattle.io/scope: management + catalog.cattle.io/ui-component: plugins +apiVersion: v2 +appVersion: "0.1.0" +description: cluster-api plugin +name: cluster-api +type: application +version: 0.1.0 diff --git a/charts/cluster-api/0.1.0/README.md b/charts/cluster-api/0.1.0/README.md new file mode 100644 index 0000000..e3fc8e1 --- /dev/null +++ b/charts/cluster-api/0.1.0/README.md @@ -0,0 +1,2 @@ +## Manage Cluster API +A proof-of-concept extension to integrate Cluster API and Rancher. \ No newline at end of file diff --git a/charts/cluster-api/0.1.0/templates/_helpers.tpl b/charts/cluster-api/0.1.0/templates/_helpers.tpl new file mode 100644 index 0000000..bd2ec19 --- /dev/null +++ b/charts/cluster-api/0.1.0/templates/_helpers.tpl @@ -0,0 +1,52 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "extension-server.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 "extension-server.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 "extension-server.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "extension-server.labels" -}} +helm.sh/chart: {{ include "extension-server.chart" . }} +{{ include "extension-server.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "extension-server.selectorLabels" -}} +app.kubernetes.io/name: {{ include "extension-server.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} diff --git a/charts/cluster-api/0.1.0/templates/cr.yaml b/charts/cluster-api/0.1.0/templates/cr.yaml new file mode 100644 index 0000000..b69583a --- /dev/null +++ b/charts/cluster-api/0.1.0/templates/cr.yaml @@ -0,0 +1,12 @@ +apiVersion: catalog.cattle.io/v1 +kind: UIPlugin +metadata: + name: {{ include "extension-server.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: {{ include "extension-server.labels" . | nindent 4 }} +spec: + plugin: + name: {{ include "extension-server.fullname" . }} + version: {{ (semver (default .Chart.AppVersion .Values.plugin.versionOverride)).Original }} + endpoint: https://raw.githubusercontent.com/rancher-sandbox/rancher-turtles-ui/gh-pages/extensions/cluster-api/0.1.0 + noCache: {{ .Values.plugin.noCache }} diff --git a/charts/cluster-api/0.1.0/values.yaml b/charts/cluster-api/0.1.0/values.yaml new file mode 100644 index 0000000..9cc1bd5 --- /dev/null +++ b/charts/cluster-api/0.1.0/values.yaml @@ -0,0 +1,6 @@ +nameOverride: "" +fullnameOverride: "" +plugin: + enabled: true + versionOverride: "" + noCache: false diff --git a/extensions/cluster-api/0.1.0/files.txt b/extensions/cluster-api/0.1.0/files.txt new file mode 100644 index 0000000..828b9d1 --- /dev/null +++ b/extensions/cluster-api/0.1.0/files.txt @@ -0,0 +1,3 @@ +plugin/cluster-api-0.1.0.umd.min.js +plugin/cluster-api-0.1.0.umd.min.js.map +plugin/package.json diff --git a/extensions/cluster-api/0.1.0/plugin/cluster-api-0.1.0.umd.min.js b/extensions/cluster-api/0.1.0/plugin/cluster-api-0.1.0.umd.min.js new file mode 100644 index 0000000..f634cb3 --- /dev/null +++ b/extensions/cluster-api/0.1.0/plugin/cluster-api-0.1.0.umd.min.js @@ -0,0 +1,2 @@ +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["cluster-api-0.1.0"]=t():e["cluster-api-0.1.0"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="1c25")}({"1c25":function(e,t,n){"use strict";if(n.r(t),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}function i(e){}var u=function(e){i(e),e.metadata=n("9224"),e.addProduct(n("85d6"))};t["default"]=u},"85d6":function(e,t,n){"use strict";function r(e,t){const n="Cluster API",{product:r}=e.DSL(t,n);r({icon:"gear",inStore:"management",weight:100})}n.r(t),n.d(t,"init",(function(){return r}))},9224:function(e){e.exports=JSON.parse('{"name":"cluster-api","description":"cluster-api plugin","version":"0.1.0","private":false,"rancher":true,"scripts":{"dev":"./node_modules/.bin/nuxt dev","nuxt":"./node_modules/.bin/nuxt"},"engines":{"node":">=12"},"devDependencies":{"@vue/cli-plugin-babel":"4.5.18","@vue/cli-service":"4.5.18","@vue/cli-plugin-typescript":"4.5.18"},"browserslist":["> 1%","last 2 versions","not dead"]}')}})})); +//# sourceMappingURL=cluster-api-0.1.0.umd.min.js.map \ No newline at end of file diff --git a/extensions/cluster-api/0.1.0/plugin/cluster-api-0.1.0.umd.min.js.map b/extensions/cluster-api/0.1.0/plugin/cluster-api-0.1.0.umd.min.js.map new file mode 100644 index 0000000..bc7ba58 --- /dev/null +++ b/extensions/cluster-api/0.1.0/plugin/cluster-api-0.1.0.umd.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://cluster-api-0.1.0/webpack/universalModuleDefinition","webpack://cluster-api-0.1.0/webpack/bootstrap","webpack://cluster-api-0.1.0//home/runner/work/rancher-turtles-ui/rancher-turtles-ui/node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://cluster-api-0.1.0/./node_modules/@rancher/auto-import","webpack://cluster-api-0.1.0/./index.ts","webpack://cluster-api-0.1.0//home/runner/work/rancher-turtles-ui/rancher-turtles-ui/node_modules/@vue/cli-service/lib/commands/build/entry-lib.js","webpack://cluster-api-0.1.0/./product.ts"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","currentScript","document","src","match","importTypes","$plugin","plugin","metadata","require","addProduct","init","store","PRODUCT_NAME","product","DSL","icon","inStore","weight"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,IACQ,oBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,kBAAZC,QACdA,QAAQ,qBAAuBD,IAE/BD,EAAK,qBAAuBC,KAR9B,CASoB,qBAATK,KAAuBA,KAAOC,MAAO,WAChD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUR,QAGnC,IAAIC,EAASK,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQH,GAAUI,KAAKX,EAAOD,QAAS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wB,CACjC,IAAIC,EAAgBD,OAAOE,SAASD,cAWhCE,EAAMF,GAAiBA,EAAcE,IAAIC,MAAM,2BAC/CD,IACF,IAA0BA,EAAI,IChB3B,SAASE,EAAYC,ICId,eAAUC,GAEtBF,EAAYE,GAGZA,EAAOC,SAAWC,EAAQ,QAG1BF,EAAOG,WAAWD,EAAQ,UCVb,gB,oCCAT,SAAUE,EAAKL,EAAkBM,GACrC,MAAMC,EAAe,eAEf,QAAEC,GAAYR,EAAQS,IAAIH,EAAOC,GAEvCC,EAAQ,CACNE,KAAS,OACTC,QAAS,aACTC,OAAS,MARb,6C","file":"cluster-api-0.1.0.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cluster-api-0.1.0\"] = factory();\n\telse\n\t\troot[\"cluster-api-0.1.0\"] = factory();\n})((typeof self !== 'undefined' ? self : this), function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"1c25\");\n","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n var currentScript = window.document.currentScript\n if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n var getCurrentScript = require('@soda/get-current-script')\n currentScript = getCurrentScript()\n\n // for backward compatibility, because previously we directly included the polyfill\n if (!('currentScript' in document)) {\n Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n }\n }\n\n var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n if (src) {\n __webpack_public_path__ = src[1] // eslint-disable-line\n }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","export function importTypes($plugin) { \n};\n","import { importTypes } from '@rancher/auto-import';\nimport { IPlugin } from '@shell/core/types';\n\n// Init the package\nexport default function(plugin: IPlugin): void {\n // Auto-import model, detail, edit from the folders\n importTypes(plugin);\n\n // Provide plugin metadata from package.json\n plugin.metadata = require('./package.json');\n\n // Load a product\n plugin.addProduct(require('./product'));\n}\n","import './setPublicPath'\nimport mod from '~entry'\nexport default mod\nexport * from '~entry'\n","import { IPlugin } from '@shell/core/types';\n\nexport function init($plugin: IPlugin, store: any) {\n const PRODUCT_NAME = 'Cluster API';\n\n const { product } = $plugin.DSL(store, PRODUCT_NAME);\n\n product({\n icon: 'gear',\n inStore: 'management',\n weight: 100\n });\n}"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/cluster-api/0.1.0/plugin/package.json b/extensions/cluster-api/0.1.0/plugin/package.json new file mode 100644 index 0000000..b496c4c --- /dev/null +++ b/extensions/cluster-api/0.1.0/plugin/package.json @@ -0,0 +1,19 @@ +{ + "name": "cluster-api", + "description": "cluster-api plugin", + "version": "0.1.0", + "private": false, + "rancher": true, + "engines": { + "node": ">=12" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "4.5.18", + "@vue/cli-service": "4.5.18", + "@vue/cli-plugin-typescript": "4.5.18" + }, + "files": [ + "**/*" + ], + "main": "cluster-api-0.1.0.umd.min.js" +} \ No newline at end of file diff --git a/index.yaml b/index.yaml new file mode 100644 index 0000000..e8375f2 --- /dev/null +++ b/index.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +entries: + cluster-api: + - annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/kube-version: '>= 1.16.0-0 < 1.28.0-0' + catalog.cattle.io/namespace: cattle-ui-plugin-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux, windows + catalog.cattle.io/rancher-version: '>= 2.7.0-0 < 2.8.0-0' + catalog.cattle.io/scope: management + catalog.cattle.io/ui-component: plugins + apiVersion: v2 + appVersion: 0.1.0 + created: "2023-07-10T13:25:55.788354799Z" + description: cluster-api plugin + digest: bef4f503d87b70630c7647c605f3c7b387f46fdbda1fbe354b280fc6550dbe73 + name: cluster-api + type: application + urls: + - assets/cluster-api/cluster-api-0.1.0.tgz + version: 0.1.0 +generated: "2023-07-10T13:25:55.78722239Z"