{{ variable.name }}
-
-
+
+
diff --git a/pkg/capi/components/CCVariables/index.vue b/pkg/capi/components/CCVariables/index.vue
index 5a5e7ee..511baf8 100644
--- a/pkg/capi/components/CCVariables/index.vue
+++ b/pkg/capi/components/CCVariables/index.vue
@@ -1,18 +1,14 @@
-
-
+
updateVariables(e, variableDef)"
@validation-passed="updateErrors"
/>
-
+
diff --git a/pkg/capi/components/CardGrid.vue b/pkg/capi/components/CardGrid.vue
index 5a8eae0..04c1099 100644
--- a/pkg/capi/components/CardGrid.vue
+++ b/pkg/capi/components/CardGrid.vue
@@ -1,24 +1,16 @@
-
diff --git a/pkg/capi/components/ClusterClassCard/index.vue b/pkg/capi/components/ClusterClassCard/index.vue
index b51a4d4..00be9b3 100644
--- a/pkg/capi/components/ClusterClassCard/index.vue
+++ b/pkg/capi/components/ClusterClassCard/index.vue
@@ -1,10 +1,8 @@
-
diff --git a/pkg/capi/components/ClusterListBanner.vue b/pkg/capi/components/ClusterListBanner.vue
index a0d1692..a91d281 100644
--- a/pkg/capi/components/ClusterListBanner.vue
+++ b/pkg/capi/components/ClusterListBanner.vue
@@ -31,4 +31,10 @@ export default {
};
-
+
+
+
diff --git a/pkg/capi/components/ExperimentalBanner.vue b/pkg/capi/components/ExperimentalBanner.vue
index 0610459..85f44ed 100644
--- a/pkg/capi/components/ExperimentalBanner.vue
+++ b/pkg/capi/components/ExperimentalBanner.vue
@@ -1,4 +1,4 @@
-
-
+
+
+
diff --git a/pkg/capi/edit/cluster.x-k8s.io.cluster/ClusterConfig.vue b/pkg/capi/edit/cluster.x-k8s.io.cluster/ClusterConfig.vue
index 152d1dc..334bec6 100644
--- a/pkg/capi/edit/cluster.x-k8s.io.cluster/ClusterConfig.vue
+++ b/pkg/capi/edit/cluster.x-k8s.io.cluster/ClusterConfig.vue
@@ -1,41 +1,34 @@
-
- embedded-cluster-api feature flag must be disabled before installing the CAPI Turtles extension. Follow instructions in the documentation here to do so.
- turtlesNeeded: Either the user doesn't have permission to run the Turtles extension or the Turtles operator isn't installed. To learn how to install the Rancher Turtles extension, read the documentation.
+ turtlesNeeded: Either the user doesn't have permission to run the Turtles extension or the Turtles operator isn't installed. To learn how to install the Rancher Turtles extension, read the documentation.
autoImport:
label: CAPI Auto-Import
checkbox:
@@ -111,6 +111,7 @@ capi:
version:
label: Version
placeholder: eg. v1.0.0
+ tooltip: If unspecified, the latest version will be used.
fetchConfigURL:
label: URL
placeholder: https://github.com/example/releases/latest/client.yaml
diff --git a/pkg/capi/models/cluster.x-k8s.io.clusterclass.js b/pkg/capi/models/cluster.x-k8s.io.clusterclass.js
index 77ed8f3..3a293a1 100644
--- a/pkg/capi/models/cluster.x-k8s.io.clusterclass.js
+++ b/pkg/capi/models/cluster.x-k8s.io.clusterclass.js
@@ -33,6 +33,7 @@ export default class ClusterClass extends SteveModel {
saveYaml(yaml) {
const localCluster = this.$rootGetters['management/byId'](MANAGEMENT.CLUSTER, LOCAL_CLUSTER);
+
return localCluster.doAction('apply', { yaml });
}
}
diff --git a/pkg/capi/tsconfig.json b/pkg/capi/tsconfig.json
index 5eb3e07..07c9c46 100644
--- a/pkg/capi/tsconfig.json
+++ b/pkg/capi/tsconfig.json
@@ -21,7 +21,6 @@
"node",
"webpack-env",
"@types/node",
- "@types/jest",
"@types/lodash",
"rancher",
"shell"
@@ -45,7 +44,6 @@
"**/*.ts",
"**/*.d.ts",
"**/*.tsx",
- "**/*.vue"
],
"exclude": [
"node_modules",
diff --git a/pkg/capi/types/capi.ts b/pkg/capi/types/capi.ts
index 5dd7155..076c238 100644
--- a/pkg/capi/types/capi.ts
+++ b/pkg/capi/types/capi.ts
@@ -21,58 +21,8 @@ export const CP_VERSIONS = {
export const CREDENTIALS_UPDATE_REQUIRED = ['aks'];
export const CREDENTIALS_NOT_REQUIRED = ['docker'];
-export interface Worker {
- name: String,
- class: String
-}
-export interface CAPIClusterTopology {
- version: String,
- class: String,
- workers: {
- machineDeployments: Worker[],
- machinePools: Worker[]
- }
-}
-export interface CAPIClusterCPEndpoint {
- host: String,
- port: Number
-}
-
-export interface CAPIClusterNetwork {
- apiServerPort?: Number,
- pods?: {
- cidrBlocks: String[]
- },
- serviceDomain?: String,
- services?: {
- cidrBlocks: String[]
- },
-}
-
-export interface ClusterClass {
- id: string,
- metadata: {
- name: string,
- namespace: string,
- annotations?: {[key: string]: string}
- },
- spec: {
- infrastructure: Object,
- workers: {
- machinePools: [],
- machineDeployments: []
- },
- controlPlane: {ref: {name: string}}
- }
-}
-export interface Provider {
- id: string,
- disabled: boolean,
- credential?: string
-}
-
-export const PROVIDER_TYPES: Provider[] = [
+export const PROVIDER_TYPES = [
{
id: 'aws', disabled: false, credential: 'aws'
},
diff --git a/pkg/capi/types/cluster.x-k8s.io.cluster.ts b/pkg/capi/types/cluster.x-k8s.io.cluster.ts
deleted file mode 100644
index 9f857d5..0000000
--- a/pkg/capi/types/cluster.x-k8s.io.cluster.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-
-export interface CapiClusterVariable {
- name: string,
- value?: any
-}
-
-export interface CapiCluster {
- spec?: {
- topology?: {
- variables?: Array
- }
- }
-}
diff --git a/pkg/capi/types/clusterClass.ts b/pkg/capi/types/clusterClass.ts
deleted file mode 100644
index 0612cb7..0000000
--- a/pkg/capi/types/clusterClass.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-
-export interface ClusterClassVariable {
- name: string,
- required: boolean,
- schema: {
- openAPIV3Schema: {
- additionalProperties?: Map
- default?: any
- description?: string,
- enum?: Array,
- example?: any,
- exclusiveMaximum?: boolean,
- exclusiveMinimum?: boolean,
- format?: string,
- items?: Array,
- maxItems?: number,
- maxLength?: number,
- maximum?: number,
- minItems?: number,
- minLength?: number
- minimum?: number,
- pattern?: string,
- properties?: Map,
- required?: Array,
- type: string,
- uniqueItems?: boolean,
- ['x-kubernetes-preserve-unknown-fields']?: boolean
- }
- }
-}
-
-export interface ClusterClassSpec {
- variables: Array
-}
-
-export interface ClusterClass {
-name: string,
-spec: ClusterClassSpec
-}
diff --git a/pkg/capi/util/validators.ts b/pkg/capi/util/validators.ts
index 6b441b5..8ecdb87 100644
--- a/pkg/capi/util/validators.ts
+++ b/pkg/capi/util/validators.ts
@@ -159,8 +159,8 @@ export const urlValidator = function(t: Translation): Validator {
return (val: string) => val && !val.match(/^https?:\/\/(.*)$/) ? t('validation.url') : undefined;
};
-export const providerVersionValidator = function(t: Translation, required: boolean): Validator {
- return (val: string) => (required && !val) || (val && !val.match(/^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/)) ? t('validation.version') : undefined;
+export const providerVersionValidator = function(t: Translation): Validator {
+ return (val: string) => (val && !val.match(/^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/)) ? t('validation.version') : undefined;
};
export const providerNameValidator = function(t: Translation): Validator {
diff --git a/yarn.lock b/yarn.lock
index bd1d016..d439fb6 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2765,6 +2765,13 @@
dependencies:
eslint-visitor-keys "^3.3.0"
+"@eslint-community/eslint-utils@^4.4.0":
+ version "4.4.1"
+ resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56"
+ integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==
+ dependencies:
+ eslint-visitor-keys "^3.4.3"
+
"@eslint/eslintrc@^0.4.3":
version "0.4.3"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
@@ -7938,6 +7945,14 @@ eslint-plugin-cypress@2.12.1:
dependencies:
globals "^11.12.0"
+eslint-plugin-es@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893"
+ integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==
+ dependencies:
+ eslint-utils "^2.0.0"
+ regexpp "^3.0.0"
+
eslint-plugin-es@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9"
@@ -7988,6 +8003,25 @@ eslint-plugin-n@15.2.0:
resolve "^1.10.1"
semver "^6.3.0"
+eslint-plugin-node@11.1.0:
+ version "11.1.0"
+ resolved "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d"
+ integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==
+ dependencies:
+ eslint-plugin-es "^3.0.0"
+ eslint-utils "^2.0.0"
+ ignore "^5.1.1"
+ minimatch "^3.0.4"
+ resolve "^1.10.1"
+ semver "^6.1.0"
+
+eslint-plugin-promise@^7.2.1:
+ version "7.2.1"
+ resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-7.2.1.tgz#a0652195700aea40b926dc3c74b38e373377bfb0"
+ integrity sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA==
+ dependencies:
+ "@eslint-community/eslint-utils" "^4.4.0"
+
eslint-plugin-vue@9.10.0:
version "9.10.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-9.10.0.tgz#bb6423166e6eab800344245b6eef6ce9480c78a7"
@@ -8041,7 +8075,7 @@ eslint-visitor-keys@^2.0.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
-eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1:
+eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3:
version "3.4.3"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
@@ -12734,7 +12768,7 @@ selfsigned@^2.1.1:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
-semver@^6.0.0, semver@^6.3.0, semver@^6.3.1:
+semver@^6.0.0, semver@^6.1.0, semver@^6.3.0, semver@^6.3.1:
version "6.3.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==