Skip to content

Commit

Permalink
Prevent Unfinished Pull Requests (#13)
Browse files Browse the repository at this point in the history
Run the chart generation during CI to ensure that the user has actually
done so and checked in the correct versions.  Also, the readme for CAPO
will get deleted by the generator, so move it somewhere out of the
firing line and template it!
  • Loading branch information
spjmurray authored Jul 18, 2024
1 parent 4aa9c4b commit d347a62
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
uses: azure/setup-helm@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Make Charts
run: make
- name: Generate Documentation
run: make docs
- name: Generated Code Checked In
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Add providers to allow CAPI to talk to various cloud providers.
### OpenStack
* [Install the provider](charts/cluster-api-provider-openstack/README.md)
* [Install the provider](README.provider-openstack.md)
* [Install a cluster](charts/cluster-api-cluster-openstack/README.md)
## Developers
Expand Down
2 changes: 1 addition & 1 deletion README.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Add providers to allow CAPI to talk to various cloud providers.

### OpenStack

* [Install the provider](charts/cluster-api-provider-openstack/README.md)
* [Install the provider](README.provider-openstack.md)
* [Install a cluster](charts/cluster-api-cluster-openstack/README.md)

## Developers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- THIS FILE IS AUTO-GENERATED. DO NOT EDIT -->

# Installing Cluster API Provider OpenStack

<details>
Expand All @@ -6,7 +8,7 @@
```shell
helm repo add unikorn-cloud-capi https://unikorn-cloud.github.io/helm-cluster-api
helm repo update
helm install cluster-api-provider-openstack unikorn-cloud-capi/cluster-api-provider-openstack --version v0.2.0
helm upgrade --install cluster-api-provider-openstack unikorn-cloud-capi/cluster-api-provider-openstack -n cluster-api --create-namespace --version v0.2.0
```
</details>

Expand All @@ -29,7 +31,7 @@ spec:
targetRevision: v0.2.0
destination:
server: https://kubernetes.default.svc
namespace: foo
namespace: cluster-api
ignoreDifferences:
- group: apiextensions.k8s.io
kind: CustomResourceDefinition
Expand Down
46 changes: 46 additions & 0 deletions README.provider-openstack.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Installing Cluster API Provider OpenStack

<details>
<summary>Helm</summary>

```shell
helm repo add unikorn-cloud-capi https://unikorn-cloud.github.io/helm-cluster-api
helm repo update
helm upgrade --install cluster-api-provider-openstack unikorn-cloud-capi/cluster-api-provider-openstack -n cluster-api --create-namespace --version {{ .CAPO_CHART_VERSION }}
```
</details>

<details>
<summary>ArgoCD</summary>

```yaml
---

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: cluster-api-provider-openstack
namespace: argocd
spec:
project: default
source:
repoURL: https://unikorn-cloud.github.io/helm-cluster-api
chart: cluster-api-provider-openstack
targetRevision: {{ .CAPO_CHART_VERSION }}
destination:
server: https://kubernetes.default.svc
namespace: cluster-api
ignoreDifferences:
- group: apiextensions.k8s.io
kind: CustomResourceDefinition
jsonPointers:
- /spec/conversion/webhook/clientConfig/caBundle
syncPolicy:
automated:
selfHeal: true
syncOptions:
- RespectIgnoreDifferences=true
- CreateNamespace=true
```
</details>

4 changes: 3 additions & 1 deletion docs-generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variables:
pointer: /version
- name: CAPO_CHART_VERSION
yaml:
file: charts/cluster-api-cluster-openstack/Chart.yaml
file: charts/cluster-api-provider-openstack/Chart.yaml
pointer: /version
- name: CLUSTER_OPENSTACK_CHART_VERSION
yaml:
Expand All @@ -26,5 +26,7 @@ variables:
files:
- in: README.md.tmpl
out: README.md
- in: README.provider-openstack.md.tmpl
out: README.provider-openstack.md
- in: charts/cluster-api-cluster-openstack/README.md.tmpl
out: charts/cluster-api-cluster-openstack/README.md

0 comments on commit d347a62

Please sign in to comment.