diff --git a/api/ks-openapi-spec/swagger.json b/api/ks-openapi-spec/swagger.json index a5936fd49..e3bb9106f 100644 --- a/api/ks-openapi-spec/swagger.json +++ b/api/ks-openapi-spec/swagger.json @@ -933,6 +933,32 @@ } } }, + "/kapis/cluster.kubesphere.io/v1alpha1/clusters/{cluster}/kubeconfig": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "Multi-cluster" + ], + "summary": "Update cluster kubeconfig.", + "operationId": "updateKubeConfig", + "parameters": [ + { + "type": "string", + "description": "Name of the cluster.", + "name": "cluster", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok" + } + } + } + }, "/kapis/devops.kubesphere.io/v1alpha2/{path}": { "get": { "produces": [ @@ -2017,7 +2043,7 @@ "Authentication" ], "summary": "KubeSphere APIs support token-based authentication via the Authtoken request header. The POST Login API is used to retrieve the authentication token. After the authentication token is obtained, it must be inserted into the Authtoken header for all requests.", - "operationId": "Login", + "operationId": "login", "deprecated": true, "parameters": [ { @@ -3754,6 +3780,35 @@ } } }, + "/kapis/monitoring.kubesphere.io/v1alpha3/clusterdashboards/{grafanaDashboardName}/template": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Dashboard" + ], + "summary": "Convert Grafana templates to KubeSphere clusterdashboards.", + "operationId": "handleGrafanaDashboardImport", + "parameters": [ + { + "type": "string", + "description": "The name of the Grafana template to be converted", + "name": "grafanaDashboardName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.ClusterDashboard" + } + } + } + } + }, "/kapis/monitoring.kubesphere.io/v1alpha3/components/{component}": { "get": { "produces": [ @@ -3979,6 +4034,239 @@ } } }, + "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/dashboards/{grafanaDashboardName}/template": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Dashboard" + ], + "summary": "Convert Grafana templates to KubeSphere dashboards.", + "operationId": "handleGrafanaDashboardImport", + "parameters": [ + { + "type": "string", + "description": "The name of the Grafana template to be converted", + "name": "grafanaDashboardName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the project", + "name": "namespace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/v1alpha2.Dashboard" + } + } + } + } + }, + "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/ingresses": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Ingress Metrics" + ], + "summary": "Get Ingress-level metric data of the specific namespace's Ingresses.", + "operationId": "handleIngressMetricsQuery", + "parameters": [ + { + "type": "string", + "description": "The name of the namespace.", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The job name filter. Ingress could be served by multi Ingress controllers, The job filters metric from a specific controller.", + "name": "job", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "The pod name filter.", + "name": "pod", + "in": "query" + }, + { + "type": "string", + "description": "The duration is the time window of Range Vector. The format is [0-9]+[smhdwy]. Defaults to 5m (i.e. 5 min).", + "name": "duration", + "in": "query" + }, + { + "type": "string", + "description": "The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both PVC available and used inodes: `pvc_inodes_available|pvc_inodes_used`. View available metrics at [kubesphere.io](https://docs.kubesphere.io/advanced-v2.0/zh-CN/api-reference/monitoring-metrics/).", + "name": "metrics_filter", + "in": "query" + }, + { + "type": "string", + "description": "The PVC filter consists of a regexp pattern. It specifies which PVC data to return. For example, the following filter matches any pod whose name begins with redis: `redis.*`.", + "name": "resources_filter", + "in": "query" + }, + { + "type": "string", + "description": "Start time of query. Use **start** and **end** to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200. ", + "name": "start", + "in": "query" + }, + { + "type": "string", + "description": "End time of query. Use **start** and **end** to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200. ", + "name": "end", + "in": "query" + }, + { + "type": "string", + "default": "10m", + "description": "Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both **start** and **end** are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).", + "name": "step", + "in": "query" + }, + { + "type": "string", + "description": "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.", + "name": "time", + "in": "query" + }, + { + "type": "string", + "description": "Sort PVCs by the specified metric. Not applicable if **start** and **end** are provided.", + "name": "sort_metric", + "in": "query" + }, + { + "type": "string", + "default": "desc.", + "description": "Sort order. One of asc, desc.", + "name": "sort_type", + "in": "query" + }, + { + "type": "integer", + "description": "The page number. This field paginates result data of each metric, then returns a specific page. For example, setting **page** to 2 returns the second page. It only applies to sorted metric data.", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "default": 5, + "description": "Page size, the maximum number of results in a single page. Defaults to 5.", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/monitoring.Metrics" + } + } + } + } + }, + "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/ingresses/{ingress}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Ingress Metrics" + ], + "summary": "Get Ingress-level metric data of a specific Ingress. Navigate to the Ingress by the Ingress's namespace.", + "operationId": "handleIngressMetricsQuery", + "parameters": [ + { + "type": "string", + "description": "The name of the namespace.", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "ingress name.", + "name": "ingress", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The job name filter. Ingress could be served by multi Ingress controllers, The job filters metric from a specific controller.", + "name": "job", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "The pod filter.", + "name": "pod", + "in": "query" + }, + { + "type": "string", + "description": "The duration is the time window of Range Vector. The format is [0-9]+[smhdwy]. Defaults to 5m (i.e. 5 min).", + "name": "duration", + "in": "query" + }, + { + "type": "string", + "description": "The metric name filter consists of a regexp pattern. It specifies which metric data to return. For example, the following filter matches both PVC available and used inodes: `pvc_inodes_available|pvc_inodes_used`. View available metrics at [kubesphere.io](https://docs.kubesphere.io/advanced-v2.0/zh-CN/api-reference/monitoring-metrics/).", + "name": "metrics_filter", + "in": "query" + }, + { + "type": "string", + "description": "Start time of query. Use **start** and **end** to retrieve metric data over a time span. It is a string with Unix time format, eg. 1559347200. ", + "name": "start", + "in": "query" + }, + { + "type": "string", + "description": "End time of query. Use **start** and **end** to retrieve metric data over a time span. It is a string with Unix time format, eg. 1561939200. ", + "name": "end", + "in": "query" + }, + { + "type": "string", + "default": "10m", + "description": "Time interval. Retrieve metric data at a fixed interval within the time range of start and end. It requires both **start** and **end** are provided. The format is [0-9]+[smhdwy]. Defaults to 10m (i.e. 10 min).", + "name": "step", + "in": "query" + }, + { + "type": "string", + "description": "A timestamp in Unix time format. Retrieve metric data at a single point in time. Defaults to now. Time and the combination of start, end, step are mutually exclusive.", + "name": "time", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/monitoring.Metrics" + } + } + } + } + }, "/kapis/monitoring.kubesphere.io/v1alpha3/namespaces/{namespace}/persistentvolumeclaims": { "get": { "produces": [ @@ -9774,6 +10062,7 @@ ], "summary": "List router of a specified project", "operationId": "handleGetRouter", + "deprecated": true, "parameters": [ { "type": "string", @@ -9801,6 +10090,7 @@ ], "summary": "Update a router for a specified project", "operationId": "handleUpdateRouter", + "deprecated": true, "parameters": [ { "type": "string", @@ -9828,6 +10118,7 @@ ], "summary": "Create a router for a specified project", "operationId": "handleCreateRouter", + "deprecated": true, "parameters": [ { "type": "string", @@ -9855,6 +10146,7 @@ ], "summary": "List router of a specified project", "operationId": "handleDeleteRouter", + "deprecated": true, "parameters": [ { "type": "string", @@ -10314,7 +10606,7 @@ } } }, - "/kapis/resources.kubesphere.io/v1alpha3/namespaces/{namespace}/registrysecrets/{secret}": { + "/kapis/resources.kubesphere.io/v1alpha3/namespaces/{namespace}/registrysecrets/{secret}/verify": { "post": { "produces": [ "application/json" @@ -10334,7 +10626,7 @@ }, { "type": "string", - "description": "Secret name of the image repository credential to create", + "description": "Name of the secret name", "name": "secret", "in": "path", "required": true @@ -10358,7 +10650,7 @@ "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/v1.Secret" } } } @@ -12831,6 +13123,49 @@ } } }, + "/kapis/terminal.kubesphere.io/v1alpha2/nodes/{nodename}/exec": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Terminal" + ], + "summary": "create shell access to node session", + "operationId": "handleShellAccessToNode", + "parameters": [ + { + "type": "string", + "description": "name of cluster node", + "name": "nodename", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/oauth/.well-known/openid-configuration": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "summary": "The OpenID Provider's configuration information can be retrieved.", + "operationId": "discovery", + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/oauth/authenticate": { "post": { "consumes": [ @@ -12843,7 +13178,7 @@ "Authentication" ], "summary": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", - "operationId": "TokenReview", + "operationId": "tokenReview", "parameters": [ { "name": "body", @@ -12875,8 +13210,8 @@ "tags": [ "Authentication" ], - "summary": "All requests for OAuth tokens involve a request to /oauth/authorize.", - "operationId": "Authorize", + "summary": "The authorization endpoint is used to interact with the resource owner and obtain an authorization grant.", + "operationId": "authorize", "parameters": [ { "type": "string", @@ -12887,24 +13222,82 @@ }, { "type": "string", - "description": "The client identifier issued to the client during the registration process described by [RFC6749] Section 2.2.", + "description": "OAuth 2.0 Client Identifier valid at the Authorization Server.", "name": "client_id", "in": "query", "required": true }, { "type": "string", - "description": "After completing its interaction with the resource owner, the authorization server directs the resource owner's user-agent back to the client.The redirection endpoint URI MUST be an absolute URI as defined by [RFC3986] Section 4.3.", + "description": "Redirection URI to which the response will be sent. This URI MUST exactly match one of the Redirection URI values for the Client pre-registered at the OpenID Provider.", "name": "redirect_uri", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "OpenID Connect requests MUST contain the openid scope value. If the openid scope value is not present, the behavior is entirely unspecified.", + "name": "scope", + "in": "query" + }, + { + "type": "string", + "description": "Opaque value used to maintain state between the request and the callback.", + "name": "state", "in": "query" } ], "responses": { - "302": { - "description": "Found", - "schema": { - "type": "string" - } + "200": { + "description": "OK" + } + } + }, + "post": { + "consumes": [ + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Authentication" + ], + "summary": "The authorization endpoint is used to interact with the resource owner and obtain an authorization grant.", + "operationId": "authorize", + "parameters": [ + { + "description": "The value MUST be one of \"code\" for requesting an authorization code as described by [RFC6749] Section 4.1.1, \"token\" for requesting an access token (implicit grant) as described by [RFC6749] Section 4.2.2.", + "name": "response_type", + "in": "body", + "required": true + }, + { + "description": "OAuth 2.0 Client Identifier valid at the Authorization Server.", + "name": "client_id", + "in": "body", + "required": true + }, + { + "description": "Redirection URI to which the response will be sent. This URI MUST exactly match one of the Redirection URI values for the Client pre-registered at the OpenID Provider.", + "name": "redirect_uri", + "in": "body", + "required": true + }, + { + "description": "OpenID Connect requests MUST contain the openid scope value. If the openid scope value is not present, the behavior is entirely unspecified.", + "name": "scope", + "in": "body" + }, + { + "description": "Opaque value used to maintain state between the request and the callback.", + "name": "state", + "in": "body" + } + ], + "responses": { + "200": { + "description": "OK" } } } @@ -12967,6 +13360,23 @@ } } }, + "/oauth/keys": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "summary": "OP's JSON Web Key Set [JWK] document.", + "operationId": "keys", + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/oauth/logout": { "get": { "consumes": [ @@ -12979,7 +13389,7 @@ "Authentication" ], "summary": "This endpoint takes an ID token and logs the user out of KubeSphere if the subject matches the current session.", - "operationId": "Logout", + "operationId": "logout", "parameters": [ { "type": "string", @@ -13022,28 +13432,46 @@ "Authentication" ], "summary": "The resource owner password credentials grant type is suitable in\ncases where the resource owner has a trust relationship with the\nclient, such as the device operating system or a highly privileged application.", - "operationId": "Token", + "operationId": "token", "parameters": [ { "type": "string", - "description": "Value MUST be set to \"password\".", + "description": "OAuth defines four grant types: authorization code, implicit, resource owner password credentials, and client credentials.", "name": "grant_type", "in": "formData", "required": true }, + { + "type": "string", + "description": "Valid client credential.", + "name": "client_id", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "Valid client credential.", + "name": "client_secret", + "in": "formData", + "required": true + }, { "type": "string", "description": "The resource owner username.", "name": "username", - "in": "formData", - "required": true + "in": "formData" }, { "type": "string", "description": "The resource owner password.", "name": "password", - "in": "formData", - "required": true + "in": "formData" + }, + { + "type": "string", + "description": "Valid authorization code.", + "name": "code", + "in": "formData" } ], "responses": { @@ -13055,9 +13483,85 @@ } } } + }, + "/oauth/userinfo": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "summary": "UserInfo Endpoint is an OAuth 2.0 Protected Resource that returns Claims about the authenticated End-User.", + "operationId": "userinfo", + "responses": { + "200": { + "description": "OK" + } + } + } } }, "definitions": { + "anotations.Annotation": { + "properties": { + "datasource": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "expr": { + "type": "string" + }, + "iconColor": { + "type": "string" + }, + "iconSize": { + "type": "integer", + "format": "integer" + }, + "lineColor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "query": { + "type": "string" + }, + "showLine": { + "type": "boolean" + }, + "step": { + "type": "string" + }, + "tagKeys": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "tagsField": { + "type": "string" + }, + "textField": { + "type": "string" + }, + "textFormat": { + "type": "string" + }, + "titleFormat": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, "api.ListResult": { "required": [ "items", @@ -13520,14 +14024,14 @@ }, "metering.OpenPitrixStatistic": { "required": [ + "net_bytes_transmitted", + "net_bytes_received", + "pvc_bytes_total", "deployments", "statefulsets", "daemonsets", "cpu_usage", - "memory_usage_wo_cache", - "net_bytes_transmitted", - "net_bytes_received", - "pvc_bytes_total" + "memory_usage_wo_cache" ], "properties": { "cpu_usage": { @@ -13999,6 +14503,9 @@ "type": "integer", "format": "int32" }, + "id_token": { + "type": "string" + }, "refresh_token": { "type": "string" }, @@ -14573,7 +15080,8 @@ }, "openpitrix.CreateRepoRequest": { "required": [ - "providers" + "providers", + "sync_period" ], "properties": { "app_default_status": { @@ -14597,6 +15105,9 @@ "type": "string" } }, + "sync_period": { + "type": "string" + }, "type": { "type": "string" }, @@ -14706,6 +15217,7 @@ }, "openpitrix.ModifyRepoRequest": { "required": [ + "sync_period", "providers" ], "properties": { @@ -14730,6 +15242,9 @@ "type": "string" } }, + "sync_period": { + "type": "string" + }, "type": { "type": "string" }, @@ -14811,6 +15326,9 @@ "status_time": { "type": "string" }, + "sync_period": { + "type": "string" + }, "type": { "type": "string" }, @@ -14917,6 +15435,226 @@ } } }, + "panels.Axis": { + "properties": { + "decimals": { + "type": "integer", + "format": "int64" + }, + "format": { + "type": "string" + } + } + }, + "panels.BarGaugeOptions": { + "properties": { + "colorMode": { + "type": "string" + }, + "content": { + "type": "string" + }, + "displayMode": { + "type": "string" + }, + "graphMode": { + "type": "string" + }, + "justifyMode": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "orientation": { + "type": "string" + }, + "textMode": { + "type": "string" + } + } + }, + "panels.BarGaugePanel": { + "properties": { + "options": { + "$ref": "#/definitions/panels.BarGaugeOptions" + } + } + }, + "panels.Gauge": { + "properties": { + "maxValue": { + "type": "integer", + "format": "int64" + }, + "minValue": { + "type": "integer", + "format": "int64" + }, + "show": { + "type": "boolean" + }, + "thresholdLabels": { + "type": "boolean" + }, + "thresholdMarkers": { + "type": "boolean" + } + } + }, + "panels.GraphPanel": { + "properties": { + "bars": { + "type": "boolean" + }, + "lines": { + "type": "boolean" + }, + "stack": { + "type": "boolean" + }, + "xaxis": { + "$ref": "#/definitions/panels.Axis" + }, + "yaxes": { + "type": "array", + "items": { + "$ref": "#/definitions/panels.Axis" + } + } + } + }, + "panels.Panel": { + "required": [ + "GraphPanel", + "SinglestatPanel", + "TablePanel", + "TextPanel", + "BarGaugePanel" + ], + "properties": { + "BarGaugePanel": { + "$ref": "#/definitions/panels.BarGaugePanel" + }, + "GraphPanel": { + "$ref": "#/definitions/panels.GraphPanel" + }, + "SinglestatPanel": { + "$ref": "#/definitions/panels.SinglestatPanel" + }, + "TablePanel": { + "$ref": "#/definitions/panels.TablePanel" + }, + "TextPanel": { + "$ref": "#/definitions/panels.TextPanel" + }, + "colors": { + "type": "array", + "items": { + "type": "string" + } + }, + "datasource": { + "type": "string" + }, + "decimals": { + "type": "integer", + "format": "int64" + }, + "description": { + "type": "string" + }, + "format": { + "type": "string" + }, + "height": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "legend": { + "type": "array", + "items": { + "type": "string" + } + }, + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/panels.Target" + } + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "panels.SinglestatPanel": { + "properties": { + "gauge": { + "$ref": "#/definitions/panels.Gauge" + }, + "sparkline": { + "type": "string" + }, + "valueName": { + "type": "string" + } + } + }, + "panels.Sort": { + "properties": { + "col": { + "type": "integer", + "format": "int32" + }, + "desc": { + "type": "boolean" + } + } + }, + "panels.TablePanel": { + "properties": { + "scroll": { + "type": "boolean" + }, + "sort": { + "$ref": "#/definitions/panels.Sort" + } + } + }, + "panels.Target": { + "properties": { + "expr": { + "type": "string" + }, + "legendFormat": { + "type": "string" + }, + "refId": { + "type": "integer", + "format": "int64" + }, + "step": { + "type": "string" + } + } + }, + "panels.TextPanel": { + "properties": { + "content": { + "type": "string" + }, + "mode": { + "type": "string" + } + } + }, "registries.Config": { "properties": { "ArgsEscaped": { @@ -15327,6 +16065,77 @@ } }, "runtime.Object": {}, + "templatings.Option": { + "properties": { + "selected": { + "type": "boolean" + }, + "text": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "templatings.TemplateVar": { + "properties": { + "allFormat": { + "type": "string" + }, + "allValue": { + "type": "string" + }, + "auto": { + "type": "boolean" + }, + "auto_count": { + "type": "integer", + "format": "int32" + }, + "datasource": { + "type": "string" + }, + "hide": { + "type": "integer", + "format": "byte" + }, + "includeAll": { + "type": "boolean" + }, + "label": { + "type": "string" + }, + "multi": { + "type": "boolean" + }, + "multiFormat": { + "type": "string" + }, + "name": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/templatings.Option" + } + }, + "query": { + "type": "string" + }, + "regex": { + "type": "string" + }, + "sort": { + "type": "integer", + "format": "int32" + }, + "type": { + "type": "string" + } + } + }, "v1.AWSElasticBlockStoreVolumeSource": { "description": "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", "required": [ @@ -19786,6 +20595,24 @@ } } }, + "v1alpha2.ClusterDashboard": { + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1alpha2.DashboardSpec" + } + } + }, "v1alpha2.Column": { "required": [ "id", @@ -19952,6 +20779,80 @@ } } }, + "v1alpha2.Dashboard": { + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1alpha2.DashboardSpec" + } + } + }, + "v1alpha2.DashboardSpec": { + "properties": { + "annotations": { + "type": "array", + "items": { + "$ref": "#/definitions/anotations.Annotation" + } + }, + "auto_refresh": { + "type": "string" + }, + "description": { + "type": "string" + }, + "editable": { + "type": "boolean" + }, + "id": { + "type": "integer", + "format": "integer" + }, + "panels": { + "type": "array", + "items": { + "$ref": "#/definitions/panels.Panel" + } + }, + "shared_crosshair": { + "type": "boolean" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "templatings": { + "type": "array", + "items": { + "$ref": "#/definitions/templatings.TemplateVar" + } + }, + "time": { + "$ref": "#/definitions/time.Time" + }, + "timezone": { + "type": "string" + }, + "title": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, "v1alpha2.GlobalRole": { "required": [ "rules" @@ -20180,10 +21081,10 @@ }, "v1alpha2.Node": { "required": [ - "id", - "labelMinor", "rank", + "id", "label", + "labelMinor", "controls" ], "properties": { @@ -20291,10 +21192,10 @@ }, "v1alpha2.NodeSummary": { "required": [ - "id", - "label", "labelMinor", - "rank" + "rank", + "id", + "label" ], "properties": { "adjacency": { diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 5f06088f6..0509f2cfe 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -10720,6 +10720,10 @@ "description": "Desired state of the cluster", "type": "boolean" }, + "externalKubeAPIEnabled": { + "description": "ExternalKubeAPIEnabled export kubeapiserver to public use a lb type service if connection type is proxy", + "type": "boolean" + }, "joinFederation": { "description": "Join cluster as a kubefed cluster", "type": "boolean" @@ -10779,6 +10783,10 @@ "io.kubesphere.api.cluster.v1alpha1.Connection": { "type": "object", "properties": { + "externalKubernetesAPIEndpoint": { + "description": "External Kubernetes API Server endpoint Will be populated by ks-apiserver if connection type is proxy and ExternalKubeAPIEnabled is true.", + "type": "string" + }, "kubeconfig": { "description": "KubeConfig content used to connect to cluster api server Should provide this field explicitly if connection type is direct. Will be populated by ks-proxy if connection type is proxy.", "type": "string", diff --git a/config/crds/application.kubesphere.io_helmapplications.yaml b/config/crds/application.kubesphere.io_helmapplications.yaml index 89bb4327d..3a1027238 100644 --- a/config/crds/application.kubesphere.io_helmapplications.yaml +++ b/config/crds/application.kubesphere.io_helmapplications.yaml @@ -37,10 +37,14 @@ spec: description: HelmApplication is the Schema for the helmapplications API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -73,10 +77,13 @@ spec: description: HelmApplicationStatus defines the observed state of HelmApplication properties: latestVersion: - description: If this application belong to appStore, latestVersion is the the latest version of the active application version. otherwise latestVersion is the latest version of all application version + description: If this application belong to appStore, latestVersion + is the the latest version of the active application version. otherwise + latestVersion is the latest version of all application version type: string state: - description: 'the state of the helm application: draft, submitted, passed, rejected, suspended, active' + description: 'the state of the helm application: draft, submitted, + passed, rejected, suspended, active' type: string statusTime: format: date-time diff --git a/config/crds/application.kubesphere.io_helmapplicationversions.yaml b/config/crds/application.kubesphere.io_helmapplicationversions.yaml index 481c82306..713bd8809 100644 --- a/config/crds/application.kubesphere.io_helmapplicationversions.yaml +++ b/config/crds/application.kubesphere.io_helmapplicationversions.yaml @@ -31,13 +31,18 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: HelmApplicationVersion is the Schema for the helmapplicationversions API + description: HelmApplicationVersion is the Schema for the helmapplicationversions + API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -47,13 +52,15 @@ spec: annotations: additionalProperties: type: string - description: Annotations are additional mappings uninterpreted by Helm, made available for inspection by other applications. + description: Annotations are additional mappings uninterpreted by + Helm, made available for inspection by other applications. type: object apiVersion: description: The API Version of this chart. type: string appVersion: - description: The version of the application enclosed inside of this chart. + description: The version of the application enclosed inside of this + chart. type: string condition: description: The condition to check to enable chart @@ -72,30 +79,39 @@ spec: dependencies: description: Dependencies are a list of dependencies for a chart. items: - description: Dependency describes a chart upon which another chart depends. Dependencies can be used to express developer intent, or to capture the state of a chart. + description: Dependency describes a chart upon which another chart + depends. Dependencies can be used to express developer intent, + or to capture the state of a chart. properties: alias: description: Alias usable alias to be used for the chart type: string condition: - description: A yaml path that resolves to a boolean, used for enabling/disabling charts (e.g. subchart1.enabled ) + description: A yaml path that resolves to a boolean, used for + enabling/disabling charts (e.g. subchart1.enabled ) type: string enabled: description: Enabled bool determines if chart should be loaded type: boolean name: - description: Name is the name of the dependency. This must mach the name in the dependency's Chart.yaml. + description: Name is the name of the dependency. This must mach + the name in the dependency's Chart.yaml. type: string repository: - description: The URL to the repository. Appending `index.yaml` to this string should result in a URL that can be used to fetch the repository index. + description: The URL to the repository. Appending `index.yaml` + to this string should result in a URL that can be used to + fetch the repository index. type: string tags: - description: Tags can be used to group charts for enabling/disabling together + description: Tags can be used to group charts for enabling/disabling + together items: type: string type: array version: - description: Version is the version (range) of this chart. A lock file will always produce a single version, while a dependency may contain a semantic version range. + description: Version is the version (range) of this chart. A + lock file will always produce a single version, while a dependency + may contain a semantic version range. type: string required: - name @@ -112,7 +128,8 @@ spec: description: chart digest type: string home: - description: The URL to a relevant project page, git repo, or contact person + description: The URL to a relevant project page, git repo, or contact + person type: string icon: description: The URL to an icon file. @@ -123,21 +140,25 @@ spec: type: string type: array kubeVersion: - description: KubeVersion is a SemVer constraint specifying the version of Kubernetes required. + description: KubeVersion is a SemVer constraint specifying the version + of Kubernetes required. type: string maintainers: - description: A list of name and URL/email address combinations for the maintainer(s) + description: A list of name and URL/email address combinations for + the maintainer(s) items: description: Maintainer describes a Chart maintainer. properties: email: - description: Email is an optional email address to contact the named maintainer + description: Email is an optional email address to contact the + named maintainer type: string name: description: Name is a user name or organization name type: string url: - description: URL is an optional URL to an address for the named maintainer + description: URL is an optional URL to an address for the named + maintainer type: string type: object type: array @@ -165,7 +186,8 @@ spec: type: string type: object status: - description: HelmApplicationVersionStatus defines the observed state of HelmApplicationVersion + description: HelmApplicationVersionStatus defines the observed state of + HelmApplicationVersion properties: audit: items: @@ -179,7 +201,8 @@ spec: operatorType: type: string state: - description: 'audit state: submitted, passed, draft, active, rejected, suspended' + description: 'audit state: submitted, passed, draft, active, + rejected, suspended' type: string time: description: audit time diff --git a/config/crds/application.kubesphere.io_helmcategories.yaml b/config/crds/application.kubesphere.io_helmcategories.yaml index a7339d454..93d8f890e 100644 --- a/config/crds/application.kubesphere.io_helmcategories.yaml +++ b/config/crds/application.kubesphere.io_helmcategories.yaml @@ -34,10 +34,14 @@ spec: description: HelmCategory is the Schema for the helmcategories API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object diff --git a/config/crds/application.kubesphere.io_helmreleases.yaml b/config/crds/application.kubesphere.io_helmreleases.yaml index a24ebc2ec..936765555 100644 --- a/config/crds/application.kubesphere.io_helmreleases.yaml +++ b/config/crds/application.kubesphere.io_helmreleases.yaml @@ -43,10 +43,14 @@ spec: description: HelmRelease is the Schema for the helmreleases API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -66,7 +70,8 @@ spec: description: The name of the chart which will be installed. type: string chartVersion: - description: Specify the exact chart version to install. If this is not specified, the latest version is installed + description: Specify the exact chart version to install. If this is + not specified, the latest version is installed type: string description: description: Message got from frontend @@ -82,7 +87,9 @@ spec: format: byte type: string version: - description: expected release version, when this version is not equal status.version, the release need upgrade this filed should be modified when any filed of the spec modified. + description: expected release version, when this version is not equal + status.version, the release need upgrade this filed should be modified + when any filed of the spec modified. type: integer required: - chartName @@ -94,7 +101,8 @@ spec: description: HelmReleaseStatus defines the observed state of HelmRelease properties: deployStatus: - description: deploy status list of history, which will store at most 10 state + description: deploy status list of history, which will store at most + 10 state items: properties: deployTime: @@ -102,7 +110,8 @@ spec: format: date-time type: string message: - description: A human readable message indicating details about why the release is in this state. + description: A human readable message indicating details about + why the release is in this state. type: string state: description: current state of the release @@ -121,7 +130,8 @@ spec: format: date-time type: string message: - description: A human readable message indicating details about why the release is in this state. + description: A human readable message indicating details about why + the release is in this state. type: string state: description: current state diff --git a/config/crds/application.kubesphere.io_helmrepos.yaml b/config/crds/application.kubesphere.io_helmrepos.yaml index 6b7586981..017a94318 100644 --- a/config/crds/application.kubesphere.io_helmrepos.yaml +++ b/config/crds/application.kubesphere.io_helmrepos.yaml @@ -40,10 +40,14 @@ spec: description: HelmRepo is the Schema for the helmrepoes API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -56,13 +60,16 @@ spec: accessKeyID: type: string caFile: - description: verify certificates of HTTPS-enabled servers using this CA bundle + description: verify certificates of HTTPS-enabled servers using + this CA bundle type: string certFile: - description: identify HTTPS client using this SSL certificate file + description: identify HTTPS client using this SSL certificate + file type: string insecureSkipTLSVerify: - description: skip tls certificate checks for the repository, default is ture + description: skip tls certificate checks for the repository, default + is ture type: boolean keyFile: description: identify HTTPS client using this SSL key file @@ -83,13 +90,16 @@ spec: description: name of the repo type: string syncPeriod: - description: sync period in seconds, no sync when SyncPeriod=0, the minimum SyncPeriod is 180s + description: sync period in seconds, no sync when SyncPeriod=0, the + minimum SyncPeriod is 180s type: integer url: description: helm repo url type: string version: - description: expected repo version, when this version is not equal status.version, the repo need upgrade this filed should be modified when any filed of the spec modified. + description: expected repo version, when this version is not equal + status.version, the repo need upgrade this filed should be modified + when any filed of the spec modified. type: integer required: - name @@ -109,14 +119,17 @@ spec: description: current state of the repo, successful, failed or syncing type: string syncState: - description: sync state list of history, which will store at most 10 state + description: sync state list of history, which will store at most + 10 state items: properties: message: - description: A human readable message indicating details about why the repo is in this state. + description: A human readable message indicating details about + why the repo is in this state. type: string state: - description: 'last sync state, valid state are: "failed", "success", and ""' + description: 'last sync state, valid state are: "failed", "success", + and ""' type: string syncTime: format: date-time @@ -126,7 +139,8 @@ spec: type: object type: array version: - description: if status.version!=spec.Version, we need sync the repo now + description: if status.version!=spec.Version, we need sync the repo + now type: integer type: object type: object diff --git a/config/crds/iam.kubesphere.io_federatedrolebindings.yaml b/config/crds/iam.kubesphere.io_federatedrolebindings.yaml new file mode 100644 index 000000000..9ff066498 --- /dev/null +++ b/config/crds/iam.kubesphere.io_federatedrolebindings.yaml @@ -0,0 +1,128 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (devel) + creationTimestamp: null + name: federatedrolebindings.iam.kubesphere.io +spec: + group: iam.kubesphere.io + names: + kind: FederatedRoleBinding + listKind: FederatedRoleBindingList + plural: federatedrolebindings + singular: federatedrolebinding + scope: Namespaced + versions: + - name: v1alpha2 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + placement: + properties: + clusterSelector: + properties: + matchLabels: + additionalProperties: + type: string + type: object + type: object + clusters: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + type: object + template: + properties: + metadata: + type: object + roleRef: + description: RoleRef contains information that points to the role + being used + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - apiGroup + - kind + - name + type: object + subjects: + items: + description: Subject contains a reference to the object or user + identities a role binding applies to. This can either hold + a direct API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the referenced + subject. Defaults to "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. Values defined + by this API group are "User", "Group", and "ServiceAccount". + If the Authorizer does not recognized the kind value, + the Authorizer should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If the + object kind is non-namespace, such as "User" or "Group", + and this value is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + type: array + required: + - roleRef + type: object + required: + - placement + - template + type: object + required: + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crds/iam.kubesphere.io_federatedroles.yaml b/config/crds/iam.kubesphere.io_federatedroles.yaml new file mode 100644 index 000000000..20f66f877 --- /dev/null +++ b/config/crds/iam.kubesphere.io_federatedroles.yaml @@ -0,0 +1,125 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (devel) + creationTimestamp: null + name: federatedroles.iam.kubesphere.io +spec: + group: iam.kubesphere.io + names: + kind: FederatedRole + listKind: FederatedRoleList + plural: federatedroles + singular: federatedrole + scope: Namespaced + versions: + - name: v1alpha2 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + placement: + properties: + clusterSelector: + properties: + matchLabels: + additionalProperties: + type: string + type: object + type: object + clusters: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + type: object + template: + properties: + metadata: + type: object + rules: + items: + description: PolicyRule holds information that describes a policy + rule, but does not contain information about who the rule + applies to or which namespace the rule applies to. + properties: + apiGroups: + description: APIGroups is the name of the APIGroup that + contains the resources. If multiple API groups are specified, + any action requested against one of the enumerated resources + in any API group will be allowed. + items: + type: string + type: array + nonResourceURLs: + description: NonResourceURLs is a set of partial urls that + a user should have access to. *s are allowed, but only + as the full, final step in the path Since non-resource + URLs are not namespaced, this field is only applicable + for ClusterRoles referenced from a ClusterRoleBinding. + Rules can either apply to API resources (such as "pods" + or "secrets") or non-resource URL paths (such as "/api"), but + not both. + items: + type: string + type: array + resourceNames: + description: ResourceNames is an optional white list of + names that the rule applies to. An empty set means that + everything is allowed. + items: + type: string + type: array + resources: + description: Resources is a list of resources this rule + applies to. ResourceAll represents all resources. + items: + type: string + type: array + verbs: + description: Verbs is a list of Verbs that apply to ALL + the ResourceKinds and AttributeRestrictions contained + in this rule. VerbAll represents all kinds. + items: + type: string + type: array + required: + - verbs + type: object + type: array + type: object + required: + - placement + - template + type: object + required: + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crds/iam.kubesphere.io_federatedusers.yaml b/config/crds/iam.kubesphere.io_federatedusers.yaml new file mode 100644 index 000000000..1e8162512 --- /dev/null +++ b/config/crds/iam.kubesphere.io_federatedusers.yaml @@ -0,0 +1,139 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (devel) + creationTimestamp: null + name: federatedusers.iam.kubesphere.io +spec: + group: iam.kubesphere.io + names: + kind: FederatedUser + listKind: FederatedUserList + plural: federatedusers + singular: federateduser + scope: Namespaced + versions: + - name: v1alpha2 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + placement: + properties: + clusterSelector: + properties: + matchLabels: + additionalProperties: + type: string + type: object + type: object + clusters: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + type: object + template: + properties: + metadata: + type: object + spec: + description: UserSpec defines the desired state of User + properties: + description: + description: Description of the user. + type: string + displayName: + type: string + email: + description: Unique email address(https://www.ietf.org/rfc/rfc5322.txt). + type: string + groups: + items: + type: string + type: array + lang: + description: The preferred written or spoken language for + the user. + type: string + password: + description: 'password will be encrypted by mutating admission + webhook Password pattern is tricky here. The rule is simple: + length between [6,64], at least one uppercase letter, one + lowercase letter, one digit. The regexp in console(javascript) + is quite straightforward: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{6,64}$ + But in Go, we don''t have ?= (back tracking) capability + in regexp (also in CRD validation pattern) So we adopted + an alternative scheme to achieve. Use 6 different regexp + to combine to achieve the same effect. These six schemes + enumerate the arrangement of numbers, uppercase letters, + and lowercase letters that appear for the first time. - + ^(.*[a-z].*[A-Z].*[0-9].*)$ stands for lowercase letter + comes first, then followed by an uppercase letter, then + a digit. - ^(.*[a-z].*[0-9].*[A-Z].*)$ stands for lowercase + letter comes first, then followed by a digit, then an uppercase + leeter. - ^(.*[A-Z].*[a-z].*[0-9].*)$ ... - ^(.*[A-Z].*[0-9].*[a-z].*)$ + ... - ^(.*[0-9].*[a-z].*[A-Z].*)$ ... - ^(.*[0-9].*[A-Z].*[a-z].*)$ + ... Last but not least, the bcrypt string is also included + to match the encrypted password. ^(\$2[ayb]\$.{56})$' + maxLength: 64 + minLength: 6 + pattern: ^(.*[a-z].*[A-Z].*[0-9].*)$|^(.*[a-z].*[0-9].*[A-Z].*)$|^(.*[A-Z].*[a-z].*[0-9].*)$|^(.*[A-Z].*[0-9].*[a-z].*)$|^(.*[0-9].*[a-z].*[A-Z].*)$|^(.*[0-9].*[A-Z].*[a-z].*)$|^(\$2[ayb]\$.{56})$ + type: string + required: + - email + type: object + status: + description: UserStatus defines the observed state of User + properties: + lastLoginTime: + description: Last login attempt timestamp + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + reason: + type: string + state: + description: The user status + type: string + type: object + required: + - spec + type: object + required: + - placement + - template + type: object + required: + - spec + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crds/iam.kubesphere.io_globalrolebindings.yaml b/config/crds/iam.kubesphere.io_globalrolebindings.yaml index 9f3c1ec40..7d51179f8 100644 --- a/config/crds/iam.kubesphere.io_globalrolebindings.yaml +++ b/config/crds/iam.kubesphere.io_globalrolebindings.yaml @@ -24,15 +24,20 @@ spec: description: GlobalRoleBinding is the Schema for the globalrolebindings API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object roleRef: - description: RoleRef can only reference a GlobalRole. If the RoleRef cannot be resolved, the Authorizer must return an error. + description: RoleRef can only reference a GlobalRole. If the RoleRef cannot + be resolved, the Authorizer must return an error. properties: apiGroup: description: APIGroup is the group for the resource being referenced @@ -49,21 +54,31 @@ spec: - name type: object subjects: - description: Subjects holds references to the objects the role applies to. + description: Subjects holds references to the objects the role applies + to. items: - description: Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. + description: Subject contains a reference to the object or user identities + a role binding applies to. This can either hold a direct API object + reference, or a value for non-objects such as user and group names. properties: apiGroup: - description: APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects. + description: APIGroup holds the API group of the referenced subject. + Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. type: string kind: - description: Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error. + description: Kind of object being referenced. Values defined by + this API group are "User", "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind value, the Authorizer + should report an error. type: string name: description: Name of the object being referenced. type: string namespace: - description: Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error. + description: Namespace of the referenced object. If the object + kind is non-namespace, such as "User" or "Group", and this value + is not empty the Authorizer should report an error. type: string required: - kind diff --git a/config/crds/iam.kubesphere.io_globalroles.yaml b/config/crds/iam.kubesphere.io_globalroles.yaml index 42b31501c..a1b0677fd 100644 --- a/config/crds/iam.kubesphere.io_globalroles.yaml +++ b/config/crds/iam.kubesphere.io_globalroles.yaml @@ -23,40 +23,59 @@ spec: openAPIV3Schema: properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object rules: description: Rules holds all the PolicyRules for this GlobalRole items: - description: PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. + description: PolicyRule holds information that describes a policy rule, + but does not contain information about who the rule applies to or + which namespace the rule applies to. properties: apiGroups: - description: APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. + description: APIGroups is the name of the APIGroup that contains + the resources. If multiple API groups are specified, any action + requested against one of the enumerated resources in any API group + will be allowed. items: type: string type: array nonResourceURLs: - description: NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + description: NonResourceURLs is a set of partial urls that a user + should have access to. *s are allowed, but only as the full, + final step in the path Since non-resource URLs are not namespaced, + this field is only applicable for ClusterRoles referenced from + a ClusterRoleBinding. Rules can either apply to API resources + (such as "pods" or "secrets") or non-resource URL paths (such + as "/api"), but not both. items: type: string type: array resourceNames: - description: ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + description: ResourceNames is an optional white list of names that + the rule applies to. An empty set means that everything is allowed. items: type: string type: array resources: - description: Resources is a list of resources this rule applies to. ResourceAll represents all resources. + description: Resources is a list of resources this rule applies + to. ResourceAll represents all resources. items: type: string type: array verbs: - description: Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. + description: Verbs is a list of Verbs that apply to ALL the ResourceKinds + and AttributeRestrictions contained in this rule. VerbAll represents + all kinds. items: type: string type: array diff --git a/config/crds/iam.kubesphere.io_groupbindings.yaml b/config/crds/iam.kubesphere.io_groupbindings.yaml index 3baac0ef7..e05fa955f 100644 --- a/config/crds/iam.kubesphere.io_groupbindings.yaml +++ b/config/crds/iam.kubesphere.io_groupbindings.yaml @@ -31,7 +31,9 @@ spec: description: GroupBinding is the Schema for the groupbindings API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string groupRef: description: GroupRef defines the desired relation of GroupBinding @@ -44,7 +46,9 @@ spec: type: string type: object kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object diff --git a/config/crds/iam.kubesphere.io_groups.yaml b/config/crds/iam.kubesphere.io_groups.yaml index 1acb7e2f7..100200e51 100644 --- a/config/crds/iam.kubesphere.io_groups.yaml +++ b/config/crds/iam.kubesphere.io_groups.yaml @@ -28,10 +28,14 @@ spec: description: Group is the Schema for the groups API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object diff --git a/config/crds/iam.kubesphere.io_loginrecords.yaml b/config/crds/iam.kubesphere.io_loginrecords.yaml index fd62d1d73..65032708f 100644 --- a/config/crds/iam.kubesphere.io_loginrecords.yaml +++ b/config/crds/iam.kubesphere.io_loginrecords.yaml @@ -42,10 +42,14 @@ spec: openAPIV3Schema: properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object diff --git a/config/crds/iam.kubesphere.io_rolebases.yaml b/config/crds/iam.kubesphere.io_rolebases.yaml index 8b70b38ad..ba91786e8 100644 --- a/config/crds/iam.kubesphere.io_rolebases.yaml +++ b/config/crds/iam.kubesphere.io_rolebases.yaml @@ -23,10 +23,14 @@ spec: openAPIV3Schema: properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object diff --git a/config/crds/iam.kubesphere.io_users.yaml b/config/crds/iam.kubesphere.io_users.yaml index 999d4eb9c..84273e466 100644 --- a/config/crds/iam.kubesphere.io_users.yaml +++ b/config/crds/iam.kubesphere.io_users.yaml @@ -31,10 +31,14 @@ spec: description: User is the Schema for the users API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -57,7 +61,23 @@ spec: description: The preferred written or spoken language for the user. type: string password: - description: password will be encrypted by mutating admission webhook + description: 'password will be encrypted by mutating admission webhook + Password pattern is tricky here. The rule is simple: length between + [6,64], at least one uppercase letter, one lowercase letter, one + digit. The regexp in console(javascript) is quite straightforward: + ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{6,64}$ But in Go, we don''t have + ?= (back tracking) capability in regexp (also in CRD validation + pattern) So we adopted an alternative scheme to achieve. Use 6 different + regexp to combine to achieve the same effect. These six schemes + enumerate the arrangement of numbers, uppercase letters, and lowercase + letters that appear for the first time. - ^(.*[a-z].*[A-Z].*[0-9].*)$ + stands for lowercase letter comes first, then followed by an uppercase + letter, then a digit. - ^(.*[a-z].*[0-9].*[A-Z].*)$ stands for lowercase + letter comes first, then followed by a digit, then an uppercase + leeter. - ^(.*[A-Z].*[a-z].*[0-9].*)$ ... - ^(.*[A-Z].*[0-9].*[a-z].*)$ + ... - ^(.*[0-9].*[a-z].*[A-Z].*)$ ... - ^(.*[0-9].*[A-Z].*[a-z].*)$ + ... Last but not least, the bcrypt string is also included to match + the encrypted password. ^(\$2[ayb]\$.{56})$' maxLength: 64 minLength: 6 pattern: ^(.*[a-z].*[A-Z].*[0-9].*)$|^(.*[a-z].*[0-9].*[A-Z].*)$|^(.*[A-Z].*[a-z].*[0-9].*)$|^(.*[A-Z].*[0-9].*[a-z].*)$|^(.*[0-9].*[a-z].*[A-Z].*)$|^(.*[0-9].*[A-Z].*[a-z].*)$|^(\$2[ayb]\$.{56})$ diff --git a/config/crds/iam.kubesphere.io_workspacerolebindings.yaml b/config/crds/iam.kubesphere.io_workspacerolebindings.yaml index 2b4fbcde1..9857946bf 100644 --- a/config/crds/iam.kubesphere.io_workspacerolebindings.yaml +++ b/config/crds/iam.kubesphere.io_workspacerolebindings.yaml @@ -25,18 +25,24 @@ spec: name: v1alpha2 schema: openAPIV3Schema: - description: WorkspaceRoleBinding is the Schema for the workspacerolebindings API + description: WorkspaceRoleBinding is the Schema for the workspacerolebindings + API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object roleRef: - description: RoleRef can only reference a WorkspaceRole. If the RoleRef cannot be resolved, the Authorizer must return an error. + description: RoleRef can only reference a WorkspaceRole. If the RoleRef + cannot be resolved, the Authorizer must return an error. properties: apiGroup: description: APIGroup is the group for the resource being referenced @@ -53,21 +59,31 @@ spec: - name type: object subjects: - description: Subjects holds references to the objects the role applies to. + description: Subjects holds references to the objects the role applies + to. items: - description: Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names. + description: Subject contains a reference to the object or user identities + a role binding applies to. This can either hold a direct API object + reference, or a value for non-objects such as user and group names. properties: apiGroup: - description: APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects. + description: APIGroup holds the API group of the referenced subject. + Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. type: string kind: - description: Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error. + description: Kind of object being referenced. Values defined by + this API group are "User", "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind value, the Authorizer + should report an error. type: string name: description: Name of the object being referenced. type: string namespace: - description: Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error. + description: Namespace of the referenced object. If the object + kind is non-namespace, such as "User" or "Group", and this value + is not empty the Authorizer should report an error. type: string required: - kind diff --git a/config/crds/iam.kubesphere.io_workspaceroles.yaml b/config/crds/iam.kubesphere.io_workspaceroles.yaml index 09080bcf2..940ea9910 100644 --- a/config/crds/iam.kubesphere.io_workspaceroles.yaml +++ b/config/crds/iam.kubesphere.io_workspaceroles.yaml @@ -30,40 +30,59 @@ spec: openAPIV3Schema: properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object rules: description: Rules holds all the PolicyRules for this WorkspaceRole items: - description: PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. + description: PolicyRule holds information that describes a policy rule, + but does not contain information about who the rule applies to or + which namespace the rule applies to. properties: apiGroups: - description: APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. + description: APIGroups is the name of the APIGroup that contains + the resources. If multiple API groups are specified, any action + requested against one of the enumerated resources in any API group + will be allowed. items: type: string type: array nonResourceURLs: - description: NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + description: NonResourceURLs is a set of partial urls that a user + should have access to. *s are allowed, but only as the full, + final step in the path Since non-resource URLs are not namespaced, + this field is only applicable for ClusterRoles referenced from + a ClusterRoleBinding. Rules can either apply to API resources + (such as "pods" or "secrets") or non-resource URL paths (such + as "/api"), but not both. items: type: string type: array resourceNames: - description: ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + description: ResourceNames is an optional white list of names that + the rule applies to. An empty set means that everything is allowed. items: type: string type: array resources: - description: Resources is a list of resources this rule applies to. ResourceAll represents all resources. + description: Resources is a list of resources this rule applies + to. ResourceAll represents all resources. items: type: string type: array verbs: - description: Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. + description: Verbs is a list of Verbs that apply to ALL the ResourceKinds + and AttributeRestrictions contained in this rule. VerbAll represents + all kinds. items: type: string type: array diff --git a/config/crds/network.kubesphere.io_ipamblocks.yaml b/config/crds/network.kubesphere.io_ipamblocks.yaml index 8e924d176..cea49291b 100644 --- a/config/crds/network.kubesphere.io_ipamblocks.yaml +++ b/config/crds/network.kubesphere.io_ipamblocks.yaml @@ -21,10 +21,14 @@ spec: openAPIV3Schema: properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object diff --git a/config/crds/network.kubesphere.io_ipamhandles.yaml b/config/crds/network.kubesphere.io_ipamhandles.yaml index 18ce78f9c..00b2f075d 100644 --- a/config/crds/network.kubesphere.io_ipamhandles.yaml +++ b/config/crds/network.kubesphere.io_ipamhandles.yaml @@ -21,10 +21,14 @@ spec: openAPIV3Schema: properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object diff --git a/config/crds/network.kubesphere.io_ippools.yaml b/config/crds/network.kubesphere.io_ippools.yaml index c9c6fb16e..0dd7f25c4 100644 --- a/config/crds/network.kubesphere.io_ippools.yaml +++ b/config/crds/network.kubesphere.io_ippools.yaml @@ -21,23 +21,29 @@ spec: openAPIV3Schema: properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object spec: properties: blockSize: - description: The block size to use for IP address assignments from this pool. Defaults to 26 for IPv4 and 112 for IPv6. + description: The block size to use for IP address assignments from + this pool. Defaults to 26 for IPv4 and 112 for IPv6. type: integer cidr: description: The pool CIDR. type: string disabled: - description: When disabled is true, IPAM will not assign addresses from this pool. + description: When disabled is true, IPAM will not assign addresses + from this pool. type: boolean dns: description: DNS contains values interesting for DNS resolvers diff --git a/config/crds/network.kubesphere.io_namespacenetworkpolicies.yaml b/config/crds/network.kubesphere.io_namespacenetworkpolicies.yaml index 2c26756b1..7a6f71f81 100644 --- a/config/crds/network.kubesphere.io_namespacenetworkpolicies.yaml +++ b/config/crds/network.kubesphere.io_namespacenetworkpolicies.yaml @@ -19,59 +19,109 @@ spec: - nsnp singular: namespacenetworkpolicy scope: Namespaced - preserveUnknownFields: false versions: - name: v1alpha1 schema: openAPIV3Schema: - description: NamespaceNetworkPolicy is the Schema for the namespacenetworkpolicies API + description: NamespaceNetworkPolicy is the Schema for the namespacenetworkpolicies + API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object spec: - description: NamespaceNetworkPolicySpec provides the specification of a NamespaceNetworkPolicy + description: NamespaceNetworkPolicySpec provides the specification of + a NamespaceNetworkPolicy properties: egress: - description: List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 + description: List of egress rules to be applied to the selected pods. + Outgoing traffic is allowed if there are no NetworkPolicies selecting + the pod (and cluster policy otherwise allows the traffic), OR if + the traffic matches at least one egress rule across all of the NetworkPolicy + objects whose podSelector matches the pod. If this field is empty + then this NetworkPolicy limits all outgoing traffic (and serves + solely to ensure that the pods it selects are isolated by default). + This field is beta-level in 1.8 items: - description: NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8 + description: NetworkPolicyEgressRule describes a particular set + of traffic that is allowed out of pods matched by a NetworkPolicySpec's + podSelector. The traffic must match both ports and to. This type + is beta-level in 1.8 properties: ports: - description: List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. + description: List of destination ports for outgoing traffic. + Each item in this list is combined using a logical OR. If + this field is empty or missing, this rule matches all ports + (traffic not restricted by port). If this field is present + and contains at least one item, then this rule allows traffic + only if the traffic matches at least one port in the list. items: - description: NetworkPolicyPort describes a port to allow traffic on + description: NetworkPolicyPort describes a port to allow traffic + on properties: + endPort: + description: If set, indicates that the range of ports + from port to endPort, inclusive, should be allowed by + the policy. This field cannot be defined if the port + field is not defined or if the port field is defined + as a named (string) port. The endPort must be equal + or greater than port. This feature is in Alpha state + and should be enabled using the Feature Gate "NetworkPolicyEndPort". + format: int32 + type: integer port: anyOf: - type: integer - type: string - description: The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + description: The port on the given protocol. This can + either be a numerical or named port on a pod. If this + field is not provided, this matches all port names and + numbers. If present, only traffic on the specified protocol + AND port will be matched. x-kubernetes-int-or-string: true protocol: default: TCP - description: The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. + description: The protocol (TCP, UDP, or SCTP) which traffic + must match. If not specified, this field defaults to + TCP. type: string type: object type: array to: - description: List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. + description: List of destinations for outgoing traffic of pods + selected for this rule. Items in this list are combined using + a logical OR operation. If this field is empty or missing, + this rule matches all destinations (traffic not restricted + by destination). If this field is present and contains at + least one item, this rule allows traffic only if the traffic + matches at least one item in the to list. items: - description: NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed + description: NetworkPolicyPeer describes a peer to allow traffic + from. Only certain combinations of fields are allowed properties: ipBlock: - description: IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. + description: IPBlock defines policy on a particular IPBlock. + If this field is set then neither of the other fields + can be. properties: cidr: - description: CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" + description: CIDR is a string representing the IP + Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" type: string except: - description: Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range + description: Except is a slice of CIDRs that should + not be included within an IP Block Valid examples + are "192.168.1.1/24" or "2001:db9::/64" Except values + will be rejected if they are outside the CIDR range items: type: string type: array @@ -100,23 +150,45 @@ spec: type: object type: array ingress: - description: List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default) + description: List of ingress rules to be applied to the selected pods. + Traffic is allowed to a pod if there are no NetworkPolicies selecting + the pod (and cluster policy otherwise allows the traffic), OR if + the traffic source is the pod's local node, OR if the traffic matches + at least one ingress rule across all of the NetworkPolicy objects + whose podSelector matches the pod. If this field is empty then this + NetworkPolicy does not allow any traffic (and serves solely to ensure + that the pods it selects are isolated by default) items: - description: NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from. + description: NetworkPolicyIngressRule describes a particular set + of traffic that is allowed to the pods matched by a NetworkPolicySpec's + podSelector. The traffic must match both ports and from. properties: from: - description: List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list. + description: List of sources which should be able to access + the pods selected for this rule. Items in this list are combined + using a logical OR operation. If this field is empty or missing, + this rule matches all sources (traffic not restricted by source). + If this field is present and contains at least one item, this + rule allows traffic only if the traffic matches at least one + item in the from list. items: - description: NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed + description: NetworkPolicyPeer describes a peer to allow traffic + from. Only certain combinations of fields are allowed properties: ipBlock: - description: IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. + description: IPBlock defines policy on a particular IPBlock. + If this field is set then neither of the other fields + can be. properties: cidr: - description: CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" + description: CIDR is a string representing the IP + Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" type: string except: - description: Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range + description: Except is a slice of CIDRs that should + not be included within an IP Block Valid examples + are "192.168.1.1/24" or "2001:db9::/64" Except values + will be rejected if they are outside the CIDR range items: type: string type: array @@ -143,28 +215,63 @@ spec: type: object type: array ports: - description: List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. + description: List of ports which should be made accessible on + the pods selected for this rule. Each item in this list is + combined using a logical OR. If this field is empty or missing, + this rule matches all ports (traffic not restricted by port). + If this field is present and contains at least one item, then + this rule allows traffic only if the traffic matches at least + one port in the list. items: - description: NetworkPolicyPort describes a port to allow traffic on + description: NetworkPolicyPort describes a port to allow traffic + on properties: + endPort: + description: If set, indicates that the range of ports + from port to endPort, inclusive, should be allowed by + the policy. This field cannot be defined if the port + field is not defined or if the port field is defined + as a named (string) port. The endPort must be equal + or greater than port. This feature is in Alpha state + and should be enabled using the Feature Gate "NetworkPolicyEndPort". + format: int32 + type: integer port: anyOf: - type: integer - type: string - description: The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. + description: The port on the given protocol. This can + either be a numerical or named port on a pod. If this + field is not provided, this matches all port names and + numbers. If present, only traffic on the specified protocol + AND port will be matched. x-kubernetes-int-or-string: true protocol: default: TCP - description: The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. + description: The protocol (TCP, UDP, or SCTP) which traffic + must match. If not specified, this field defaults to + TCP. type: string type: object type: array type: object type: array policyTypes: - description: List of rule types that the NetworkPolicy relates to. Valid options are "Ingress", "Egress", or "Ingress,Egress". If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + description: List of rule types that the NetworkPolicy relates to. + Valid options are "Ingress", "Egress", or "Ingress,Egress". If this + field is not specified, it will default based on the existence of + Ingress or Egress rules; policies that contain an Egress section + are assumed to affect Egress, and all policies (whether or not they + contain an Ingress section) are assumed to affect Ingress. If you + want to write an egress-only policy, you must explicitly specify + policyTypes [ "Egress" ]. Likewise, if you want to write a policy + that specifies that no egress is allowed, you must specify a policyTypes + value that include "Egress" (since such a policy would not include + an Egress section and would otherwise default to just [ "Ingress" + ]). This field is beta-level in 1.8 items: - description: Policy Type string describes the NetworkPolicy type This type is beta-level in 1.8 + description: PolicyType string describes the NetworkPolicy type + This type is beta-level in 1.8 type: string type: array type: object diff --git a/config/crds/quota.kubesphere.io_resourcequotas.yaml b/config/crds/quota.kubesphere.io_resourcequotas.yaml index bcc6e22b1..e5b33e424 100644 --- a/config/crds/quota.kubesphere.io_resourcequotas.yaml +++ b/config/crds/quota.kubesphere.io_resourcequotas.yaml @@ -21,13 +21,18 @@ spec: - name: v1alpha2 schema: openAPIV3Schema: - description: WorkspaceResourceQuota sets aggregate quota restrictions enforced per workspace + description: WorkspaceResourceQuota sets aggregate quota restrictions enforced + per workspace properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -44,24 +49,39 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/' + description: 'hard is the set of desired hard limits for each + named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/' type: object scopeSelector: - description: scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. + description: scopeSelector is also a collection of filters like + scopes that must match each object tracked by a quota but expressed + using ScopeSelectorOperator in combination with possible values. + For a resource to match, both scopes AND scopeSelector (if specified + in spec), must be matched. properties: matchExpressions: - description: A list of scope selector requirements by scope of the resources. + description: A list of scope selector requirements by scope + of the resources. items: - description: A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. + description: A scoped-resource selector requirement is a + selector that contains values, a scope name, and an operator + that relates the scope name and values. properties: operator: - description: Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. + description: Represents a scope's relationship to a + set of values. Valid operators are In, NotIn, Exists, + DoesNotExist. type: string scopeName: - description: The name of the scope that the selector applies to. + description: The name of the scope that the selector + applies to. type: string values: - description: An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + description: An array of string values. If the operator + is In or NotIn, the values array must be non-empty. + If the operator is Exists or DoesNotExist, the values + array must be empty. This array is replaced during + a strategic merge patch. items: type: string type: array @@ -72,9 +92,12 @@ spec: type: array type: object scopes: - description: A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. + description: A collection of filters that must match each object + tracked by a quota. If not specified, the quota matches all + objects. items: - description: A ResourceQuotaScope defines a filter that must match each object tracked by a quota + description: A ResourceQuotaScope defines a filter that must + match each object tracked by a quota type: string type: array type: object @@ -88,12 +111,14 @@ spec: - selector type: object status: - description: Status defines the actual enforced quota and its current usage + description: Status defines the actual enforced quota and its current + usage properties: namespaces: description: Namespaces slices the usage by project. items: - description: ResourceQuotaStatusByNamespace gives status for a particular project + description: ResourceQuotaStatusByNamespace gives status for a particular + project properties: hard: additionalProperties: @@ -102,7 +127,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/' + description: 'Hard is the set of enforced hard limits for each + named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/' type: object namespace: description: Namespace the project this status applies to @@ -114,14 +140,16 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: Used is the current observed total usage of the resource in the namespace. + description: Used is the current observed total usage of the + resource in the namespace. type: object required: - namespace type: object type: array total: - description: Total defines the actual enforced quota and its current usage across all projects + description: Total defines the actual enforced quota and its current + usage across all projects properties: hard: additionalProperties: @@ -130,7 +158,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/' + description: 'Hard is the set of enforced hard limits for each + named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/' type: object used: additionalProperties: @@ -139,7 +168,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: Used is the current observed total usage of the resource in the namespace. + description: Used is the current observed total usage of the resource + in the namespace. type: object type: object required: diff --git a/config/crds/storage.kubesphere.io_provisionercapabilities.yaml b/config/crds/storage.kubesphere.io_provisionercapabilities.yaml new file mode 100644 index 000000000..83aabb924 --- /dev/null +++ b/config/crds/storage.kubesphere.io_provisionercapabilities.yaml @@ -0,0 +1,120 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (devel) + creationTimestamp: null + name: provisionercapabilities.storage.kubesphere.io +spec: + group: storage.kubesphere.io + names: + kind: ProvisionerCapability + listKind: ProvisionerCapabilityList + plural: provisionercapabilities + singular: provisionercapability + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.pluginInfo.name + name: Provisioner + type: string + - jsonPath: .spec.features.volume.expandMode + name: Expand + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: ProvisionerCapability is the schema for the provisionercapability + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: ProvisionerCapabilitySpec defines the desired state of ProvisionerCapability + properties: + features: + description: CapabilityFeatures describe storage features + properties: + snapshot: + description: SnapshotFeature describe snapshot features + properties: + create: + type: boolean + list: + type: boolean + required: + - create + - list + type: object + topology: + type: boolean + volume: + description: VolumeFeature describe volume features + properties: + attach: + type: boolean + clone: + type: boolean + create: + type: boolean + expandMode: + type: string + list: + type: boolean + stats: + type: boolean + required: + - attach + - clone + - create + - expandMode + - list + - stats + type: object + required: + - snapshot + - topology + - volume + type: object + pluginInfo: + description: PluginInfo describes plugin info + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + required: + - features + - pluginInfo + type: object + required: + - spec + type: object + served: true + storage: true + subresources: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crds/storage.kubesphere.io_storageclasscapabilities.yaml b/config/crds/storage.kubesphere.io_storageclasscapabilities.yaml new file mode 100644 index 000000000..907b5c43a --- /dev/null +++ b/config/crds/storage.kubesphere.io_storageclasscapabilities.yaml @@ -0,0 +1,120 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: (devel) + creationTimestamp: null + name: storageclasscapabilities.storage.kubesphere.io +spec: + group: storage.kubesphere.io + names: + kind: StorageClassCapability + listKind: StorageClassCapabilityList + plural: storageclasscapabilities + singular: storageclasscapability + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.provisioner + name: Provisioner + type: string + - jsonPath: .spec.features.volume.create + name: Volume + type: boolean + - jsonPath: .spec.features.volume.expandMode + name: Expand + type: string + - jsonPath: .spec.features.volume.clone + name: Clone + type: boolean + - jsonPath: .spec.features.snapshot.create + name: Snapshot + type: boolean + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: StorageClassCapability is the Schema for the storage class capability + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: StorageClassCapabilitySpec defines the desired state of StorageClassCapability + properties: + features: + description: CapabilityFeatures describe storage features + properties: + snapshot: + description: SnapshotFeature describe snapshot features + properties: + create: + type: boolean + list: + type: boolean + required: + - create + - list + type: object + topology: + type: boolean + volume: + description: VolumeFeature describe volume features + properties: + attach: + type: boolean + clone: + type: boolean + create: + type: boolean + expandMode: + type: string + list: + type: boolean + stats: + type: boolean + required: + - attach + - clone + - create + - expandMode + - list + - stats + type: object + required: + - snapshot + - topology + - volume + type: object + provisioner: + type: string + required: + - features + - provisioner + type: object + required: + - spec + type: object + served: true + storage: true + subresources: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crds/tenant.kubesphere.io_workspaces.yaml b/config/crds/tenant.kubesphere.io_workspaces.yaml index f8662f887..7b10de9c4 100644 --- a/config/crds/tenant.kubesphere.io_workspaces.yaml +++ b/config/crds/tenant.kubesphere.io_workspaces.yaml @@ -24,10 +24,14 @@ spec: description: Workspace is the Schema for the workspaces API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object diff --git a/config/crds/tenant.kubesphere.io_workspacetemplates.yaml b/config/crds/tenant.kubesphere.io_workspacetemplates.yaml index 9502a4101..3f517bc41 100644 --- a/config/crds/tenant.kubesphere.io_workspacetemplates.yaml +++ b/config/crds/tenant.kubesphere.io_workspacetemplates.yaml @@ -24,10 +24,14 @@ spec: description: WorkspaceTemplate is the Schema for the workspacetemplates API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -59,21 +63,34 @@ spec: placement: properties: clusterSelector: - description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. + description: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. An + empty label selector matches all objects. A null label selector + matches no objects. properties: matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. properties: key: - description: key is the label key that the selector applies to. + description: key is the label key that the selector + applies to. type: string operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. type: string values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + description: values is an array of string values. If + the operator is In or NotIn, the values array must + be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced + during a strategic merge patch. items: type: string type: array @@ -85,7 +102,11 @@ spec: matchLabels: additionalProperties: type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. type: object type: object clusters: diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index aab326f02..f1b13954c 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -42,7 +42,7 @@ import ( var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) + var localSchemeBuilder = runtime.SchemeBuilder{ applicationv1alpha1.AddToScheme, auditingv1alpha1.AddToScheme, diff --git a/pkg/client/clientset/versioned/typed/storage/v1alpha1/fake/fake_provisionercapability.go b/pkg/client/clientset/versioned/typed/storage/v1alpha1/fake/fake_provisionercapability.go new file mode 100644 index 000000000..0bbdc207f --- /dev/null +++ b/pkg/client/clientset/versioned/typed/storage/v1alpha1/fake/fake_provisionercapability.go @@ -0,0 +1,122 @@ +/* +Copyright 2020 The KubeSphere Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" + v1alpha1 "kubesphere.io/api/storage/v1alpha1" +) + +// FakeProvisionerCapabilities implements ProvisionerCapabilityInterface +type FakeProvisionerCapabilities struct { + Fake *FakeStorageV1alpha1 +} + +var provisionercapabilitiesResource = schema.GroupVersionResource{Group: "storage.kubesphere.io", Version: "v1alpha1", Resource: "provisionercapabilities"} + +var provisionercapabilitiesKind = schema.GroupVersionKind{Group: "storage.kubesphere.io", Version: "v1alpha1", Kind: "ProvisionerCapability"} + +// Get takes name of the provisionerCapability, and returns the corresponding provisionerCapability object, and an error if there is any. +func (c *FakeProvisionerCapabilities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ProvisionerCapability, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(provisionercapabilitiesResource, name), &v1alpha1.ProvisionerCapability{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ProvisionerCapability), err +} + +// List takes label and field selectors, and returns the list of ProvisionerCapabilities that match those selectors. +func (c *FakeProvisionerCapabilities) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ProvisionerCapabilityList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(provisionercapabilitiesResource, provisionercapabilitiesKind, opts), &v1alpha1.ProvisionerCapabilityList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ProvisionerCapabilityList{ListMeta: obj.(*v1alpha1.ProvisionerCapabilityList).ListMeta} + for _, item := range obj.(*v1alpha1.ProvisionerCapabilityList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested provisionerCapabilities. +func (c *FakeProvisionerCapabilities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(provisionercapabilitiesResource, opts)) +} + +// Create takes the representation of a provisionerCapability and creates it. Returns the server's representation of the provisionerCapability, and an error, if there is any. +func (c *FakeProvisionerCapabilities) Create(ctx context.Context, provisionerCapability *v1alpha1.ProvisionerCapability, opts v1.CreateOptions) (result *v1alpha1.ProvisionerCapability, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(provisionercapabilitiesResource, provisionerCapability), &v1alpha1.ProvisionerCapability{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ProvisionerCapability), err +} + +// Update takes the representation of a provisionerCapability and updates it. Returns the server's representation of the provisionerCapability, and an error, if there is any. +func (c *FakeProvisionerCapabilities) Update(ctx context.Context, provisionerCapability *v1alpha1.ProvisionerCapability, opts v1.UpdateOptions) (result *v1alpha1.ProvisionerCapability, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(provisionercapabilitiesResource, provisionerCapability), &v1alpha1.ProvisionerCapability{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ProvisionerCapability), err +} + +// Delete takes name of the provisionerCapability and deletes it. Returns an error if one occurs. +func (c *FakeProvisionerCapabilities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(provisionercapabilitiesResource, name), &v1alpha1.ProvisionerCapability{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeProvisionerCapabilities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(provisionercapabilitiesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ProvisionerCapabilityList{}) + return err +} + +// Patch applies the patch and returns the patched provisionerCapability. +func (c *FakeProvisionerCapabilities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ProvisionerCapability, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(provisionercapabilitiesResource, name, pt, data, subresources...), &v1alpha1.ProvisionerCapability{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ProvisionerCapability), err +} diff --git a/pkg/client/clientset/versioned/typed/storage/v1alpha1/fake/fake_storage_client.go b/pkg/client/clientset/versioned/typed/storage/v1alpha1/fake/fake_storage_client.go index 7b37af71f..8e3916bd2 100644 --- a/pkg/client/clientset/versioned/typed/storage/v1alpha1/fake/fake_storage_client.go +++ b/pkg/client/clientset/versioned/typed/storage/v1alpha1/fake/fake_storage_client.go @@ -21,12 +21,21 @@ package fake import ( rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" + v1alpha1 "kubesphere.io/kubesphere/pkg/client/clientset/versioned/typed/storage/v1alpha1" ) type FakeStorageV1alpha1 struct { *testing.Fake } +func (c *FakeStorageV1alpha1) ProvisionerCapabilities() v1alpha1.ProvisionerCapabilityInterface { + return &FakeProvisionerCapabilities{c} +} + +func (c *FakeStorageV1alpha1) StorageClassCapabilities() v1alpha1.StorageClassCapabilityInterface { + return &FakeStorageClassCapabilities{c} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeStorageV1alpha1) RESTClient() rest.Interface { diff --git a/pkg/client/clientset/versioned/typed/storage/v1alpha1/fake/fake_storageclasscapability.go b/pkg/client/clientset/versioned/typed/storage/v1alpha1/fake/fake_storageclasscapability.go new file mode 100644 index 000000000..e4781fb00 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/storage/v1alpha1/fake/fake_storageclasscapability.go @@ -0,0 +1,122 @@ +/* +Copyright 2020 The KubeSphere Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" + v1alpha1 "kubesphere.io/api/storage/v1alpha1" +) + +// FakeStorageClassCapabilities implements StorageClassCapabilityInterface +type FakeStorageClassCapabilities struct { + Fake *FakeStorageV1alpha1 +} + +var storageclasscapabilitiesResource = schema.GroupVersionResource{Group: "storage.kubesphere.io", Version: "v1alpha1", Resource: "storageclasscapabilities"} + +var storageclasscapabilitiesKind = schema.GroupVersionKind{Group: "storage.kubesphere.io", Version: "v1alpha1", Kind: "StorageClassCapability"} + +// Get takes name of the storageClassCapability, and returns the corresponding storageClassCapability object, and an error if there is any. +func (c *FakeStorageClassCapabilities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StorageClassCapability, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(storageclasscapabilitiesResource, name), &v1alpha1.StorageClassCapability{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageClassCapability), err +} + +// List takes label and field selectors, and returns the list of StorageClassCapabilities that match those selectors. +func (c *FakeStorageClassCapabilities) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageClassCapabilityList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(storageclasscapabilitiesResource, storageclasscapabilitiesKind, opts), &v1alpha1.StorageClassCapabilityList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.StorageClassCapabilityList{ListMeta: obj.(*v1alpha1.StorageClassCapabilityList).ListMeta} + for _, item := range obj.(*v1alpha1.StorageClassCapabilityList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested storageClassCapabilities. +func (c *FakeStorageClassCapabilities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(storageclasscapabilitiesResource, opts)) +} + +// Create takes the representation of a storageClassCapability and creates it. Returns the server's representation of the storageClassCapability, and an error, if there is any. +func (c *FakeStorageClassCapabilities) Create(ctx context.Context, storageClassCapability *v1alpha1.StorageClassCapability, opts v1.CreateOptions) (result *v1alpha1.StorageClassCapability, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(storageclasscapabilitiesResource, storageClassCapability), &v1alpha1.StorageClassCapability{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageClassCapability), err +} + +// Update takes the representation of a storageClassCapability and updates it. Returns the server's representation of the storageClassCapability, and an error, if there is any. +func (c *FakeStorageClassCapabilities) Update(ctx context.Context, storageClassCapability *v1alpha1.StorageClassCapability, opts v1.UpdateOptions) (result *v1alpha1.StorageClassCapability, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(storageclasscapabilitiesResource, storageClassCapability), &v1alpha1.StorageClassCapability{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageClassCapability), err +} + +// Delete takes name of the storageClassCapability and deletes it. Returns an error if one occurs. +func (c *FakeStorageClassCapabilities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(storageclasscapabilitiesResource, name), &v1alpha1.StorageClassCapability{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeStorageClassCapabilities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(storageclasscapabilitiesResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.StorageClassCapabilityList{}) + return err +} + +// Patch applies the patch and returns the patched storageClassCapability. +func (c *FakeStorageClassCapabilities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageClassCapability, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(storageclasscapabilitiesResource, name, pt, data, subresources...), &v1alpha1.StorageClassCapability{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StorageClassCapability), err +} diff --git a/pkg/client/clientset/versioned/typed/storage/v1alpha1/provisionercapability.go b/pkg/client/clientset/versioned/typed/storage/v1alpha1/provisionercapability.go new file mode 100644 index 000000000..13de7af73 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/storage/v1alpha1/provisionercapability.go @@ -0,0 +1,168 @@ +/* +Copyright 2020 The KubeSphere Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + v1alpha1 "kubesphere.io/api/storage/v1alpha1" + scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme" +) + +// ProvisionerCapabilitiesGetter has a method to return a ProvisionerCapabilityInterface. +// A group's client should implement this interface. +type ProvisionerCapabilitiesGetter interface { + ProvisionerCapabilities() ProvisionerCapabilityInterface +} + +// ProvisionerCapabilityInterface has methods to work with ProvisionerCapability resources. +type ProvisionerCapabilityInterface interface { + Create(ctx context.Context, provisionerCapability *v1alpha1.ProvisionerCapability, opts v1.CreateOptions) (*v1alpha1.ProvisionerCapability, error) + Update(ctx context.Context, provisionerCapability *v1alpha1.ProvisionerCapability, opts v1.UpdateOptions) (*v1alpha1.ProvisionerCapability, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ProvisionerCapability, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ProvisionerCapabilityList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ProvisionerCapability, err error) + ProvisionerCapabilityExpansion +} + +// provisionerCapabilities implements ProvisionerCapabilityInterface +type provisionerCapabilities struct { + client rest.Interface +} + +// newProvisionerCapabilities returns a ProvisionerCapabilities +func newProvisionerCapabilities(c *StorageV1alpha1Client) *provisionerCapabilities { + return &provisionerCapabilities{ + client: c.RESTClient(), + } +} + +// Get takes name of the provisionerCapability, and returns the corresponding provisionerCapability object, and an error if there is any. +func (c *provisionerCapabilities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ProvisionerCapability, err error) { + result = &v1alpha1.ProvisionerCapability{} + err = c.client.Get(). + Resource("provisionercapabilities"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ProvisionerCapabilities that match those selectors. +func (c *provisionerCapabilities) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ProvisionerCapabilityList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ProvisionerCapabilityList{} + err = c.client.Get(). + Resource("provisionercapabilities"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested provisionerCapabilities. +func (c *provisionerCapabilities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("provisionercapabilities"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a provisionerCapability and creates it. Returns the server's representation of the provisionerCapability, and an error, if there is any. +func (c *provisionerCapabilities) Create(ctx context.Context, provisionerCapability *v1alpha1.ProvisionerCapability, opts v1.CreateOptions) (result *v1alpha1.ProvisionerCapability, err error) { + result = &v1alpha1.ProvisionerCapability{} + err = c.client.Post(). + Resource("provisionercapabilities"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(provisionerCapability). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a provisionerCapability and updates it. Returns the server's representation of the provisionerCapability, and an error, if there is any. +func (c *provisionerCapabilities) Update(ctx context.Context, provisionerCapability *v1alpha1.ProvisionerCapability, opts v1.UpdateOptions) (result *v1alpha1.ProvisionerCapability, err error) { + result = &v1alpha1.ProvisionerCapability{} + err = c.client.Put(). + Resource("provisionercapabilities"). + Name(provisionerCapability.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(provisionerCapability). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the provisionerCapability and deletes it. Returns an error if one occurs. +func (c *provisionerCapabilities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("provisionercapabilities"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *provisionerCapabilities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("provisionercapabilities"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched provisionerCapability. +func (c *provisionerCapabilities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ProvisionerCapability, err error) { + result = &v1alpha1.ProvisionerCapability{} + err = c.client.Patch(pt). + Resource("provisionercapabilities"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/clientset/versioned/typed/storage/v1alpha1/storage_client.go b/pkg/client/clientset/versioned/typed/storage/v1alpha1/storage_client.go index 39a5c05ab..d1500585e 100644 --- a/pkg/client/clientset/versioned/typed/storage/v1alpha1/storage_client.go +++ b/pkg/client/clientset/versioned/typed/storage/v1alpha1/storage_client.go @@ -26,6 +26,8 @@ import ( type StorageV1alpha1Interface interface { RESTClient() rest.Interface + ProvisionerCapabilitiesGetter + StorageClassCapabilitiesGetter } // StorageV1alpha1Client is used to interact with features provided by the storage.kubesphere.io group. @@ -33,6 +35,14 @@ type StorageV1alpha1Client struct { restClient rest.Interface } +func (c *StorageV1alpha1Client) ProvisionerCapabilities() ProvisionerCapabilityInterface { + return newProvisionerCapabilities(c) +} + +func (c *StorageV1alpha1Client) StorageClassCapabilities() StorageClassCapabilityInterface { + return newStorageClassCapabilities(c) +} + // NewForConfig creates a new StorageV1alpha1Client for the given config. func NewForConfig(c *rest.Config) (*StorageV1alpha1Client, error) { config := *c diff --git a/pkg/client/clientset/versioned/typed/storage/v1alpha1/storageclasscapability.go b/pkg/client/clientset/versioned/typed/storage/v1alpha1/storageclasscapability.go new file mode 100644 index 000000000..b9f5ca087 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/storage/v1alpha1/storageclasscapability.go @@ -0,0 +1,168 @@ +/* +Copyright 2020 The KubeSphere Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + v1alpha1 "kubesphere.io/api/storage/v1alpha1" + scheme "kubesphere.io/kubesphere/pkg/client/clientset/versioned/scheme" +) + +// StorageClassCapabilitiesGetter has a method to return a StorageClassCapabilityInterface. +// A group's client should implement this interface. +type StorageClassCapabilitiesGetter interface { + StorageClassCapabilities() StorageClassCapabilityInterface +} + +// StorageClassCapabilityInterface has methods to work with StorageClassCapability resources. +type StorageClassCapabilityInterface interface { + Create(ctx context.Context, storageClassCapability *v1alpha1.StorageClassCapability, opts v1.CreateOptions) (*v1alpha1.StorageClassCapability, error) + Update(ctx context.Context, storageClassCapability *v1alpha1.StorageClassCapability, opts v1.UpdateOptions) (*v1alpha1.StorageClassCapability, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.StorageClassCapability, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.StorageClassCapabilityList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageClassCapability, err error) + StorageClassCapabilityExpansion +} + +// storageClassCapabilities implements StorageClassCapabilityInterface +type storageClassCapabilities struct { + client rest.Interface +} + +// newStorageClassCapabilities returns a StorageClassCapabilities +func newStorageClassCapabilities(c *StorageV1alpha1Client) *storageClassCapabilities { + return &storageClassCapabilities{ + client: c.RESTClient(), + } +} + +// Get takes name of the storageClassCapability, and returns the corresponding storageClassCapability object, and an error if there is any. +func (c *storageClassCapabilities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StorageClassCapability, err error) { + result = &v1alpha1.StorageClassCapability{} + err = c.client.Get(). + Resource("storageclasscapabilities"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of StorageClassCapabilities that match those selectors. +func (c *storageClassCapabilities) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageClassCapabilityList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.StorageClassCapabilityList{} + err = c.client.Get(). + Resource("storageclasscapabilities"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested storageClassCapabilities. +func (c *storageClassCapabilities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("storageclasscapabilities"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a storageClassCapability and creates it. Returns the server's representation of the storageClassCapability, and an error, if there is any. +func (c *storageClassCapabilities) Create(ctx context.Context, storageClassCapability *v1alpha1.StorageClassCapability, opts v1.CreateOptions) (result *v1alpha1.StorageClassCapability, err error) { + result = &v1alpha1.StorageClassCapability{} + err = c.client.Post(). + Resource("storageclasscapabilities"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(storageClassCapability). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a storageClassCapability and updates it. Returns the server's representation of the storageClassCapability, and an error, if there is any. +func (c *storageClassCapabilities) Update(ctx context.Context, storageClassCapability *v1alpha1.StorageClassCapability, opts v1.UpdateOptions) (result *v1alpha1.StorageClassCapability, err error) { + result = &v1alpha1.StorageClassCapability{} + err = c.client.Put(). + Resource("storageclasscapabilities"). + Name(storageClassCapability.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(storageClassCapability). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the storageClassCapability and deletes it. Returns an error if one occurs. +func (c *storageClassCapabilities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("storageclasscapabilities"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *storageClassCapabilities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("storageclasscapabilities"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched storageClassCapability. +func (c *storageClassCapabilities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageClassCapability, err error) { + result = &v1alpha1.StorageClassCapability{} + err = c.client.Patch(pt). + Resource("storageclasscapabilities"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index 4b5edaa74..3d08ef2c9 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -33,6 +33,7 @@ import ( v2beta1 "kubesphere.io/api/notification/v2beta1" quotav1alpha2 "kubesphere.io/api/quota/v1alpha2" servicemeshv1alpha2 "kubesphere.io/api/servicemesh/v1alpha2" + storagev1alpha1 "kubesphere.io/api/storage/v1alpha1" tenantv1alpha1 "kubesphere.io/api/tenant/v1alpha1" tenantv1alpha2 "kubesphere.io/api/tenant/v1alpha2" v1beta1 "kubesphere.io/api/types/v1beta1" @@ -148,6 +149,12 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case servicemeshv1alpha2.SchemeGroupVersion.WithResource("strategies"): return &genericInformer{resource: resource.GroupResource(), informer: f.Servicemesh().V1alpha2().Strategies().Informer()}, nil + // Group=storage.kubesphere.io, Version=v1alpha1 + case storagev1alpha1.SchemeGroupVersion.WithResource("provisionercapabilities"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().ProvisionerCapabilities().Informer()}, nil + case storagev1alpha1.SchemeGroupVersion.WithResource("storageclasscapabilities"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().StorageClassCapabilities().Informer()}, nil + // Group=tenant.kubesphere.io, Version=v1alpha1 case tenantv1alpha1.SchemeGroupVersion.WithResource("workspaces"): return &genericInformer{resource: resource.GroupResource(), informer: f.Tenant().V1alpha1().Workspaces().Informer()}, nil diff --git a/pkg/client/informers/externalversions/storage/v1alpha1/interface.go b/pkg/client/informers/externalversions/storage/v1alpha1/interface.go index c68e2a439..01c74e93c 100644 --- a/pkg/client/informers/externalversions/storage/v1alpha1/interface.go +++ b/pkg/client/informers/externalversions/storage/v1alpha1/interface.go @@ -24,6 +24,10 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { + // ProvisionerCapabilities returns a ProvisionerCapabilityInformer. + ProvisionerCapabilities() ProvisionerCapabilityInformer + // StorageClassCapabilities returns a StorageClassCapabilityInformer. + StorageClassCapabilities() StorageClassCapabilityInformer } type version struct { @@ -36,3 +40,13 @@ type version struct { func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } + +// ProvisionerCapabilities returns a ProvisionerCapabilityInformer. +func (v *version) ProvisionerCapabilities() ProvisionerCapabilityInformer { + return &provisionerCapabilityInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// StorageClassCapabilities returns a StorageClassCapabilityInformer. +func (v *version) StorageClassCapabilities() StorageClassCapabilityInformer { + return &storageClassCapabilityInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/pkg/client/informers/externalversions/storage/v1alpha1/provisionercapability.go b/pkg/client/informers/externalversions/storage/v1alpha1/provisionercapability.go new file mode 100644 index 000000000..905f5904c --- /dev/null +++ b/pkg/client/informers/externalversions/storage/v1alpha1/provisionercapability.go @@ -0,0 +1,89 @@ +/* +Copyright 2020 The KubeSphere Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" + storagev1alpha1 "kubesphere.io/api/storage/v1alpha1" + versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned" + internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "kubesphere.io/kubesphere/pkg/client/listers/storage/v1alpha1" +) + +// ProvisionerCapabilityInformer provides access to a shared informer and lister for +// ProvisionerCapabilities. +type ProvisionerCapabilityInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ProvisionerCapabilityLister +} + +type provisionerCapabilityInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewProvisionerCapabilityInformer constructs a new informer for ProvisionerCapability type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewProvisionerCapabilityInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredProvisionerCapabilityInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredProvisionerCapabilityInformer constructs a new informer for ProvisionerCapability type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredProvisionerCapabilityInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StorageV1alpha1().ProvisionerCapabilities().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StorageV1alpha1().ProvisionerCapabilities().Watch(context.TODO(), options) + }, + }, + &storagev1alpha1.ProvisionerCapability{}, + resyncPeriod, + indexers, + ) +} + +func (f *provisionerCapabilityInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredProvisionerCapabilityInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *provisionerCapabilityInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&storagev1alpha1.ProvisionerCapability{}, f.defaultInformer) +} + +func (f *provisionerCapabilityInformer) Lister() v1alpha1.ProvisionerCapabilityLister { + return v1alpha1.NewProvisionerCapabilityLister(f.Informer().GetIndexer()) +} diff --git a/pkg/client/informers/externalversions/storage/v1alpha1/storageclasscapability.go b/pkg/client/informers/externalversions/storage/v1alpha1/storageclasscapability.go new file mode 100644 index 000000000..147955c4b --- /dev/null +++ b/pkg/client/informers/externalversions/storage/v1alpha1/storageclasscapability.go @@ -0,0 +1,89 @@ +/* +Copyright 2020 The KubeSphere Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" + storagev1alpha1 "kubesphere.io/api/storage/v1alpha1" + versioned "kubesphere.io/kubesphere/pkg/client/clientset/versioned" + internalinterfaces "kubesphere.io/kubesphere/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "kubesphere.io/kubesphere/pkg/client/listers/storage/v1alpha1" +) + +// StorageClassCapabilityInformer provides access to a shared informer and lister for +// StorageClassCapabilities. +type StorageClassCapabilityInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.StorageClassCapabilityLister +} + +type storageClassCapabilityInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewStorageClassCapabilityInformer constructs a new informer for StorageClassCapability type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewStorageClassCapabilityInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredStorageClassCapabilityInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredStorageClassCapabilityInformer constructs a new informer for StorageClassCapability type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredStorageClassCapabilityInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StorageV1alpha1().StorageClassCapabilities().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StorageV1alpha1().StorageClassCapabilities().Watch(context.TODO(), options) + }, + }, + &storagev1alpha1.StorageClassCapability{}, + resyncPeriod, + indexers, + ) +} + +func (f *storageClassCapabilityInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredStorageClassCapabilityInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *storageClassCapabilityInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&storagev1alpha1.StorageClassCapability{}, f.defaultInformer) +} + +func (f *storageClassCapabilityInformer) Lister() v1alpha1.StorageClassCapabilityLister { + return v1alpha1.NewStorageClassCapabilityLister(f.Informer().GetIndexer()) +} diff --git a/pkg/client/listers/application/v1alpha1/helmapplication.go b/pkg/client/listers/application/v1alpha1/helmapplication.go index 97b27c378..1a80ea1bb 100644 --- a/pkg/client/listers/application/v1alpha1/helmapplication.go +++ b/pkg/client/listers/application/v1alpha1/helmapplication.go @@ -26,10 +26,13 @@ import ( ) // HelmApplicationLister helps list HelmApplications. +// All objects returned here must be treated as read-only. type HelmApplicationLister interface { // List lists all HelmApplications in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.HelmApplication, err error) // Get retrieves the HelmApplication from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.HelmApplication, error) HelmApplicationListerExpansion } diff --git a/pkg/client/listers/application/v1alpha1/helmapplicationversion.go b/pkg/client/listers/application/v1alpha1/helmapplicationversion.go index 5c7ade6ad..fa4eb18e4 100644 --- a/pkg/client/listers/application/v1alpha1/helmapplicationversion.go +++ b/pkg/client/listers/application/v1alpha1/helmapplicationversion.go @@ -26,10 +26,13 @@ import ( ) // HelmApplicationVersionLister helps list HelmApplicationVersions. +// All objects returned here must be treated as read-only. type HelmApplicationVersionLister interface { // List lists all HelmApplicationVersions in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.HelmApplicationVersion, err error) // Get retrieves the HelmApplicationVersion from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.HelmApplicationVersion, error) HelmApplicationVersionListerExpansion } diff --git a/pkg/client/listers/application/v1alpha1/helmcategory.go b/pkg/client/listers/application/v1alpha1/helmcategory.go index 3f3bce3e4..886f99bf1 100644 --- a/pkg/client/listers/application/v1alpha1/helmcategory.go +++ b/pkg/client/listers/application/v1alpha1/helmcategory.go @@ -26,10 +26,13 @@ import ( ) // HelmCategoryLister helps list HelmCategories. +// All objects returned here must be treated as read-only. type HelmCategoryLister interface { // List lists all HelmCategories in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.HelmCategory, err error) // Get retrieves the HelmCategory from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.HelmCategory, error) HelmCategoryListerExpansion } diff --git a/pkg/client/listers/application/v1alpha1/helmrelease.go b/pkg/client/listers/application/v1alpha1/helmrelease.go index 1bb1c12fe..57f389021 100644 --- a/pkg/client/listers/application/v1alpha1/helmrelease.go +++ b/pkg/client/listers/application/v1alpha1/helmrelease.go @@ -26,10 +26,13 @@ import ( ) // HelmReleaseLister helps list HelmReleases. +// All objects returned here must be treated as read-only. type HelmReleaseLister interface { // List lists all HelmReleases in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.HelmRelease, err error) // Get retrieves the HelmRelease from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.HelmRelease, error) HelmReleaseListerExpansion } diff --git a/pkg/client/listers/application/v1alpha1/helmrepo.go b/pkg/client/listers/application/v1alpha1/helmrepo.go index 432e2030e..3dde65415 100644 --- a/pkg/client/listers/application/v1alpha1/helmrepo.go +++ b/pkg/client/listers/application/v1alpha1/helmrepo.go @@ -26,10 +26,13 @@ import ( ) // HelmRepoLister helps list HelmRepos. +// All objects returned here must be treated as read-only. type HelmRepoLister interface { // List lists all HelmRepos in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.HelmRepo, err error) // Get retrieves the HelmRepo from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.HelmRepo, error) HelmRepoListerExpansion } diff --git a/pkg/client/listers/auditing/v1alpha1/rule.go b/pkg/client/listers/auditing/v1alpha1/rule.go index e9ca327fd..0f212060d 100644 --- a/pkg/client/listers/auditing/v1alpha1/rule.go +++ b/pkg/client/listers/auditing/v1alpha1/rule.go @@ -26,10 +26,13 @@ import ( ) // RuleLister helps list Rules. +// All objects returned here must be treated as read-only. type RuleLister interface { // List lists all Rules in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.Rule, err error) // Get retrieves the Rule from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.Rule, error) RuleListerExpansion } diff --git a/pkg/client/listers/auditing/v1alpha1/webhook.go b/pkg/client/listers/auditing/v1alpha1/webhook.go index c9a78496c..844d0e9e8 100644 --- a/pkg/client/listers/auditing/v1alpha1/webhook.go +++ b/pkg/client/listers/auditing/v1alpha1/webhook.go @@ -26,10 +26,13 @@ import ( ) // WebhookLister helps list Webhooks. +// All objects returned here must be treated as read-only. type WebhookLister interface { // List lists all Webhooks in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.Webhook, err error) // Get retrieves the Webhook from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.Webhook, error) WebhookListerExpansion } diff --git a/pkg/client/listers/cluster/v1alpha1/cluster.go b/pkg/client/listers/cluster/v1alpha1/cluster.go index 63b96c3bd..1c812476a 100644 --- a/pkg/client/listers/cluster/v1alpha1/cluster.go +++ b/pkg/client/listers/cluster/v1alpha1/cluster.go @@ -26,10 +26,13 @@ import ( ) // ClusterLister helps list Clusters. +// All objects returned here must be treated as read-only. type ClusterLister interface { // List lists all Clusters in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.Cluster, err error) // Get retrieves the Cluster from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.Cluster, error) ClusterListerExpansion } diff --git a/pkg/client/listers/devops/v1alpha1/s2ibinary.go b/pkg/client/listers/devops/v1alpha1/s2ibinary.go index 6a74ebd63..8893ec609 100644 --- a/pkg/client/listers/devops/v1alpha1/s2ibinary.go +++ b/pkg/client/listers/devops/v1alpha1/s2ibinary.go @@ -26,8 +26,10 @@ import ( ) // S2iBinaryLister helps list S2iBinaries. +// All objects returned here must be treated as read-only. type S2iBinaryLister interface { // List lists all S2iBinaries in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.S2iBinary, err error) // S2iBinaries returns an object that can list and get S2iBinaries. S2iBinaries(namespace string) S2iBinaryNamespaceLister @@ -58,10 +60,13 @@ func (s *s2iBinaryLister) S2iBinaries(namespace string) S2iBinaryNamespaceLister } // S2iBinaryNamespaceLister helps list and get S2iBinaries. +// All objects returned here must be treated as read-only. type S2iBinaryNamespaceLister interface { // List lists all S2iBinaries in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.S2iBinary, err error) // Get retrieves the S2iBinary from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.S2iBinary, error) S2iBinaryNamespaceListerExpansion } diff --git a/pkg/client/listers/devops/v1alpha1/s2ibuilder.go b/pkg/client/listers/devops/v1alpha1/s2ibuilder.go index 7a9801433..b0a7bf1ea 100644 --- a/pkg/client/listers/devops/v1alpha1/s2ibuilder.go +++ b/pkg/client/listers/devops/v1alpha1/s2ibuilder.go @@ -26,8 +26,10 @@ import ( ) // S2iBuilderLister helps list S2iBuilders. +// All objects returned here must be treated as read-only. type S2iBuilderLister interface { // List lists all S2iBuilders in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.S2iBuilder, err error) // S2iBuilders returns an object that can list and get S2iBuilders. S2iBuilders(namespace string) S2iBuilderNamespaceLister @@ -58,10 +60,13 @@ func (s *s2iBuilderLister) S2iBuilders(namespace string) S2iBuilderNamespaceList } // S2iBuilderNamespaceLister helps list and get S2iBuilders. +// All objects returned here must be treated as read-only. type S2iBuilderNamespaceLister interface { // List lists all S2iBuilders in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.S2iBuilder, err error) // Get retrieves the S2iBuilder from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.S2iBuilder, error) S2iBuilderNamespaceListerExpansion } diff --git a/pkg/client/listers/devops/v1alpha1/s2ibuildertemplate.go b/pkg/client/listers/devops/v1alpha1/s2ibuildertemplate.go index 495674db3..a7810ec06 100644 --- a/pkg/client/listers/devops/v1alpha1/s2ibuildertemplate.go +++ b/pkg/client/listers/devops/v1alpha1/s2ibuildertemplate.go @@ -26,10 +26,13 @@ import ( ) // S2iBuilderTemplateLister helps list S2iBuilderTemplates. +// All objects returned here must be treated as read-only. type S2iBuilderTemplateLister interface { // List lists all S2iBuilderTemplates in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.S2iBuilderTemplate, err error) // Get retrieves the S2iBuilderTemplate from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.S2iBuilderTemplate, error) S2iBuilderTemplateListerExpansion } diff --git a/pkg/client/listers/devops/v1alpha1/s2irun.go b/pkg/client/listers/devops/v1alpha1/s2irun.go index 5f27d5d77..04fbd3234 100644 --- a/pkg/client/listers/devops/v1alpha1/s2irun.go +++ b/pkg/client/listers/devops/v1alpha1/s2irun.go @@ -26,8 +26,10 @@ import ( ) // S2iRunLister helps list S2iRuns. +// All objects returned here must be treated as read-only. type S2iRunLister interface { // List lists all S2iRuns in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.S2iRun, err error) // S2iRuns returns an object that can list and get S2iRuns. S2iRuns(namespace string) S2iRunNamespaceLister @@ -58,10 +60,13 @@ func (s *s2iRunLister) S2iRuns(namespace string) S2iRunNamespaceLister { } // S2iRunNamespaceLister helps list and get S2iRuns. +// All objects returned here must be treated as read-only. type S2iRunNamespaceLister interface { // List lists all S2iRuns in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.S2iRun, err error) // Get retrieves the S2iRun from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.S2iRun, error) S2iRunNamespaceListerExpansion } diff --git a/pkg/client/listers/devops/v1alpha3/devopsproject.go b/pkg/client/listers/devops/v1alpha3/devopsproject.go index d2c307096..f75402c30 100644 --- a/pkg/client/listers/devops/v1alpha3/devopsproject.go +++ b/pkg/client/listers/devops/v1alpha3/devopsproject.go @@ -26,10 +26,13 @@ import ( ) // DevOpsProjectLister helps list DevOpsProjects. +// All objects returned here must be treated as read-only. type DevOpsProjectLister interface { // List lists all DevOpsProjects in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha3.DevOpsProject, err error) // Get retrieves the DevOpsProject from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha3.DevOpsProject, error) DevOpsProjectListerExpansion } diff --git a/pkg/client/listers/devops/v1alpha3/pipeline.go b/pkg/client/listers/devops/v1alpha3/pipeline.go index 00c76c9ce..6a4dce820 100644 --- a/pkg/client/listers/devops/v1alpha3/pipeline.go +++ b/pkg/client/listers/devops/v1alpha3/pipeline.go @@ -26,8 +26,10 @@ import ( ) // PipelineLister helps list Pipelines. +// All objects returned here must be treated as read-only. type PipelineLister interface { // List lists all Pipelines in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha3.Pipeline, err error) // Pipelines returns an object that can list and get Pipelines. Pipelines(namespace string) PipelineNamespaceLister @@ -58,10 +60,13 @@ func (s *pipelineLister) Pipelines(namespace string) PipelineNamespaceLister { } // PipelineNamespaceLister helps list and get Pipelines. +// All objects returned here must be treated as read-only. type PipelineNamespaceLister interface { // List lists all Pipelines in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha3.Pipeline, err error) // Get retrieves the Pipeline from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha3.Pipeline, error) PipelineNamespaceListerExpansion } diff --git a/pkg/client/listers/iam/v1alpha2/globalrole.go b/pkg/client/listers/iam/v1alpha2/globalrole.go index a03c34763..3d4a5cdda 100644 --- a/pkg/client/listers/iam/v1alpha2/globalrole.go +++ b/pkg/client/listers/iam/v1alpha2/globalrole.go @@ -26,10 +26,13 @@ import ( ) // GlobalRoleLister helps list GlobalRoles. +// All objects returned here must be treated as read-only. type GlobalRoleLister interface { // List lists all GlobalRoles in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.GlobalRole, err error) // Get retrieves the GlobalRole from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.GlobalRole, error) GlobalRoleListerExpansion } diff --git a/pkg/client/listers/iam/v1alpha2/globalrolebinding.go b/pkg/client/listers/iam/v1alpha2/globalrolebinding.go index 278154bfc..70e8d4128 100644 --- a/pkg/client/listers/iam/v1alpha2/globalrolebinding.go +++ b/pkg/client/listers/iam/v1alpha2/globalrolebinding.go @@ -26,10 +26,13 @@ import ( ) // GlobalRoleBindingLister helps list GlobalRoleBindings. +// All objects returned here must be treated as read-only. type GlobalRoleBindingLister interface { // List lists all GlobalRoleBindings in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.GlobalRoleBinding, err error) // Get retrieves the GlobalRoleBinding from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.GlobalRoleBinding, error) GlobalRoleBindingListerExpansion } diff --git a/pkg/client/listers/iam/v1alpha2/group.go b/pkg/client/listers/iam/v1alpha2/group.go index 5c7bd6a24..2bbad5846 100644 --- a/pkg/client/listers/iam/v1alpha2/group.go +++ b/pkg/client/listers/iam/v1alpha2/group.go @@ -26,10 +26,13 @@ import ( ) // GroupLister helps list Groups. +// All objects returned here must be treated as read-only. type GroupLister interface { // List lists all Groups in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.Group, err error) // Get retrieves the Group from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.Group, error) GroupListerExpansion } diff --git a/pkg/client/listers/iam/v1alpha2/groupbinding.go b/pkg/client/listers/iam/v1alpha2/groupbinding.go index a72927b27..e5c050a58 100644 --- a/pkg/client/listers/iam/v1alpha2/groupbinding.go +++ b/pkg/client/listers/iam/v1alpha2/groupbinding.go @@ -26,10 +26,13 @@ import ( ) // GroupBindingLister helps list GroupBindings. +// All objects returned here must be treated as read-only. type GroupBindingLister interface { // List lists all GroupBindings in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.GroupBinding, err error) // Get retrieves the GroupBinding from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.GroupBinding, error) GroupBindingListerExpansion } diff --git a/pkg/client/listers/iam/v1alpha2/loginrecord.go b/pkg/client/listers/iam/v1alpha2/loginrecord.go index c5eb4dc7e..a4be3e1b1 100644 --- a/pkg/client/listers/iam/v1alpha2/loginrecord.go +++ b/pkg/client/listers/iam/v1alpha2/loginrecord.go @@ -26,10 +26,13 @@ import ( ) // LoginRecordLister helps list LoginRecords. +// All objects returned here must be treated as read-only. type LoginRecordLister interface { // List lists all LoginRecords in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.LoginRecord, err error) // Get retrieves the LoginRecord from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.LoginRecord, error) LoginRecordListerExpansion } diff --git a/pkg/client/listers/iam/v1alpha2/rolebase.go b/pkg/client/listers/iam/v1alpha2/rolebase.go index 81e136e34..4944de48f 100644 --- a/pkg/client/listers/iam/v1alpha2/rolebase.go +++ b/pkg/client/listers/iam/v1alpha2/rolebase.go @@ -26,10 +26,13 @@ import ( ) // RoleBaseLister helps list RoleBases. +// All objects returned here must be treated as read-only. type RoleBaseLister interface { // List lists all RoleBases in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.RoleBase, err error) // Get retrieves the RoleBase from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.RoleBase, error) RoleBaseListerExpansion } diff --git a/pkg/client/listers/iam/v1alpha2/user.go b/pkg/client/listers/iam/v1alpha2/user.go index 4e0920377..4ddaaf1ed 100644 --- a/pkg/client/listers/iam/v1alpha2/user.go +++ b/pkg/client/listers/iam/v1alpha2/user.go @@ -26,10 +26,13 @@ import ( ) // UserLister helps list Users. +// All objects returned here must be treated as read-only. type UserLister interface { // List lists all Users in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.User, err error) // Get retrieves the User from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.User, error) UserListerExpansion } diff --git a/pkg/client/listers/iam/v1alpha2/workspacerole.go b/pkg/client/listers/iam/v1alpha2/workspacerole.go index e94a4ad67..6d93d9a15 100644 --- a/pkg/client/listers/iam/v1alpha2/workspacerole.go +++ b/pkg/client/listers/iam/v1alpha2/workspacerole.go @@ -26,10 +26,13 @@ import ( ) // WorkspaceRoleLister helps list WorkspaceRoles. +// All objects returned here must be treated as read-only. type WorkspaceRoleLister interface { // List lists all WorkspaceRoles in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.WorkspaceRole, err error) // Get retrieves the WorkspaceRole from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.WorkspaceRole, error) WorkspaceRoleListerExpansion } diff --git a/pkg/client/listers/iam/v1alpha2/workspacerolebinding.go b/pkg/client/listers/iam/v1alpha2/workspacerolebinding.go index e4684cf06..33d70b806 100644 --- a/pkg/client/listers/iam/v1alpha2/workspacerolebinding.go +++ b/pkg/client/listers/iam/v1alpha2/workspacerolebinding.go @@ -26,10 +26,13 @@ import ( ) // WorkspaceRoleBindingLister helps list WorkspaceRoleBindings. +// All objects returned here must be treated as read-only. type WorkspaceRoleBindingLister interface { // List lists all WorkspaceRoleBindings in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.WorkspaceRoleBinding, err error) // Get retrieves the WorkspaceRoleBinding from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.WorkspaceRoleBinding, error) WorkspaceRoleBindingListerExpansion } diff --git a/pkg/client/listers/network/v1alpha1/ipamblock.go b/pkg/client/listers/network/v1alpha1/ipamblock.go index 8039d46cf..e027a4b54 100644 --- a/pkg/client/listers/network/v1alpha1/ipamblock.go +++ b/pkg/client/listers/network/v1alpha1/ipamblock.go @@ -26,10 +26,13 @@ import ( ) // IPAMBlockLister helps list IPAMBlocks. +// All objects returned here must be treated as read-only. type IPAMBlockLister interface { // List lists all IPAMBlocks in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.IPAMBlock, err error) // Get retrieves the IPAMBlock from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.IPAMBlock, error) IPAMBlockListerExpansion } diff --git a/pkg/client/listers/network/v1alpha1/ipamhandle.go b/pkg/client/listers/network/v1alpha1/ipamhandle.go index ca426eeab..d934f0a76 100644 --- a/pkg/client/listers/network/v1alpha1/ipamhandle.go +++ b/pkg/client/listers/network/v1alpha1/ipamhandle.go @@ -26,10 +26,13 @@ import ( ) // IPAMHandleLister helps list IPAMHandles. +// All objects returned here must be treated as read-only. type IPAMHandleLister interface { // List lists all IPAMHandles in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.IPAMHandle, err error) // Get retrieves the IPAMHandle from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.IPAMHandle, error) IPAMHandleListerExpansion } diff --git a/pkg/client/listers/network/v1alpha1/ippool.go b/pkg/client/listers/network/v1alpha1/ippool.go index d4393fd27..eeadaff89 100644 --- a/pkg/client/listers/network/v1alpha1/ippool.go +++ b/pkg/client/listers/network/v1alpha1/ippool.go @@ -26,10 +26,13 @@ import ( ) // IPPoolLister helps list IPPools. +// All objects returned here must be treated as read-only. type IPPoolLister interface { // List lists all IPPools in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.IPPool, err error) // Get retrieves the IPPool from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.IPPool, error) IPPoolListerExpansion } diff --git a/pkg/client/listers/network/v1alpha1/namespacenetworkpolicy.go b/pkg/client/listers/network/v1alpha1/namespacenetworkpolicy.go index bc794f434..f6d849ee2 100644 --- a/pkg/client/listers/network/v1alpha1/namespacenetworkpolicy.go +++ b/pkg/client/listers/network/v1alpha1/namespacenetworkpolicy.go @@ -26,8 +26,10 @@ import ( ) // NamespaceNetworkPolicyLister helps list NamespaceNetworkPolicies. +// All objects returned here must be treated as read-only. type NamespaceNetworkPolicyLister interface { // List lists all NamespaceNetworkPolicies in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.NamespaceNetworkPolicy, err error) // NamespaceNetworkPolicies returns an object that can list and get NamespaceNetworkPolicies. NamespaceNetworkPolicies(namespace string) NamespaceNetworkPolicyNamespaceLister @@ -58,10 +60,13 @@ func (s *namespaceNetworkPolicyLister) NamespaceNetworkPolicies(namespace string } // NamespaceNetworkPolicyNamespaceLister helps list and get NamespaceNetworkPolicies. +// All objects returned here must be treated as read-only. type NamespaceNetworkPolicyNamespaceLister interface { // List lists all NamespaceNetworkPolicies in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.NamespaceNetworkPolicy, err error) // Get retrieves the NamespaceNetworkPolicy from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.NamespaceNetworkPolicy, error) NamespaceNetworkPolicyNamespaceListerExpansion } diff --git a/pkg/client/listers/notification/v2beta1/config.go b/pkg/client/listers/notification/v2beta1/config.go index 0877076a7..fb2a1f2db 100644 --- a/pkg/client/listers/notification/v2beta1/config.go +++ b/pkg/client/listers/notification/v2beta1/config.go @@ -26,10 +26,13 @@ import ( ) // ConfigLister helps list Configs. +// All objects returned here must be treated as read-only. type ConfigLister interface { // List lists all Configs in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v2beta1.Config, err error) // Get retrieves the Config from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v2beta1.Config, error) ConfigListerExpansion } diff --git a/pkg/client/listers/notification/v2beta1/receiver.go b/pkg/client/listers/notification/v2beta1/receiver.go index d99e905be..bc57950e2 100644 --- a/pkg/client/listers/notification/v2beta1/receiver.go +++ b/pkg/client/listers/notification/v2beta1/receiver.go @@ -26,10 +26,13 @@ import ( ) // ReceiverLister helps list Receivers. +// All objects returned here must be treated as read-only. type ReceiverLister interface { // List lists all Receivers in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v2beta1.Receiver, err error) // Get retrieves the Receiver from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v2beta1.Receiver, error) ReceiverListerExpansion } diff --git a/pkg/client/listers/quota/v1alpha2/resourcequota.go b/pkg/client/listers/quota/v1alpha2/resourcequota.go index 927880271..a5ecfb3e6 100644 --- a/pkg/client/listers/quota/v1alpha2/resourcequota.go +++ b/pkg/client/listers/quota/v1alpha2/resourcequota.go @@ -26,10 +26,13 @@ import ( ) // ResourceQuotaLister helps list ResourceQuotas. +// All objects returned here must be treated as read-only. type ResourceQuotaLister interface { // List lists all ResourceQuotas in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.ResourceQuota, err error) // Get retrieves the ResourceQuota from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.ResourceQuota, error) ResourceQuotaListerExpansion } diff --git a/pkg/client/listers/servicemesh/v1alpha2/servicepolicy.go b/pkg/client/listers/servicemesh/v1alpha2/servicepolicy.go index e133683c3..da519cdbd 100644 --- a/pkg/client/listers/servicemesh/v1alpha2/servicepolicy.go +++ b/pkg/client/listers/servicemesh/v1alpha2/servicepolicy.go @@ -26,8 +26,10 @@ import ( ) // ServicePolicyLister helps list ServicePolicies. +// All objects returned here must be treated as read-only. type ServicePolicyLister interface { // List lists all ServicePolicies in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.ServicePolicy, err error) // ServicePolicies returns an object that can list and get ServicePolicies. ServicePolicies(namespace string) ServicePolicyNamespaceLister @@ -58,10 +60,13 @@ func (s *servicePolicyLister) ServicePolicies(namespace string) ServicePolicyNam } // ServicePolicyNamespaceLister helps list and get ServicePolicies. +// All objects returned here must be treated as read-only. type ServicePolicyNamespaceLister interface { // List lists all ServicePolicies in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.ServicePolicy, err error) // Get retrieves the ServicePolicy from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.ServicePolicy, error) ServicePolicyNamespaceListerExpansion } diff --git a/pkg/client/listers/servicemesh/v1alpha2/strategy.go b/pkg/client/listers/servicemesh/v1alpha2/strategy.go index 5b9d0a574..ad27b3c70 100644 --- a/pkg/client/listers/servicemesh/v1alpha2/strategy.go +++ b/pkg/client/listers/servicemesh/v1alpha2/strategy.go @@ -26,8 +26,10 @@ import ( ) // StrategyLister helps list Strategies. +// All objects returned here must be treated as read-only. type StrategyLister interface { // List lists all Strategies in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.Strategy, err error) // Strategies returns an object that can list and get Strategies. Strategies(namespace string) StrategyNamespaceLister @@ -58,10 +60,13 @@ func (s *strategyLister) Strategies(namespace string) StrategyNamespaceLister { } // StrategyNamespaceLister helps list and get Strategies. +// All objects returned here must be treated as read-only. type StrategyNamespaceLister interface { // List lists all Strategies in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.Strategy, err error) // Get retrieves the Strategy from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.Strategy, error) StrategyNamespaceListerExpansion } diff --git a/pkg/client/listers/storage/v1alpha1/provisionercapability.go b/pkg/client/listers/storage/v1alpha1/provisionercapability.go index ebe0e9a29..7f1bba607 100644 --- a/pkg/client/listers/storage/v1alpha1/provisionercapability.go +++ b/pkg/client/listers/storage/v1alpha1/provisionercapability.go @@ -26,10 +26,13 @@ import ( ) // ProvisionerCapabilityLister helps list ProvisionerCapabilities. +// All objects returned here must be treated as read-only. type ProvisionerCapabilityLister interface { // List lists all ProvisionerCapabilities in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.ProvisionerCapability, err error) // Get retrieves the ProvisionerCapability from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.ProvisionerCapability, error) ProvisionerCapabilityListerExpansion } diff --git a/pkg/client/listers/storage/v1alpha1/storageclasscapability.go b/pkg/client/listers/storage/v1alpha1/storageclasscapability.go index 38a5c456e..576e36977 100644 --- a/pkg/client/listers/storage/v1alpha1/storageclasscapability.go +++ b/pkg/client/listers/storage/v1alpha1/storageclasscapability.go @@ -26,10 +26,13 @@ import ( ) // StorageClassCapabilityLister helps list StorageClassCapabilities. +// All objects returned here must be treated as read-only. type StorageClassCapabilityLister interface { // List lists all StorageClassCapabilities in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.StorageClassCapability, err error) // Get retrieves the StorageClassCapability from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.StorageClassCapability, error) StorageClassCapabilityListerExpansion } diff --git a/pkg/client/listers/tenant/v1alpha1/workspace.go b/pkg/client/listers/tenant/v1alpha1/workspace.go index 0ca64b330..da7ec566e 100644 --- a/pkg/client/listers/tenant/v1alpha1/workspace.go +++ b/pkg/client/listers/tenant/v1alpha1/workspace.go @@ -26,10 +26,13 @@ import ( ) // WorkspaceLister helps list Workspaces. +// All objects returned here must be treated as read-only. type WorkspaceLister interface { // List lists all Workspaces in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha1.Workspace, err error) // Get retrieves the Workspace from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha1.Workspace, error) WorkspaceListerExpansion } diff --git a/pkg/client/listers/tenant/v1alpha2/workspacetemplate.go b/pkg/client/listers/tenant/v1alpha2/workspacetemplate.go index 565492a50..0562e5741 100644 --- a/pkg/client/listers/tenant/v1alpha2/workspacetemplate.go +++ b/pkg/client/listers/tenant/v1alpha2/workspacetemplate.go @@ -26,10 +26,13 @@ import ( ) // WorkspaceTemplateLister helps list WorkspaceTemplates. +// All objects returned here must be treated as read-only. type WorkspaceTemplateLister interface { // List lists all WorkspaceTemplates in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1alpha2.WorkspaceTemplate, err error) // Get retrieves the WorkspaceTemplate from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1alpha2.WorkspaceTemplate, error) WorkspaceTemplateListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedapplication.go b/pkg/client/listers/types/v1beta1/federatedapplication.go index 7cf19bc0a..62dad1bb6 100644 --- a/pkg/client/listers/types/v1beta1/federatedapplication.go +++ b/pkg/client/listers/types/v1beta1/federatedapplication.go @@ -26,8 +26,10 @@ import ( ) // FederatedApplicationLister helps list FederatedApplications. +// All objects returned here must be treated as read-only. type FederatedApplicationLister interface { // List lists all FederatedApplications in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedApplication, err error) // FederatedApplications returns an object that can list and get FederatedApplications. FederatedApplications(namespace string) FederatedApplicationNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedApplicationLister) FederatedApplications(namespace string) Fed } // FederatedApplicationNamespaceLister helps list and get FederatedApplications. +// All objects returned here must be treated as read-only. type FederatedApplicationNamespaceLister interface { // List lists all FederatedApplications in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedApplication, err error) // Get retrieves the FederatedApplication from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedApplication, error) FederatedApplicationNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedclusterrole.go b/pkg/client/listers/types/v1beta1/federatedclusterrole.go index e1f7fc891..b5f33ffb1 100644 --- a/pkg/client/listers/types/v1beta1/federatedclusterrole.go +++ b/pkg/client/listers/types/v1beta1/federatedclusterrole.go @@ -26,8 +26,10 @@ import ( ) // FederatedClusterRoleLister helps list FederatedClusterRoles. +// All objects returned here must be treated as read-only. type FederatedClusterRoleLister interface { // List lists all FederatedClusterRoles in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedClusterRole, err error) // FederatedClusterRoles returns an object that can list and get FederatedClusterRoles. FederatedClusterRoles(namespace string) FederatedClusterRoleNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedClusterRoleLister) FederatedClusterRoles(namespace string) Fed } // FederatedClusterRoleNamespaceLister helps list and get FederatedClusterRoles. +// All objects returned here must be treated as read-only. type FederatedClusterRoleNamespaceLister interface { // List lists all FederatedClusterRoles in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedClusterRole, err error) // Get retrieves the FederatedClusterRole from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedClusterRole, error) FederatedClusterRoleNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedclusterrolebinding.go b/pkg/client/listers/types/v1beta1/federatedclusterrolebinding.go index 22459fb4d..03d024ee2 100644 --- a/pkg/client/listers/types/v1beta1/federatedclusterrolebinding.go +++ b/pkg/client/listers/types/v1beta1/federatedclusterrolebinding.go @@ -26,8 +26,10 @@ import ( ) // FederatedClusterRoleBindingLister helps list FederatedClusterRoleBindings. +// All objects returned here must be treated as read-only. type FederatedClusterRoleBindingLister interface { // List lists all FederatedClusterRoleBindings in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedClusterRoleBinding, err error) // FederatedClusterRoleBindings returns an object that can list and get FederatedClusterRoleBindings. FederatedClusterRoleBindings(namespace string) FederatedClusterRoleBindingNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedClusterRoleBindingLister) FederatedClusterRoleBindings(namespa } // FederatedClusterRoleBindingNamespaceLister helps list and get FederatedClusterRoleBindings. +// All objects returned here must be treated as read-only. type FederatedClusterRoleBindingNamespaceLister interface { // List lists all FederatedClusterRoleBindings in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedClusterRoleBinding, err error) // Get retrieves the FederatedClusterRoleBinding from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedClusterRoleBinding, error) FederatedClusterRoleBindingNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedconfigmap.go b/pkg/client/listers/types/v1beta1/federatedconfigmap.go index 30ed24462..5e41e5cc2 100644 --- a/pkg/client/listers/types/v1beta1/federatedconfigmap.go +++ b/pkg/client/listers/types/v1beta1/federatedconfigmap.go @@ -26,8 +26,10 @@ import ( ) // FederatedConfigMapLister helps list FederatedConfigMaps. +// All objects returned here must be treated as read-only. type FederatedConfigMapLister interface { // List lists all FederatedConfigMaps in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedConfigMap, err error) // FederatedConfigMaps returns an object that can list and get FederatedConfigMaps. FederatedConfigMaps(namespace string) FederatedConfigMapNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedConfigMapLister) FederatedConfigMaps(namespace string) Federat } // FederatedConfigMapNamespaceLister helps list and get FederatedConfigMaps. +// All objects returned here must be treated as read-only. type FederatedConfigMapNamespaceLister interface { // List lists all FederatedConfigMaps in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedConfigMap, err error) // Get retrieves the FederatedConfigMap from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedConfigMap, error) FederatedConfigMapNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federateddeployment.go b/pkg/client/listers/types/v1beta1/federateddeployment.go index 6c42fb5ce..a0192af28 100644 --- a/pkg/client/listers/types/v1beta1/federateddeployment.go +++ b/pkg/client/listers/types/v1beta1/federateddeployment.go @@ -26,8 +26,10 @@ import ( ) // FederatedDeploymentLister helps list FederatedDeployments. +// All objects returned here must be treated as read-only. type FederatedDeploymentLister interface { // List lists all FederatedDeployments in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedDeployment, err error) // FederatedDeployments returns an object that can list and get FederatedDeployments. FederatedDeployments(namespace string) FederatedDeploymentNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedDeploymentLister) FederatedDeployments(namespace string) Feder } // FederatedDeploymentNamespaceLister helps list and get FederatedDeployments. +// All objects returned here must be treated as read-only. type FederatedDeploymentNamespaceLister interface { // List lists all FederatedDeployments in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedDeployment, err error) // Get retrieves the FederatedDeployment from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedDeployment, error) FederatedDeploymentNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedgroup.go b/pkg/client/listers/types/v1beta1/federatedgroup.go index 67e95f80b..9bbd4a4ff 100644 --- a/pkg/client/listers/types/v1beta1/federatedgroup.go +++ b/pkg/client/listers/types/v1beta1/federatedgroup.go @@ -26,10 +26,13 @@ import ( ) // FederatedGroupLister helps list FederatedGroups. +// All objects returned here must be treated as read-only. type FederatedGroupLister interface { // List lists all FederatedGroups in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedGroup, err error) // Get retrieves the FederatedGroup from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedGroup, error) FederatedGroupListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedgroupbinding.go b/pkg/client/listers/types/v1beta1/federatedgroupbinding.go index 4196a3574..e6b9290bf 100644 --- a/pkg/client/listers/types/v1beta1/federatedgroupbinding.go +++ b/pkg/client/listers/types/v1beta1/federatedgroupbinding.go @@ -26,10 +26,13 @@ import ( ) // FederatedGroupBindingLister helps list FederatedGroupBindings. +// All objects returned here must be treated as read-only. type FederatedGroupBindingLister interface { // List lists all FederatedGroupBindings in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedGroupBinding, err error) // Get retrieves the FederatedGroupBinding from the index for a given name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedGroupBinding, error) FederatedGroupBindingListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedingress.go b/pkg/client/listers/types/v1beta1/federatedingress.go index 4b8d877ee..fb7ff2547 100644 --- a/pkg/client/listers/types/v1beta1/federatedingress.go +++ b/pkg/client/listers/types/v1beta1/federatedingress.go @@ -26,8 +26,10 @@ import ( ) // FederatedIngressLister helps list FederatedIngresses. +// All objects returned here must be treated as read-only. type FederatedIngressLister interface { // List lists all FederatedIngresses in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedIngress, err error) // FederatedIngresses returns an object that can list and get FederatedIngresses. FederatedIngresses(namespace string) FederatedIngressNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedIngressLister) FederatedIngresses(namespace string) FederatedI } // FederatedIngressNamespaceLister helps list and get FederatedIngresses. +// All objects returned here must be treated as read-only. type FederatedIngressNamespaceLister interface { // List lists all FederatedIngresses in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedIngress, err error) // Get retrieves the FederatedIngress from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedIngress, error) FederatedIngressNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedjob.go b/pkg/client/listers/types/v1beta1/federatedjob.go index d59f34aeb..d9f2ee59c 100644 --- a/pkg/client/listers/types/v1beta1/federatedjob.go +++ b/pkg/client/listers/types/v1beta1/federatedjob.go @@ -26,8 +26,10 @@ import ( ) // FederatedJobLister helps list FederatedJobs. +// All objects returned here must be treated as read-only. type FederatedJobLister interface { // List lists all FederatedJobs in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedJob, err error) // FederatedJobs returns an object that can list and get FederatedJobs. FederatedJobs(namespace string) FederatedJobNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedJobLister) FederatedJobs(namespace string) FederatedJobNamespa } // FederatedJobNamespaceLister helps list and get FederatedJobs. +// All objects returned here must be treated as read-only. type FederatedJobNamespaceLister interface { // List lists all FederatedJobs in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedJob, err error) // Get retrieves the FederatedJob from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedJob, error) FederatedJobNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedlimitrange.go b/pkg/client/listers/types/v1beta1/federatedlimitrange.go index 2c2aa937e..1191666c6 100644 --- a/pkg/client/listers/types/v1beta1/federatedlimitrange.go +++ b/pkg/client/listers/types/v1beta1/federatedlimitrange.go @@ -26,8 +26,10 @@ import ( ) // FederatedLimitRangeLister helps list FederatedLimitRanges. +// All objects returned here must be treated as read-only. type FederatedLimitRangeLister interface { // List lists all FederatedLimitRanges in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedLimitRange, err error) // FederatedLimitRanges returns an object that can list and get FederatedLimitRanges. FederatedLimitRanges(namespace string) FederatedLimitRangeNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedLimitRangeLister) FederatedLimitRanges(namespace string) Feder } // FederatedLimitRangeNamespaceLister helps list and get FederatedLimitRanges. +// All objects returned here must be treated as read-only. type FederatedLimitRangeNamespaceLister interface { // List lists all FederatedLimitRanges in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedLimitRange, err error) // Get retrieves the FederatedLimitRange from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedLimitRange, error) FederatedLimitRangeNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatednamespace.go b/pkg/client/listers/types/v1beta1/federatednamespace.go index 58677c76c..26408c470 100644 --- a/pkg/client/listers/types/v1beta1/federatednamespace.go +++ b/pkg/client/listers/types/v1beta1/federatednamespace.go @@ -26,8 +26,10 @@ import ( ) // FederatedNamespaceLister helps list FederatedNamespaces. +// All objects returned here must be treated as read-only. type FederatedNamespaceLister interface { // List lists all FederatedNamespaces in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedNamespace, err error) // FederatedNamespaces returns an object that can list and get FederatedNamespaces. FederatedNamespaces(namespace string) FederatedNamespaceNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedNamespaceLister) FederatedNamespaces(namespace string) Federat } // FederatedNamespaceNamespaceLister helps list and get FederatedNamespaces. +// All objects returned here must be treated as read-only. type FederatedNamespaceNamespaceLister interface { // List lists all FederatedNamespaces in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedNamespace, err error) // Get retrieves the FederatedNamespace from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedNamespace, error) FederatedNamespaceNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedpersistentvolumeclaim.go b/pkg/client/listers/types/v1beta1/federatedpersistentvolumeclaim.go index 2b9d73cd7..e67a8caaf 100644 --- a/pkg/client/listers/types/v1beta1/federatedpersistentvolumeclaim.go +++ b/pkg/client/listers/types/v1beta1/federatedpersistentvolumeclaim.go @@ -26,8 +26,10 @@ import ( ) // FederatedPersistentVolumeClaimLister helps list FederatedPersistentVolumeClaims. +// All objects returned here must be treated as read-only. type FederatedPersistentVolumeClaimLister interface { // List lists all FederatedPersistentVolumeClaims in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedPersistentVolumeClaim, err error) // FederatedPersistentVolumeClaims returns an object that can list and get FederatedPersistentVolumeClaims. FederatedPersistentVolumeClaims(namespace string) FederatedPersistentVolumeClaimNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedPersistentVolumeClaimLister) FederatedPersistentVolumeClaims(n } // FederatedPersistentVolumeClaimNamespaceLister helps list and get FederatedPersistentVolumeClaims. +// All objects returned here must be treated as read-only. type FederatedPersistentVolumeClaimNamespaceLister interface { // List lists all FederatedPersistentVolumeClaims in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedPersistentVolumeClaim, err error) // Get retrieves the FederatedPersistentVolumeClaim from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedPersistentVolumeClaim, error) FederatedPersistentVolumeClaimNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedresourcequota.go b/pkg/client/listers/types/v1beta1/federatedresourcequota.go index d3c239f7c..972abd54b 100644 --- a/pkg/client/listers/types/v1beta1/federatedresourcequota.go +++ b/pkg/client/listers/types/v1beta1/federatedresourcequota.go @@ -26,8 +26,10 @@ import ( ) // FederatedResourceQuotaLister helps list FederatedResourceQuotas. +// All objects returned here must be treated as read-only. type FederatedResourceQuotaLister interface { // List lists all FederatedResourceQuotas in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedResourceQuota, err error) // FederatedResourceQuotas returns an object that can list and get FederatedResourceQuotas. FederatedResourceQuotas(namespace string) FederatedResourceQuotaNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedResourceQuotaLister) FederatedResourceQuotas(namespace string) } // FederatedResourceQuotaNamespaceLister helps list and get FederatedResourceQuotas. +// All objects returned here must be treated as read-only. type FederatedResourceQuotaNamespaceLister interface { // List lists all FederatedResourceQuotas in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedResourceQuota, err error) // Get retrieves the FederatedResourceQuota from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedResourceQuota, error) FederatedResourceQuotaNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedsecret.go b/pkg/client/listers/types/v1beta1/federatedsecret.go index abca168e4..19968941b 100644 --- a/pkg/client/listers/types/v1beta1/federatedsecret.go +++ b/pkg/client/listers/types/v1beta1/federatedsecret.go @@ -26,8 +26,10 @@ import ( ) // FederatedSecretLister helps list FederatedSecrets. +// All objects returned here must be treated as read-only. type FederatedSecretLister interface { // List lists all FederatedSecrets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedSecret, err error) // FederatedSecrets returns an object that can list and get FederatedSecrets. FederatedSecrets(namespace string) FederatedSecretNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedSecretLister) FederatedSecrets(namespace string) FederatedSecr } // FederatedSecretNamespaceLister helps list and get FederatedSecrets. +// All objects returned here must be treated as read-only. type FederatedSecretNamespaceLister interface { // List lists all FederatedSecrets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedSecret, err error) // Get retrieves the FederatedSecret from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedSecret, error) FederatedSecretNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedservice.go b/pkg/client/listers/types/v1beta1/federatedservice.go index adde0f3b6..86cc770de 100644 --- a/pkg/client/listers/types/v1beta1/federatedservice.go +++ b/pkg/client/listers/types/v1beta1/federatedservice.go @@ -26,8 +26,10 @@ import ( ) // FederatedServiceLister helps list FederatedServices. +// All objects returned here must be treated as read-only. type FederatedServiceLister interface { // List lists all FederatedServices in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedService, err error) // FederatedServices returns an object that can list and get FederatedServices. FederatedServices(namespace string) FederatedServiceNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedServiceLister) FederatedServices(namespace string) FederatedSe } // FederatedServiceNamespaceLister helps list and get FederatedServices. +// All objects returned here must be treated as read-only. type FederatedServiceNamespaceLister interface { // List lists all FederatedServices in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedService, err error) // Get retrieves the FederatedService from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedService, error) FederatedServiceNamespaceListerExpansion } diff --git a/pkg/client/listers/types/v1beta1/federatedstatefulset.go b/pkg/client/listers/types/v1beta1/federatedstatefulset.go index d01ce736c..a6a026137 100644 --- a/pkg/client/listers/types/v1beta1/federatedstatefulset.go +++ b/pkg/client/listers/types/v1beta1/federatedstatefulset.go @@ -26,8 +26,10 @@ import ( ) // FederatedStatefulSetLister helps list FederatedStatefulSets. +// All objects returned here must be treated as read-only. type FederatedStatefulSetLister interface { // List lists all FederatedStatefulSets in the indexer. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedStatefulSet, err error) // FederatedStatefulSets returns an object that can list and get FederatedStatefulSets. FederatedStatefulSets(namespace string) FederatedStatefulSetNamespaceLister @@ -58,10 +60,13 @@ func (s *federatedStatefulSetLister) FederatedStatefulSets(namespace string) Fed } // FederatedStatefulSetNamespaceLister helps list and get FederatedStatefulSets. +// All objects returned here must be treated as read-only. type FederatedStatefulSetNamespaceLister interface { // List lists all FederatedStatefulSets in the indexer for a given namespace. + // Objects returned here must be treated as read-only. List(selector labels.Selector) (ret []*v1beta1.FederatedStatefulSet, err error) // Get retrieves the FederatedStatefulSet from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. Get(name string) (*v1beta1.FederatedStatefulSet, error) FederatedStatefulSetNamespaceListerExpansion } diff --git a/staging/src/kubesphere.io/api/cluster/v1alpha1/openapi_generated.go b/staging/src/kubesphere.io/api/cluster/v1alpha1/openapi_generated.go index d7dd6ab4e..a5c86e07e 100644 --- a/staging/src/kubesphere.io/api/cluster/v1alpha1/openapi_generated.go +++ b/staging/src/kubesphere.io/api/cluster/v1alpha1/openapi_generated.go @@ -14345,6 +14345,13 @@ func schema_kubesphereio_api_cluster_v1alpha1_ClusterSpec(ref common.ReferenceCa Ref: ref("kubesphere.io/api/cluster/v1alpha1.Connection"), }, }, + "externalKubeAPIEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "ExternalKubeAPIEnabled export kubeapiserver to public use a lb type service if connection type is proxy", + Type: []string{"boolean"}, + Format: "", + }, + }, }, }, }, @@ -14467,6 +14474,13 @@ func schema_kubesphereio_api_cluster_v1alpha1_Connection(ref common.ReferenceCal Format: "", }, }, + "externalKubernetesAPIEndpoint": { + SchemaProps: spec.SchemaProps{ + Description: "External Kubernetes API Server endpoint Will be populated by ks-apiserver if connection type is proxy and ExternalKubeAPIEnabled is true.", + Type: []string{"string"}, + Format: "", + }, + }, "kubeconfig": { SchemaProps: spec.SchemaProps{ Description: "KubeConfig content used to connect to cluster api server Should provide this field explicitly if connection type is direct. Will be populated by ks-proxy if connection type is proxy.", diff --git a/staging/src/kubesphere.io/api/types/v1beta1/zz_generated.deepcopy.go b/staging/src/kubesphere.io/api/types/v1beta1/zz_generated.deepcopy.go index 0e4c62872..5c7a65406 100644 --- a/staging/src/kubesphere.io/api/types/v1beta1/zz_generated.deepcopy.go +++ b/staging/src/kubesphere.io/api/types/v1beta1/zz_generated.deepcopy.go @@ -2639,7 +2639,9 @@ func (in *StatefulSetTemplate) DeepCopy() *StatefulSetTemplate { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UserTemplate) DeepCopyInto(out *UserTemplate) { *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return }