@backstage/plugin-kubernetes-common 0.9.3-next.0 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @backstage/plugin-kubernetes-common
2
2
 
3
+ ## 0.9.3
4
+
5
+ ### Patch Changes
6
+
7
+ - ac0e1ac: Fixed the lack of `secrets` to fetch from the kubernetes api by adding option to specify additional Objects which are not part of Default Objects
8
+ - ca3da29: The `/clusters` endpoint is now protected by the `kubernetes.clusters.read` permission.
9
+ The `/services/:serviceId` endpoint is now protected by the `kubernetes.resources.read` permission.
10
+ The `/resources` endpoints are now protected by the `kubernetes.resources.read` permission.
11
+ - Updated dependencies
12
+ - @backstage/catalog-model@1.7.3
13
+ - @backstage/types@1.2.1
14
+ - @backstage/plugin-permission-common@0.8.4
15
+
16
+ ## 0.9.3-next.1
17
+
18
+ ### Patch Changes
19
+
20
+ - ca3da29: The `/clusters` endpoint is now protected by the `kubernetes.clusters.read` permission.
21
+ The `/services/:serviceId` endpoint is now protected by the `kubernetes.resources.read` permission.
22
+ The `/resources` endpoints are now protected by the `kubernetes.resources.read` permission.
23
+ - Updated dependencies
24
+ - @backstage/catalog-model@1.7.3
25
+ - @backstage/types@1.2.1
26
+ - @backstage/plugin-permission-common@0.8.4
27
+
3
28
  ## 0.9.3-next.0
4
29
 
5
30
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -21,8 +21,10 @@ exports.ANNOTATION_KUBERNETES_OIDC_TOKEN_PROVIDER = catalogEntityConstants.ANNOT
21
21
  exports.ANNOTATION_KUBERNETES_SKIP_METRICS_LOOKUP = catalogEntityConstants.ANNOTATION_KUBERNETES_SKIP_METRICS_LOOKUP;
22
22
  exports.ANNOTATION_KUBERNETES_SKIP_TLS_VERIFY = catalogEntityConstants.ANNOTATION_KUBERNETES_SKIP_TLS_VERIFY;
23
23
  exports.SERVICEACCOUNT_CA_PATH = certificateAuthorityConstants.SERVICEACCOUNT_CA_PATH;
24
+ exports.kubernetesClustersReadPermission = permissions.kubernetesClustersReadPermission;
24
25
  exports.kubernetesPermissions = permissions.kubernetesPermissions;
25
26
  exports.kubernetesProxyPermission = permissions.kubernetesProxyPermission;
27
+ exports.kubernetesResourcesReadPermission = permissions.kubernetesResourcesReadPermission;
26
28
  exports.detectErrors = errorDetection.detectErrors;
27
29
  exports.groupResponses = response.groupResponses;
28
30
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -297,6 +297,14 @@ declare const ANNOTATION_KUBERNETES_AWS_EXTERNAL_ID = "kubernetes.io/aws-externa
297
297
  * @public
298
298
  */
299
299
  declare const kubernetesProxyPermission: _backstage_plugin_permission_common.BasicPermission;
300
+ /** This permission is used to check access to the /resources and /services/:serviceId endpoints
301
+ * @public
302
+ */
303
+ declare const kubernetesResourcesReadPermission: _backstage_plugin_permission_common.BasicPermission;
304
+ /** This permission is used to check access to the /clusters endpoint
305
+ * @public
306
+ */
307
+ declare const kubernetesClustersReadPermission: _backstage_plugin_permission_common.BasicPermission;
300
308
  /**
301
309
  * List of all Kubernetes permissions.
302
310
  * @public
@@ -378,4 +386,4 @@ declare const detectErrors: (objects: ObjectsByEntityResponse$1) => DetectedErro
378
386
  /** @public */
379
387
  declare const groupResponses: (fetchResponse: FetchResponse$1[]) => GroupedResponses;
380
388
 
