diff --git a/api/v1alpha1/upgradeinsights_types.go b/api/v1alpha1/upgradeinsights_types.go index 31e1d017..0dd693cc 100644 --- a/api/v1alpha1/upgradeinsights_types.go +++ b/api/v1alpha1/upgradeinsights_types.go @@ -103,15 +103,34 @@ type ProviderCredentials struct { } type AWSProviderCredentials struct { - // Region ... + // Region is the name of the AWS region cluster lives in. // +kubebuilder:validation:Required Region string `json:"region"` - // AccessKeyID ... + // AccessKeyID is your access key ID used to authenticate against AWS API. // +kubebuilder:validation:Required AccessKeyID string `json:"accessKeyID"` - // SecretAccessKeyRef ... + // SecretAccessKeyRef is a reference to the secret that contains secret access key. + // Since UpgradeInsights is a cluster-scoped resource we can't use local reference. + // + // SecretAccessKey must be stored in a key named "secretAccessKey". + // + // An example secret can look like this: + // apiVersion: v1 + // kind: Secret + // metadata: + // name: eks-credentials + // namespace: upgrade-insights-test + // stringData: + // secretAccessKey: "changeme" + // + // Then it can be referenced like this: + // ... + // secretAccessKeyRef: + // name: eks-credentials + // namespace: upgrade-insights-test + // // +kubebuilder:validation:Required SecretAccessKeyRef corev1.SecretReference `json:"secretAccessKeyRef"` } diff --git a/config/crd/bases/deployments.plural.sh_upgradeinsights.yaml b/config/crd/bases/deployments.plural.sh_upgradeinsights.yaml index f39be55b..4bf07d33 100644 --- a/config/crd/bases/deployments.plural.sh_upgradeinsights.yaml +++ b/config/crd/bases/deployments.plural.sh_upgradeinsights.yaml @@ -59,13 +59,23 @@ spec: API. properties: accessKeyID: - description: AccessKeyID ... + description: AccessKeyID is your access key ID used to authenticate + against AWS API. type: string region: - description: Region ... + description: Region is the name of the AWS region cluster + lives in. type: string secretAccessKeyRef: - description: SecretAccessKeyRef ... + description: "SecretAccessKeyRef is a reference to the secret + that contains secret access key.\nSince UpgradeInsights + is a cluster-scoped resource we can't use local reference.\n\n\nSecretAccessKey + must be stored in a key named \"secretAccessKey\".\n\n\nAn + example secret can look like this:\n\tapiVersion: v1\n\tkind: + Secret\n\tmetadata:\n\t\tname: eks-credentials\n\t\tnamespace: + upgrade-insights-test\n\tstringData:\n\t\tsecretAccessKey: + \"changeme\"\n\n\nThen it can be referenced like this:\n\t\t...\n\t\tsecretAccessKeyRef:\n\t\t\tname: + eks-credentials\n\t\t\tnamespace: upgrade-insights-test" properties: name: description: name is unique within a namespace to reference diff --git a/docs/api.md b/docs/api.md index 780f091d..fa0f7248 100644 --- a/docs/api.md +++ b/docs/api.md @@ -11,9 +11,107 @@ Package v1alpha1 contains API Schema definitions for the deployments v1alpha1 AP ### Resource Types - [CustomHealth](#customhealth) - [PipelineGate](#pipelinegate) +- [UpgradeInsights](#upgradeinsights) +- [VirtualCluster](#virtualcluster) +#### AWSProviderCredentials + + + + + + + +_Appears in:_ +- [ProviderCredentials](#providercredentials) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `region` _string_ | Region is the name of the AWS region cluster lives in. | | Required: {}
| +| `accessKeyID` _string_ | AccessKeyID is your access key ID used to authenticate against AWS API. | | Required: {}
| +| `secretAccessKeyRef` _[SecretReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretreference-v1-core)_ | SecretAccessKeyRef is a reference to the secret that contains secret access key.
Since UpgradeInsights is a cluster-scoped resource we can't use local reference.
SecretAccessKey must be stored in a key named "secretAccessKey".
An example secret can look like this:
apiVersion: v1
kind: Secret
metadata:
name: eks-credentials
namespace: upgrade-insights-test
stringData:
secretAccessKey: "changeme"
Then it can be referenced like this:
...
secretAccessKeyRef:
name: eks-credentials
namespace: upgrade-insights-test | | Required: {}
| + + +#### AgentHelmConfiguration + + + + + + + +_Appears in:_ +- [HelmSpec](#helmspec) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `chartName` _string_ | ChartName is a helm chart name. | | | +| `repoUrl` _string_ | RepoUrl is a url that points to this helm chart. | | Optional: {}
Type: string
| +| `values` _[RawExtension](https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime#RawExtension)_ | Values allows defining arbitrary YAML values to pass to the helm as values.yaml file.
Use only one of:
- Values
- ValuesSecretRef
- ValuesConfigMapRef | | Optional: {}
| +| `valuesSecretRef` _[SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core)_ | ValuesSecretRef fetches helm values from a secret in this cluster.
Use only one of:
- Values
- ValuesSecretRef
- ValuesConfigMapRef | | Optional: {}
| +| `valuesConfigMapRef` _[ConfigMapKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#configmapkeyselector-v1-core)_ | ValuesConfigMapRef fetches helm values from a config map in this cluster.
Use only one of:
- Values
- ValuesSecretRef
- ValuesConfigMapRef | | Optional: {}
| + + +#### Binding + + + +Binding ... + + + +_Appears in:_ +- [Bindings](#bindings) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `id` _string_ | | | Optional: {}
| +| `UserID` _string_ | | | Optional: {}
| +| `userEmail` _string_ | | | Optional: {}
| +| `groupID` _string_ | | | Optional: {}
| +| `groupName` _string_ | | | Optional: {}
| + + +#### Bindings + + + +Bindings represents a policy bindings that +can be used to define read/write permissions +to this resource for users/groups in the system. + + + +_Appears in:_ +- [ClusterSpec](#clusterspec) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `read` _[Binding](#binding) array_ | Read bindings. | | Optional: {}
| +| `write` _[Binding](#binding) array_ | Write bindings. | | Optional: {}
| + + +#### ClusterSpec + + + + + + + +_Appears in:_ +- [VirtualClusterSpec](#virtualclusterspec) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `handle` _string_ | Handle is a short, unique human-readable name used to identify this cluster.
Does not necessarily map to the cloud resource name. | | Optional: {}
| +| `tags` _object (keys:string, values:string)_ | Tags used to filter clusters. | | Optional: {}
| +| `metadata` _[RawExtension](https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime#RawExtension)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | Optional: {}
| +| `bindings` _[Bindings](#bindings)_ | Bindings contain read and write policies of this cluster | | Optional: {}
| + + @@ -100,6 +198,46 @@ _Appears in:_ + + +#### HelmConfiguration + + + + + + + +_Appears in:_ +- [AgentHelmConfiguration](#agenthelmconfiguration) +- [VClusterHelmConfiguration](#vclusterhelmconfiguration) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `chartName` _string_ | ChartName is a helm chart name. | | | +| `repoUrl` _string_ | RepoUrl is a url that points to this helm chart. | | Optional: {}
Type: string
| +| `values` _[RawExtension](https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime#RawExtension)_ | Values allows defining arbitrary YAML values to pass to the helm as values.yaml file.
Use only one of:
- Values
- ValuesSecretRef
- ValuesConfigMapRef | | Optional: {}
| +| `valuesSecretRef` _[SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core)_ | ValuesSecretRef fetches helm values from a secret in this cluster.
Use only one of:
- Values
- ValuesSecretRef
- ValuesConfigMapRef | | Optional: {}
| +| `valuesConfigMapRef` _[ConfigMapKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#configmapkeyselector-v1-core)_ | ValuesConfigMapRef fetches helm values from a config map in this cluster.
Use only one of:
- Values
- ValuesSecretRef
- ValuesConfigMapRef | | Optional: {}
| + + +#### HelmSpec + + + + + + + +_Appears in:_ +- [VirtualClusterSpec](#virtualclusterspec) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `agent` _[AgentHelmConfiguration](#agenthelmconfiguration)_ | Agent allows configuring agent specific helm chart options. | | Optional: {}
| +| `vcluster` _[VClusterHelmConfiguration](#vclusterhelmconfiguration)_ | VCluster allows configuring vcluster specific helm chart options. | | Optional: {}
| + + #### PipelineGate @@ -139,3 +277,136 @@ _Appears in:_ +#### ProviderCredentials + + + + + + + +_Appears in:_ +- [UpgradeInsightsSpec](#upgradeinsightsspec) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `aws` _[AWSProviderCredentials](#awsprovidercredentials)_ | AWS defines attributes required to auth with AWS API. | | Optional: {}
| + + +#### Status + + + + + + + +_Appears in:_ +- [VirtualClusterStatus](#virtualclusterstatus) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `id` _string_ | ID of the resource in the Console API. | | Optional: {}
Type: string
| +| `sha` _string_ | SHA of last applied configuration. | | Optional: {}
Type: string
| +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#condition-v1-meta) array_ | Represents the observations of a PrAutomation's current state. | | | + + +#### UpgradeInsights + + + +UpgradeInsights is the Schema for the UpgradeInsights API + + + + + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `deployments.plural.sh/v1alpha1` | | | +| `kind` _string_ | `UpgradeInsights` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | | +| `spec` _[UpgradeInsightsSpec](#upgradeinsightsspec)_ | | | | + + + + +#### UpgradeInsightsSpec + + + + + + + +_Appears in:_ +- [UpgradeInsights](#upgradeinsights) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `distro` _[ClusterDistro](#clusterdistro)_ | Distro defines which provider API should be used to fetch latest upgrade insights.
If not provided, we get the distro from the Plural API cluster tied to this operator deploy token. | | Enum: [EKS]
Optional: {}
| +| `clusterName` _string_ | ClusterName is your cloud provider cluster identifier (usually name) that is used
to fetch latest upgrade insights information from the cloud provider API.
If not provided, we get the cluster name from the Plural API cluster tied to this
operator deploy token and assume that it is the same as the cluster name in your cloud provider. | | Optional: {}
| +| `interval` _string_ | Interval defines how often should the upgrade insights information be fetched. | 10m | Optional: {}
| +| `credentials` _[ProviderCredentials](#providercredentials)_ | Credentials allow overriding default provider credentials bound to the operator. | | Optional: {}
| + + +#### VClusterHelmConfiguration + + + + + + + +_Appears in:_ +- [HelmSpec](#helmspec) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `chartName` _string_ | ChartName is a helm chart name. | | | +| `repoUrl` _string_ | RepoUrl is a url that points to this helm chart. | | Optional: {}
Type: string
| +| `values` _[RawExtension](https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime#RawExtension)_ | Values allows defining arbitrary YAML values to pass to the helm as values.yaml file.
Use only one of:
- Values
- ValuesSecretRef
- ValuesConfigMapRef | | Optional: {}
| +| `valuesSecretRef` _[SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core)_ | ValuesSecretRef fetches helm values from a secret in this cluster.
Use only one of:
- Values
- ValuesSecretRef
- ValuesConfigMapRef | | Optional: {}
| +| `valuesConfigMapRef` _[ConfigMapKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#configmapkeyselector-v1-core)_ | ValuesConfigMapRef fetches helm values from a config map in this cluster.
Use only one of:
- Values
- ValuesSecretRef
- ValuesConfigMapRef | | Optional: {}
| + + +#### VirtualCluster + + + +VirtualCluster is the Schema for the virtual cluster API + + + + + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `deployments.plural.sh/v1alpha1` | | | +| `kind` _string_ | `VirtualCluster` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | | +| `spec` _[VirtualClusterSpec](#virtualclusterspec)_ | Spec ... | | Required: {}
| + + +#### VirtualClusterSpec + + + + + + + +_Appears in:_ +- [VirtualCluster](#virtualcluster) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `kubeconfigRef` _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#localobjectreference-v1-core)_ | KubeconfigRef is a reference to the secret created by the
vcluster helm chart. It contains kubeconfig with information
on how to access created virtual cluster. | | Required: {}
| +| `credentialsRef` _[SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core)_ | CredentialsRef is a reference to the secret pointing to the
key that holds Console API access token. It allows to communicate
with the standard Console API. | | Required: {}
| +| `cluster` _[ClusterSpec](#clusterspec)_ | Cluster is a simplified representation of the Console API cluster
object. See [ClusterSpec] for more information. | | Optional: {}
| +| `external` _boolean_ | External marks this virtual cluster as external one, meaning
that the vcluster deployment will not be automatically created.
User has to pre-provision vcluster and provide a valid KubeconfigRef
pointing to an existing vcluster installation. | | Optional: {}
| +| `helm` _[HelmSpec](#helmspec)_ | Helm allows configuring helm chart options of both agent and vcluster.
It is then deployed by the [VirtualCluster] CRD controller. | | Optional: {}
| + + + +