Skip to content

fix: update eso partials and adjust partials generate script #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hack/vcluster/partials/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func main() {

util.DefaultRequire = false
versionDir := os.Args[1]
jsonSchemaPath := filepath.Join(versionDir, "vcluster.schema.json")
defaultValues := filepath.Join(versionDir, "default_values.yaml")
jsonSchemaPath := filepath.Join(versionDir, "values.schema.json")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably I'm missing some context, but in order it to work with the vcluster repo I had to rename those files 🤔. (cc @Piotr1215 @joaniekube)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hidalgopl can you please confirm? I'm not sure if the files have to be renamed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, renaming these will break the CI that updates partials.

Could you describe @johannesfrey what are you trying to do and what did not work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, didn't know that we have a CI step for this here in vcluster. So I guess I can delete this PR as the content here will be a auto generated PR when the next beta/rc is created?

defaultValues := filepath.Join(versionDir, "values.yaml")
values, err := os.ReadFile(defaultValues)
if err != nil {
panic(fmt.Errorf("failed to read default values from %q: %w", defaultValues, err))
Expand All @@ -130,4 +130,4 @@ func main() {
for _, path := range paths {
util.GenerateFromPath(schema, outputDir, path, defaults)
}
}
}
13 changes: 7 additions & 6 deletions vcluster/_fragments/eso.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ProAdmonition from '../_partials/admonitions/pro-admonition.mdx'

# External secrets integration

To enable the external secret integration, set the following fields:
To enable the External Secret integration, set the following fields:

```yaml
integrations:
Expand All @@ -27,9 +27,10 @@ integrations:
enabled: true
```

This enables the integration, imports cluster stores from the host cluster into the virtual cluster, and exports namespaced stores from the virtual cluster into the host cluster.
This enables the integration, imports `ClusterSecretStores` from the host cluster into the virtual cluster, and exports namespaced `SecretStores` from the virtual cluster into the host cluster.
**NOTE**: After `SecretStores` have been exported, any changes to them in the host cluster are also reflected into the virtual cluster and vice versa.

Once the virtual cluster is up and running, you can create a secret store inside the virtual cluster. For this guide, you use the `fake` store type, which prefills data instead of connecting to a distant secret store.
Once the virtual cluster is up and running, you can create a `SecretStore` inside the virtual cluster. For this guide, you use the `fake` store type, which prefills data instead of connecting to a remote one.

```yaml
apiVersion: external-secrets.io/v1beta1
Expand Down Expand Up @@ -76,6 +77,6 @@ spec:
version: v1
```

After the external secret is created in the virtual cluster, the integration creates a corresponding external secret inside the host cluster.
The external secret operator running in the host creates the corresponding Kubernetes secret, and the integration imports this
Kubernetes secret into the virtual cluster. Running `kubectl get secrets` in the virtual cluster includes the `secret-to-be-created` in its output.
After the `ExternalSecret` is created in the virtual cluster, the integration creates a corresponding `ExternalSecret` inside the host cluster.
The External Secret Operator running in the host cluster creates the corresponding Kubernetes Secret, and the integration imports this
Secret into the virtual cluster. Running `kubectl get secrets` in the virtual cluster includes the `secret-to-be-created` in its output.
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,10 @@ Enabled defines if this option should be enabled.

### `externalSecrets` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">object</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> <span data-pro="false" className="config-field-pro">pro</span> {#integrations-externalSecrets}

ExternalSecrets reuses a host external secret operator and makes certain CRDs from it available inside the vCluster
ExternalSecrets reuses a host external secret operator and makes certain CRDs from it available inside the vCluster.
- ExternalSecrets will be synced from the virtual cluster to the host cluster.
- SecretStores will be synced bi-directionally after an initial sync from the virtual cluster to the host cluster.
- ClusterSecretStores will be synced from the host cluster to the virtual cluster.

</summary>

Expand Down Expand Up @@ -550,7 +553,7 @@ Sync defines the syncing behavior for the integration

##### `externalSecrets` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">object</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> <span data-pro="false" className="config-field-pro">pro</span> {#integrations-externalSecrets-sync-externalSecrets}

ExternalSecrets defines whether to sync external secrets or not
ExternalSecrets defines if external secrets should get synced from the virtual cluster to the host cluster.

</summary>

Expand Down Expand Up @@ -580,7 +583,7 @@ Enabled defines if this option should be enabled.

##### `stores` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">object</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> <span data-pro="false" className="config-field-pro">pro</span> {#integrations-externalSecrets-sync-stores}

Stores defines whether to sync stores or not
Stores defines if secret stores should get synced bi-directionally after an initial sync from the virtual cluster to the host cluster.

</summary>

Expand Down Expand Up @@ -610,7 +613,7 @@ Enabled defines if this option should be enabled.

##### `clusterStores` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">object</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> <span data-pro="false" className="config-field-pro">pro</span> {#integrations-externalSecrets-sync-clusterStores}

ClusterStores defines whether to sync cluster stores or not
ClusterStores defines if cluster secrets stores should get synced from the host cluster to the virtual cluster.

</summary>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

## `externalSecrets` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">object</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> <span data-pro="false" className="config-field-pro">pro</span> {#externalSecrets}

ExternalSecrets reuses a host external secret operator and makes certain CRDs from it available inside the vCluster
ExternalSecrets reuses a host external secret operator and makes certain CRDs from it available inside the vCluster.
- ExternalSecrets will be synced from the virtual cluster to the host cluster.
- SecretStores will be synced bi-directionally after an initial sync from the virtual cluster to the host cluster.
- ClusterSecretStores will be synced from the host cluster to the virtual cluster.

</summary>

Expand Down Expand Up @@ -73,7 +76,7 @@ Sync defines the syncing behavior for the integration

#### `externalSecrets` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">object</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> <span data-pro="false" className="config-field-pro">pro</span> {#externalSecrets-sync-externalSecrets}

ExternalSecrets defines whether to sync external secrets or not
ExternalSecrets defines if external secrets should get synced from the virtual cluster to the host cluster.

</summary>

Expand Down Expand Up @@ -103,7 +106,7 @@ Enabled defines if this option should be enabled.

#### `stores` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">object</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> <span data-pro="false" className="config-field-pro">pro</span> {#externalSecrets-sync-stores}

Stores defines whether to sync stores or not
Stores defines if secret stores should get synced bi-directionally after an initial sync from the virtual cluster to the host cluster.

</summary>

Expand Down Expand Up @@ -133,7 +136,7 @@ Enabled defines if this option should be enabled.

#### `clusterStores` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">object</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> <span data-pro="false" className="config-field-pro">pro</span> {#externalSecrets-sync-clusterStores}

ClusterStores defines whether to sync cluster stores or not
ClusterStores defines if cluster secrets stores should get synced from the host cluster to the virtual cluster.

</summary>

Expand Down