381
- export { ANNOTATION_KUBERNETES_API_SERVER, ANNOTATION_KUBERNETES_API_SERVER_CA, ANNOTATION_KUBERNETES_AUTH_PROVIDER, ANNOTATION_KUBERNETES_AWS_ASSUME_ROLE, ANNOTATION_KUBERNETES_AWS_CLUSTER_ID, ANNOTATION_KUBERNETES_AWS_EXTERNAL_ID, ANNOTATION_KUBERNETES_DASHBOARD_APP, ANNOTATION_KUBERNETES_DASHBOARD_PARAMETERS, ANNOTATION_KUBERNETES_DASHBOARD_URL, ANNOTATION_KUBERNETES_OIDC_TOKEN_PROVIDER, ANNOTATION_KUBERNETES_SKIP_METRICS_LOOKUP, ANNOTATION_KUBERNETES_SKIP_TLS_VERIFY, type AuthProviderType, type ClientContainerStatus, type ClientCurrentResourceUsage, type ClientPodStatus, type ClusterAttributes, type ClusterObjects, type ConfigMapFetchResponse, type CronJobsFetchResponse, type CustomObjectsByEntityRequest, type CustomResourceFetchResponse, type CustomResourceMatcher, type DaemonSetsFetchResponse, type DeploymentFetchResponse, type DeploymentResources, type DetectedError, type DetectedErrorsByCluster, type DocsSolution, type ErrorMapper, type ErrorSeverity, type EventsSolution, type FetchResponse, type GroupedResponses, type HorizontalPodAutoscalersFetchResponse, type IngressesFetchResponse, type JobsFetchResponse, type KubernetesErrorTypes, type KubernetesFetchError, type KubernetesRequestAuth, type KubernetesRequestBody, type LimitRangeFetchResponse, type LogSolution, type ObjectsByEntityResponse, type PodFetchResponse, type PodStatusFetchResponse, type ProposedFix, type ProposedFixBase, type RawFetchError, type ReplicaSetsFetchResponse, type ResourceQuotaFetchResponse, type ResourceRef, type SecretsFetchResponse, type ServiceFetchResponse, type StatefulSetsFetchResponse, type StatusError, type WorkloadsByEntityRequest, detectErrors, groupResponses, kubernetesPermissions, kubernetesProxyPermission };
389
+ export { ANNOTATION_KUBERNETES_API_SERVER, ANNOTATION_KUBERNETES_API_SERVER_CA, ANNOTATION_KUBERNETES_AUTH_PROVIDER, ANNOTATION_KUBERNETES_AWS_ASSUME_ROLE, ANNOTATION_KUBERNETES_AWS_CLUSTER_ID, ANNOTATION_KUBERNETES_AWS_EXTERNAL_ID, ANNOTATION_KUBERNETES_DASHBOARD_APP, ANNOTATION_KUBERNETES_DASHBOARD_PARAMETERS, ANNOTATION_KUBERNETES_DASHBOARD_URL, ANNOTATION_KUBERNETES_OIDC_TOKEN_PROVIDER, ANNOTATION_KUBERNETES_SKIP_METRICS_LOOKUP, ANNOTATION_KUBERNETES_SKIP_TLS_VERIFY, type AuthProviderType, type ClientContainerStatus, type ClientCurrentResourceUsage, type ClientPodStatus, type ClusterAttributes, type ClusterObjects, type ConfigMapFetchResponse, type CronJobsFetchResponse, type CustomObjectsByEntityRequest, type CustomResourceFetchResponse, type CustomResourceMatcher, type DaemonSetsFetchResponse, type DeploymentFetchResponse, type DeploymentResources, type DetectedError, type DetectedErrorsByCluster, type DocsSolution, type ErrorMapper, type ErrorSeverity, type EventsSolution, type FetchResponse, type GroupedResponses, type HorizontalPodAutoscalersFetchResponse, type IngressesFetchResponse, type JobsFetchResponse, type KubernetesErrorTypes, type KubernetesFetchError, type KubernetesRequestAuth, type KubernetesRequestBody, type LimitRangeFetchResponse, type LogSolution, type ObjectsByEntityResponse, type PodFetchResponse, type PodStatusFetchResponse, type ProposedFix, type ProposedFixBase, type RawFetchError, type ReplicaSetsFetchResponse, type ResourceQuotaFetchResponse, type ResourceRef, type SecretsFetchResponse, type ServiceFetchResponse, type StatefulSetsFetchResponse, type StatusError, type WorkloadsByEntityRequest, detectErrors, groupResponses, kubernetesClustersReadPermission, kubernetesPermissions, kubernetesProxyPermission, kubernetesResourcesReadPermission };
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { ANNOTATION_KUBERNETES_API_SERVER, ANNOTATION_KUBERNETES_API_SERVER_CA, ANNOTATION_KUBERNETES_AUTH_PROVIDER, ANNOTATION_KUBERNETES_AWS_ASSUME_ROLE, ANNOTATION_KUBERNETES_AWS_CLUSTER_ID, ANNOTATION_KUBERNETES_AWS_EXTERNAL_ID, ANNOTATION_KUBERNETES_DASHBOARD_APP, ANNOTATION_KUBERNETES_DASHBOARD_PARAMETERS, ANNOTATION_KUBERNETES_DASHBOARD_URL, ANNOTATION_KUBERNETES_OIDC_TOKEN_PROVIDER, ANNOTATION_KUBERNETES_SKIP_METRICS_LOOKUP, ANNOTATION_KUBERNETES_SKIP_TLS_VERIFY } from './catalog-entity-constants.esm.js';
2
2
  export { SERVICEACCOUNT_CA_PATH } from './certificate-authority-constants.esm.js';
