diff --git a/README.md b/README.md index 37240e3..f19e9d7 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,33 @@ Build binary: make build ``` +## Testing + +- Install unleash server on the cluster or configure the provider to use an existing server. +- Modify `examples/provider/secrets.yaml` with the correct values. + +Apply the manifest: + +``` +k apply -f examples/providerconfig/secrets.yaml +k apply -f examples/providerconfig/providerconfig.yaml +``` + +Apply the example token manifest: + +``` +k apply -f examples/token/token.yaml +``` + ## Report a Bug For filing bugs, suggesting improvements, or requesting new features, please open an [issue](https://github.com/sahajsoft/provider-unleash/issues). + +## Examples + +You can find provider config and token configuration examples in the [examples](./examples) directory. + +## Notes + +This was automatically generated using [Upjet](https://github.com/crossplane/upjet/blob/main/docs/generating-a-provider.md) diff --git a/examples/providerconfig/providerconfig.yaml b/examples/providerconfig/providerconfig.yaml index cf704d5..d42f5f3 100644 --- a/examples/providerconfig/providerconfig.yaml +++ b/examples/providerconfig/providerconfig.yaml @@ -1,4 +1,4 @@ -apiVersion: unleash.upbound.io/v1beta1 +apiVersion: unleash.crossplane.io/v1beta1 kind: ProviderConfig metadata: name: default @@ -6,6 +6,6 @@ spec: credentials: source: Secret secretRef: - name: example-creds - namespace: crossplane-system + name: unleash-creds + namespace: default key: credentials diff --git a/examples/providerconfig/secret.yaml.tmpl b/examples/providerconfig/secret.yaml.tmpl index 6dfa5c8..2ce6650 100644 --- a/examples/providerconfig/secret.yaml.tmpl +++ b/examples/providerconfig/secret.yaml.tmpl @@ -1,12 +1,12 @@ apiVersion: v1 kind: Secret metadata: - name: example-creds - namespace: crossplane-system + name: unleash-creds + namespace: default type: Opaque stringData: credentials: | { - "username": "admin", - "password": "t0ps3cr3t11" + "base_url": "http://my-unleash:4242", + "authorization": "$TOKEN" } diff --git a/examples/token.yaml b/examples/token/token.yaml similarity index 94% rename from examples/token.yaml rename to examples/token/token.yaml index be493a5..553f5ca 100644 --- a/examples/token.yaml +++ b/examples/token/token.yaml @@ -6,6 +6,7 @@ metadata: labels: testing.upbound.io/example-name: client_token name: unleash-client-token + namespace: default spec: forProvider: environment: development