-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(konnect): add KongVault reconciler (#597)
* add KongVault reconciler * add unit tests for KongVault * add integration test * fix owner reference and add envtest * address comments * add watch for apiAuthConfiguration and controlPlane in KongVault reconciler * add comments on cpref namespace
- Loading branch information
1 parent
7583a25
commit 23b649b
Showing
20 changed files
with
1,374 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ packages: | |
PluginSDK: | ||
UpstreamsSDK: | ||
TargetsSDK: | ||
VaultSDK: | ||
MeSDK: | ||
KongCredentialBasicAuthSDK: | ||
CACertificatesSDK: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
kind: KonnectAPIAuthConfiguration | ||
apiVersion: konnect.konghq.com/v1alpha1 | ||
metadata: | ||
name: konnect-api-auth-dev-1 | ||
namespace: default | ||
spec: | ||
type: token | ||
token: kpat_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | ||
serverURL: us.api.konghq.com | ||
--- | ||
kind: KonnectGatewayControlPlane | ||
apiVersion: konnect.konghq.com/v1alpha1 | ||
metadata: | ||
name: test1 | ||
namespace: default | ||
spec: | ||
name: test1 | ||
labels: | ||
app: test1 | ||
key1: test1 | ||
konnect: | ||
authRef: | ||
name: konnect-api-auth-dev-1 | ||
--- | ||
kind: KongVault | ||
apiVersion: configuration.konghq.com/v1alpha1 | ||
metadata: | ||
name: env-vault-1 | ||
spec: | ||
backend: env | ||
prefix: env-vault | ||
config: | ||
prefix: "konnect_vault_test_" | ||
controlPlaneRef: | ||
type: konnectNamespacedRef | ||
konnectNamespacedRef: | ||
name: test1 | ||
# KongVault is cluster scoped currently, so we need to specify namespace of Konnect control plane. | ||
namespace: default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package ops | ||
|
||
import ( | ||
"context" | ||
|
||
sdkkonnectcomp "github.com/Kong/sdk-konnect-go/models/components" | ||
sdkkonnectops "github.com/Kong/sdk-konnect-go/models/operations" | ||
) | ||
|
||
// VaultSDK is the interface for Konnect Vault SDK. | ||
type VaultSDK interface { | ||
CreateVault(ctx context.Context, controlPlaneID string, vault sdkkonnectcomp.VaultInput, opts ...sdkkonnectops.Option) (*sdkkonnectops.CreateVaultResponse, error) | ||
UpsertVault(ctx context.Context, request sdkkonnectops.UpsertVaultRequest, opts ...sdkkonnectops.Option) (*sdkkonnectops.UpsertVaultResponse, error) | ||
DeleteVault(ctx context.Context, controlPlaneID string, vaultID string, opts ...sdkkonnectops.Option) (*sdkkonnectops.DeleteVaultResponse, error) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.