3
- export { kubernetesPermissions, kubernetesProxyPermission } from './permissions.esm.js';
3
+ export { kubernetesClustersReadPermission, kubernetesPermissions, kubernetesProxyPermission, kubernetesResourcesReadPermission } from './permissions.esm.js';
4
4
  export { detectErrors } from './error-detection/error-detection.esm.js';
5
5
  export { groupResponses } from './util/response.esm.js';
6
6
  //# sourceMappingURL=index.esm.js.map
@@ -6,8 +6,26 @@ const kubernetesProxyPermission = pluginPermissionCommon.createPermission({
6
6
  name: "kubernetes.proxy",
7
7
  attributes: {}
8
8
  });
9
- const kubernetesPermissions = [kubernetesProxyPermission];
9
+ const kubernetesResourcesReadPermission = pluginPermissionCommon.createPermission({
10
+ name: "kubernetes.resources.read",
11
+ attributes: {
12
+ action: "read"
13
+ }
14
+ });
15
+ const kubernetesClustersReadPermission = pluginPermissionCommon.createPermission({
16
+ name: "kubernetes.clusters.read",
17
+ attributes: {
18
+ action: "read"
19
+ }
20
+ });
21
+ const kubernetesPermissions = [
22
+ kubernetesProxyPermission,
23
+ kubernetesResourcesReadPermission,
24
+ kubernetesClustersReadPermission
25
+ ];
10
26
 
27
+ exports.kubernetesClustersReadPermission = kubernetesClustersReadPermission;
11
28
  exports.kubernetesPermissions = kubernetesPermissions;
12
29
  exports.kubernetesProxyPermission = kubernetesProxyPermission;
30
+ exports.kubernetesResourcesReadPermission = kubernetesResourcesReadPermission;
13
31
  //# sourceMappingURL=permissions.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.cjs.js","sources":["../src/permissions.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createPermission } from '@backstage/plugin-permission-common';\n\n/** This permission is used to check access to the proxy endpoint\n * @public\n */\nexport const kubernetesProxyPermission = createPermission({\n name: 'kubernetes.proxy',\n attributes: {},\n});\n\n/**\n * List of all Kubernetes permissions.\n * @public\n */\nexport const kubernetesPermissions = [kubernetesProxyPermission];\n"],"names":["createPermission"],"mappings":";;;;AAqBO,MAAM,4BAA4BA,uCAAiB,CAAA;AAAA,EACxD,IAAM,EAAA,kBAAA;AAAA,EACN,YAAY;AACd,CAAC;AAMY,MAAA,qBAAA,GAAwB,CAAC,yBAAyB;;;;;"}
1
+ {"version":3,"file":"permissions.cjs.js","sources":["../src/permissions.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createPermission } from '@backstage/plugin-permission-common';\n\n/** This permission is used to check access to the proxy endpoint\n * @public\n */\nexport const kubernetesProxyPermission = createPermission({\n name: 'kubernetes.proxy',\n attributes: {},\n});\n\n/** This permission is used to check access to the /resources and /services/:serviceId endpoints\n * @public\n */\nexport const kubernetesResourcesReadPermission = createPermission({\n name: 'kubernetes.resources.read',\n attributes: {\n action: 'read',\n },\n});\n\n/** This permission is used to check access to the /clusters endpoint\n * @public\n */\nexport const kubernetesClustersReadPermission = createPermission({\n name: 'kubernetes.clusters.read',\n attributes: {\n action: 'read',\n },\n});\n\n/**\n * List of all Kubernetes permissions.\n * @public\n */\nexport const kubernetesPermissions = [\n kubernetesProxyPermission,\n kubernetesResourcesReadPermission,\n kubernetesClustersReadPermission,\n];\n"],"names":["createPermission"],"mappings":";;;;AAqBO,MAAM,4BAA4BA,uCAAiB,CAAA;AAAA,EACxD,IAAM,EAAA,kBAAA;AAAA,EACN,YAAY;AACd,CAAC;AAKM,MAAM,oCAAoCA,uCAAiB,CAAA;AAAA,EAChE,IAAM,EAAA,2BAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA;AAAA;AAEZ,CAAC;AAKM,MAAM,mCAAmCA,uCAAiB,CAAA;AAAA,EAC/D,IAAM,EAAA,0BAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA;AAAA;AAEZ,CAAC;AAMM,MAAM,qBAAwB,GAAA;AAAA,EACnC,yBAAA;AAAA,EACA,iCAAA;AAAA,EACA;AACF;;;;;;;"}
@@ -4,7 +4,23 @@ const kubernetesProxyPermission = createPermission({
4
4
  name: "kubernetes.proxy",
5
5
  attributes: {}
6
6
  });
