Skip to content

Commit 310cfa2

Browse files
committed
Add migration guide in changelog, improve readme
Signed-off-by: Jan Dittrich <jan.dittrich@cgm.com>
1 parent 6ec423d commit 310cfa2

File tree

2 files changed

+67
-21
lines changed

2 files changed

+67
-21
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Migration from 0.4.0
11+
12+
- In compliance with the Community Extension Projects Policies, we moved the provider to the new crossplane package registry. The provider will be available at `xpkg.crossplane.io/crossplane-contrib/provider-openstack`. The previously published packages in the Upbound Marketplace will no longer be updated but kept there for backwards compatbility.
13+
1014
### Added
1115

1216
- All remaining config parameters that are supported via [terraform-provider-openstack](https://registry.terraform.io/providers/terraform-provider-openstack)
1317
- Made it easier to configure authentication by not requiring so many fields.
1418
- Migrated to Upjets new No-Fork/Provider v2 SDK Architecture. The provider now does not ship with Terraform CLI anymore.
1519
- Added many cross resource references (autmatically generated from Terraform provider schema)
20+
- Add native metrics for managed resources (see [Upjet 1.3.0](https://github.com/crossplane/upjet/releases/tag/v1.3.0) for more details)
1621

1722
### Changed
1823

@@ -25,6 +30,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2530
- Modernize CI Pipeline
2631
- Rebase dockerfle to alpine 3.12
2732

33+
### Removed
34+
35+
- Removed Terraform CLI specific metrics, as there is no Terraform CLI involved anymore
36+
2837
## [0.4.0] - 2024-06-11
2938

3039
### Added

README.md

Lines changed: 58 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<div align="center">
44

55
[![GitHub release](https://img.shields.io/github/release/crossplane-contrib/provider-openstack/all.svg)](https://github.com/crossplane-contrib/provider-openstack/releases)
6-
[![Upbound Marketplace](https://img.shields.io/badge/provider--openstack-xxx?label=upbound%20marketplace&color=blue)](https://marketplace.upbound.io/providers/crossplane-contrib/provider-openstack)
76

87
</div>
98

@@ -14,33 +13,25 @@ OpenStack API.
1413

1514
## Getting Started
1615

17-
Install the provider by using the following command after changing the image tag
18-
to the [latest release](https://marketplace.upbound.io/providers/crossplane-contrib/provider-openstack):
16+
### Installation
1917

20-
```
21-
up ctp provider install crossplane-contrib/provider-openstack:vX.X.X
22-
```
23-
24-
Alternatively, you can use declarative installation:
18+
You can use declarative installation to install the provider:
2519

26-
```
27-
cat <<EOF | kubectl apply -f -
20+
```yaml
2821
apiVersion: pkg.crossplane.io/v1
2922
kind: Provider
3023
metadata:
3124
name: provider-openstack
3225
spec:
33-
package: xpkg.upbound.io/crossplane-contrib/provider-openstack:vX.Y.Z
34-
EOF
26+
package: xpkg.crossplane.io/crossplane-contrib/provider-openstack:vX.Y.Z
3527
```
3628
37-
Notice that in this example Provider resource is referencing ControllerConfig with debug enabled.
38-
3929
You can see the API reference [here](https://doc.crds.dev/github.com/crossplane-contrib/provider-openstack).
4030
41-
## Configuration
31+
### Configuration
4232
4333
```yaml
34+
---
4435
# Providerconfig that referers to the secret
4536
apiVersion: openstack.crossplane.io/v1beta1
4637
kind: ProviderConfig
@@ -53,6 +44,7 @@ spec:
5344
key: config
5445
name: provider-openstack-config
5546
namespace: crossplane
47+
5648
---
5749
# Secret that stores credentials and other configuration
5850
apiVersion: v1
@@ -68,7 +60,9 @@ data:
6860
The secret key must contain a json dictionary that provides the authentication data.
6961
You can create the secret via this command:
7062
71-
`kubectl create secret generic provider-openstack-config --from-file=config=config.json --namespace crossplane`
63+
```bash
64+
kubectl create secret generic provider-openstack-config --from-file=config=config.json --namespace crossplane
65+
```
7266

7367
```json
7468
// config.json
@@ -81,36 +75,79 @@ You can create the secret via this command:
8175

8276
Check [Terraform OpenStack provider docs](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs#configuration-reference) to see available configuration settings. Currently not all options of the upstream provider are supported. Check [client code](https://github.com/crossplane-contrib/provider-openstack/blob/main/internal/clients/openstack.go#L66) to see if your option is supported. If something is missing, please open a new issue.
8377

78+
79+
### Deployment Customization
80+
81+
You can use a `DeploymentRuntimeConfig` to provide custom arguments or otherwise modify the provider deployment
82+
83+
Available command line arguments can be found [here](cmd/provider/main.go)
84+
85+
```yaml
86+
---
87+
# Create a DeploymentRuntimeConfig to customize the provider deployment
88+
apiVersion: pkg.crossplane.io/v1beta1
89+
kind: DeploymentRuntimeConfig
90+
metadata:
91+
name: provider-openstack
92+
spec:
93+
deploymentTemplate:
94+
spec:
95+
# Control replica count to temporary disable deployment. Do not scale more than 1 replica.
96+
replicas: 1
97+
selector: {}
98+
template:
99+
metadata:
100+
annotations:
101+
# Add annotations, e.g. to enable metrics scraping
102+
prometheus.io/path: /metrics
103+
prometheus.io/port: "8080"
104+
prometheus.io/scrape: "true"
105+
spec:
106+
containers:
107+
- args:
108+
# Add command line arguments, e.g. to enable management policies
109+
- --enable-management-policies
110+
name: package-runtime
111+
112+
---
113+
# Add this to your provider resource to reference the DeploymentRuntimeConfig
114+
spec:
115+
runtimeConfigRef:
116+
apiVersion: pkg.crossplane.io/v1beta1
117+
kind: DeploymentRuntimeConfig
118+
name: provider-openstack
119+
```
120+
84121
## Developing
85122
86123
Install the required submodules to build and run:
87124
88-
```console
125+
```bash
89126
make submodules
90127
```
91128

92129
Apply the Current CRDs and a providerConfig:
93130

94-
```console
131+
```bash
95132
kubectl apply -f package/crds
96133
kubectl apply -f examples/providerconfig/providerconfig.yaml
97134
```
98135

99136
Run against a Kubernetes cluster: (make sure to apply CRDs and providerConfig)
100137

101-
```console
138+
```bash
102139
make run
103140
```
104141

105142
Run a testbuild with linting:
106143

107-
```console
144+
```bash
108145
make reviewable
109146
```
110147

111148
Build binary:
112149

113-
```console
150+
```bash
114151
make build
115152
```
116153

0 commit comments

Comments
 (0)