diff --git a/.github/workflows/cron.yaml b/.github/workflows/cron.yaml
index 725b551f..b19fa87e 100644
--- a/.github/workflows/cron.yaml
+++ b/.github/workflows/cron.yaml
@@ -1,47 +1,45 @@
-name: Refresh Docs
+name: Docs
on:
schedule:
- cron: '0 0 * * *'
-
jobs:
- operator-docs:
+ sync-docs:
runs-on: ubuntu-latest
permissions:
contents: 'write'
id-token: 'write'
pull-requests: 'write'
steps:
- - name: 'Checkout'
- uses: actions/checkout@v3
- - name: 'Regenerate Docs'
- run: make crd-docs
- - id: date
- run: echo "date=$(date +%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT
- - name: Create Pull Request
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Sync docs
+ run: make sync-docs
+ - name: Save date
+ id: date
+ run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
+ - name: Create pull request
+ id: cpr
uses: peter-evans/create-pull-request@v5
with:
- title: Generating Api Docs for ${{steps.date.outputs.date}}
- body: Automated pull request to regenerate api docs for the Plural operator
- commit-message: Update docs for operator
+ title: "chore: API documentation sync"
+ body: |
+ Automated pull request to sync docs for:
+ - Console operator
+ - Deployment operator
+ - Liquid filters
+ commit-message: sync docs
branch: docs-${{steps.date.outputs.date}}
- labels: release
+ labels: documentation
base: main
- liquid-docs:
- runs-on: ubuntu-latest
- permissions:
- contents: 'write'
- id-token: 'write'
- pull-requests: 'write'
- steps:
- - uses: actions/checkout@v3
- - run: make liquid-docs
- - id: date
- run: echo "date=$(date +%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT
- - uses: peter-evans/create-pull-request@v5
- with:
- title: "docs: Update supported Liquid filters docs"
- body: Automated pull request to regenerate supported Liquid filters docs.
- commit-message: update supported Liquid filters docs
- branch: docs-${{steps.date.outputs.date}}
- labels: enhancement
- base: main
\ No newline at end of file
+# - name: Auto-approve
+# if: steps.cpr.outputs.pull-request-operation == 'created'
+# run: gh pr review --approve "${{ steps.cpr.outputs.pull-request-number }}"
+# env:
+# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Enable pull request auto-merge
+ if: steps.cpr.outputs.pull-request-operation == 'created'
+ uses: peter-evans/enable-pull-request-automerge@v3
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
+ merge-method: squash
diff --git a/Makefile b/Makefile
index bb7a2a36..3e2f8916 100644
--- a/Makefile
+++ b/Makefile
@@ -9,8 +9,13 @@ yarn-install: .PHONY
web: ## runs the docs site locally
yarn dev
-crd-docs:
+sync-docs: sync-console-crd-docs sync-operator-crd-docs sync-liquid-docs
+
+sync-console-crd-docs:
curl -L https://raw.githubusercontent.com/pluralsh/console/master/go/controller/docs/api.md --output pages/deployments/operator/api.md
-liquid-docs:
+sync-operator-crd-docs:
+ curl -L https://raw.githubusercontent.com/pluralsh/deployment-operator/main/docs/api.md --output pages/deployments/operator/agent-api.md
+
+sync-liquid-docs:
curl -L https://raw.githubusercontent.com/pluralsh/polly/main/docs/liquid-filters.md --output pages/deployments/templating-filters.md
\ No newline at end of file
diff --git a/pages/deployments/operator/agent-api.md b/pages/deployments/operator/agent-api.md
new file mode 100644
index 00000000..57089f9e
--- /dev/null
+++ b/pages/deployments/operator/agent-api.md
@@ -0,0 +1,412 @@
+# API Reference
+
+## Packages
+- [deployments.plural.sh/v1alpha1](#deploymentspluralshv1alpha1)
+
+
+## deployments.plural.sh/v1alpha1
+
+Package v1alpha1 contains API Schema definitions for the deployments v1alpha1 API group
+
+### 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: {}
|
+
+
+
+
+
+
+
+
+#### CustomHealth
+
+
+
+CustomHealth is the Schema for the HealthConverts API
+
+
+
+
+
+| Field | Description | Default | Validation |
+| --- | --- | --- | --- |
+| `apiVersion` _string_ | `deployments.plural.sh/v1alpha1` | | |
+| `kind` _string_ | `CustomHealth` | | |
+| `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` _[CustomHealthSpec](#customhealthspec)_ | | | |
+
+
+#### CustomHealthSpec
+
+
+
+CustomHealthSpec defines the desired state of CustomHealth
+
+
+
+_Appears in:_
+- [CustomHealth](#customhealth)
+
+| Field | Description | Default | Validation |
+| --- | --- | --- | --- |
+| `script` _string_ | | | |
+
+
+
+
+#### GateSpec
+
+
+
+GateSpec defines the detailed gate specifications
+
+
+
+_Appears in:_
+- [PipelineGateSpec](#pipelinegatespec)
+
+| Field | Description | Default | Validation |
+| --- | --- | --- | --- |
+| `job` _[JobSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#jobspec-v1-batch)_ | resuse JobSpec type from the kubernetes api | | |
+
+
+#### GateState
+
+_Underlying type:_ _GateState_
+
+GateState represents the state of a gate, reused from console client
+
+_Validation:_
+- Enum: [PENDING OPEN CLOSED RUNNING]
+
+_Appears in:_
+- [PipelineGateStatus](#pipelinegatestatus)
+
+
+
+#### GateType
+
+_Underlying type:_ _GateType_
+
+GateType represents the type of a gate, reused from console client
+
+_Validation:_
+- Enum: [APPROVAL WINDOW JOB]
+
+_Appears in:_
+- [PipelineGateSpec](#pipelinegatespec)
+
+
+
+
+
+#### 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
+
+
+
+PipelineGate represents a gate blocking promotion along a release pipeline
+
+
+
+
+
+| Field | Description | Default | Validation |
+| --- | --- | --- | --- |
+| `apiVersion` _string_ | `deployments.plural.sh/v1alpha1` | | |
+| `kind` _string_ | `PipelineGate` | | |
+| `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` _[PipelineGateSpec](#pipelinegatespec)_ | | | |
+
+
+#### PipelineGateSpec
+
+
+
+PipelineGateSpec defines the detailed gate specifications
+
+
+
+_Appears in:_
+- [PipelineGate](#pipelinegate)
+
+| Field | Description | Default | Validation |
+| --- | --- | --- | --- |
+| `id` _string_ | | | |
+| `name` _string_ | | | |
+| `type` _[GateType](#gatetype)_ | | | Enum: [APPROVAL WINDOW JOB]
|
+| `gateSpec` _[GateSpec](#gatespec)_ | | | |
+
+
+
+
+#### 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: {}
|
+
+
+
+