7
- const kubernetesPermissions = [kubernetesProxyPermission];
7
+ const kubernetesResourcesReadPermission = createPermission({
8
+ name: "kubernetes.resources.read",
9
+ attributes: {
10
+ action: "read"
11
+ }
12
+ });
13
+ const kubernetesClustersReadPermission = createPermission({
14
+ name: "kubernetes.clusters.read",
15
+ attributes: {
16
+ action: "read"
17
+ }
18
+ });
19
+ const kubernetesPermissions = [
20
+ kubernetesProxyPermission,
21
+ kubernetesResourcesReadPermission,
22
+ kubernetesClustersReadPermission
23
+ ];
8
24
 
9
- export { kubernetesPermissions, kubernetesProxyPermission };
25
+ export { kubernetesClustersReadPermission, kubernetesPermissions, kubernetesProxyPermission, kubernetesResourcesReadPermission };
10
26
  //# sourceMappingURL=permissions.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.esm.js","sources":["../src/permissions.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createPermission } from '@backstage/plugin-permission-common';\n\n/** This permission is used to check access to the proxy endpoint\n * @public\n */\nexport const kubernetesProxyPermission = createPermission({\n name: 'kubernetes.proxy',\n attributes: {},\n});\n\n/**\n * List of all Kubernetes permissions.\n * @public\n */\nexport const kubernetesPermissions = [kubernetesProxyPermission];\n"],"names":[],"mappings":";;AAqBO,MAAM,4BAA4B,gBAAiB,CAAA;AAAA,EACxD,IAAM,EAAA,kBAAA;AAAA,EACN,YAAY;AACd,CAAC;AAMY,MAAA,qBAAA,GAAwB,CAAC,yBAAyB;;;;"}
1
+ {"version":3,"file":"permissions.esm.js","sources":["../src/permissions.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createPermission } from '@backstage/plugin-permission-common';\n\n/** This permission is used to check access to the proxy endpoint\n * @public\n */\nexport const kubernetesProxyPermission = createPermission({\n name: 'kubernetes.proxy',\n attributes: {},\n});\n\n/** This permission is used to check access to the /resources and /services/:serviceId endpoints\n * @public\n */\nexport const kubernetesResourcesReadPermission = createPermission({\n name: 'kubernetes.resources.read',\n attributes: {\n action: 'read',\n },\n});\n\n/** This permission is used to check access to the /clusters endpoint\n * @public\n */\nexport const kubernetesClustersReadPermission = createPermission({\n name: 'kubernetes.clusters.read',\n attributes: {\n action: 'read',\n },\n});\n\n/**\n * List of all Kubernetes permissions.\n * @public\n */\nexport const kubernetesPermissions = [\n kubernetesProxyPermission,\n kubernetesResourcesReadPermission,\n kubernetesClustersReadPermission,\n];\n"],"names":[],"mappings":";;AAqBO,MAAM,4BAA4B,gBAAiB,CAAA;AAAA,EACxD,IAAM,EAAA,kBAAA;AAAA,EACN,YAAY;AACd,CAAC;AAKM,MAAM,oCAAoC,gBAAiB,CAAA;AAAA,EAChE,IAAM,EAAA,2BAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA;AAAA;AAEZ,CAAC;AAKM,MAAM,mCAAmC,gBAAiB,CAAA;AAAA,EAC/D,IAAM,EAAA,0BAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,MAAQ,EAAA;AAAA;AAEZ,CAAC;AAMM,MAAM,qBAAwB,GAAA;AAAA,EACnC,yBAAA;AAAA,EACA,iCAAA;AAAA,EACA;AACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-kubernetes-common",
3
- "version": "0.9.3-next.0",
3
+ "version": "0.9.3",
4
4
  "description": "Common functionalities for kubernetes, to be shared between kubernetes and kubernetes-backend plugin",
5
5
  "backstage": {
6
6
  "role": "common-library",
@@ -52,16 +52,16 @@
52
52
  ]
53
53
  },
54
54
  "dependencies": {
55
- "@backstage/catalog-model": "1.7.3",
56
- "@backstage/plugin-permission-common": "0.8.4",
57
- "@backstage/types": "1.2.1",
55
+ "@backstage/catalog-model": "^1.7.3",
56
+ "@backstage/plugin-permission-common": "^0.8.4",
57
+ "@backstage/types": "^1.2.1",
58
58
  "@kubernetes/client-node": "1.0.0-rc7",
59
59
  "kubernetes-models": "^4.3.1",
60
60
  "lodash": "^4.17.21",
61
61
  "luxon": "^3.0.0"
62
62
  },
63
63
  "devDependencies": {
64
- "@backstage/cli": "0.30.0-next.0"
64
+ "@backstage/cli": "^0.30.0"
65
65
  },
66
66
  "typesVersions": {
67
67
  "*": {