Skip to content

Commit 6026ac7

Browse files
authored
Document CRD upgrade helper services. (#261)
Signed-off-by: Dean Roehrich <dean.roehrich@hpe.com>
1 parent d3c0c53 commit 6026ac7

4 files changed

Lines changed: 32 additions & 3 deletions

File tree

docs/repo-guides/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Management
44

55
* [Releasing NNF Software](release-nnf-sw/release-all.md)
6+
* [CRD Upgrade Helpers](release-nnf-sw/crd-upgrade-helpers.md)
67

78
## Developer
89

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# CRD Upgrade Helpers
2+
3+
Two services must be installed on the cluster to assist in upgrading CustomResourceDefinitions (CRD), and the resources associated with them, as the CRDs acquire new API versions or remove old API versions. The first service is [kube-storage-version-migrator](https://github.com/NearNodeFlash/kube-storage-version-migrator/tree/nnf-main) (see the `nnf-main` branch), which updates existing custom resources to ensure they are stored in the **etcd** database at the API version that is the CRD's latest `storage` version. It does this whenever a CRD is updated with a new API version. The second service is [nnf-storedversions-maint](https://github.com/NearNodeFlash/nnf-storedversions-maint), which updates the `status.storedVersions` list in the CRD to remove the unused API versions. This maintenance is necessary to allow older API versions to be removed during future upgrades of those CRDs.
4+
5+
Together, these services implement [Upgrade existing objects to a new stored version](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#upgrade-existing-objects-to-a-new-stored-version) in the Kubernetes documentation.
6+
7+
## ArgoCD/GitOps
8+
9+
The ArgoCD `Application` bootstraps for the two services can be found in the [argocd-boilerplate](https://github.com/NearNodeFlash/argocd-boilerplate) repository under `environments/example-env/0-bootstrap1/`. NNF release manifests include the manifests for these services.
10+
11+
## References
12+
13+
### Kubernetes
14+
15+
[Versions in CustomResourceDefinitions](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/)
16+
17+
[Upgrade existing objects to a new stored version](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#upgrade-existing-objects-to-a-new-stored-version)
18+
19+
[kube-storage-version-migrator](https://github.com/kubernetes-sigs/kube-storage-version-migrator) migrates stored data in etcd to the latest storage version.
20+
21+
### NNF
22+
23+
[kube-storage-version-migrator](https://github.com/NearNodeFlash/kube-storage-version-migrator/tree/nnf-main) (see the `nnf-main` branch) migrates stored data in etcd to the latest storage version.
24+
25+
[nnf-storedversions-maint](https://github.com/NearNodeFlash/nnf-storedversions-maint) removes old API versions from a CRD's `status.storedVersions` field.
26+
27+
[CRD Version Bumper](../crd-bumper/readme.md) tools to add a new API version to a CRD, or to remove an old API version.

docs/repo-guides/release-nnf-sw/release-all.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ other components.
9292
./release-all.sh -P create-pr -R <repo>
9393
```
9494

95-
3. Merge PR for the pushed release branch:
95+
4. Merge PR for the pushed release branch:
9696
**Note: Do NOT manually merge the PR, let `release-all.sh` merge it.**
9797

9898
```bash
9999
./release-all.sh -P merge-pr -R <repo>
100100
```
101101

102-
4. Tag the release:
102+
5. Tag the release:
103103

104104
```bash
105105
./release-all.sh -P tag-release -R <repo>

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ site_description: 'Near Node Flash'
33
docs_dir: docs/
44
repo_name: 'NearNodeFlash/NearNodeFlash.github.io'
55
repo_url: https://github.com/NearNodeFlash/NearNodeFlash.github.io
6-
copyright: '&copy; Copyright 2023 Hewlett Packard Enterprise Development LP'
6+
copyright: '&copy; Copyright 2025 Hewlett Packard Enterprise Development LP'
77
nav:
88
- Home: index.md
99
- 'User Guides':
@@ -31,6 +31,7 @@ nav:
3131
- 'Releasing NNF Software': 'repo-guides/release-nnf-sw/release-all.md'
3232
- 'CRD Version Bumper': 'repo-guides/crd-bumper/readme.md'
3333
- 'Editing APIs': 'repo-guides/crd-bumper/editing-apis.md'
34+
- 'CRD Upgrade Helpers': 'repo-guides/release-nnf-sw/crd-upgrade-helpers.md'
3435
theme:
3536
name: 'material'
3637
custom_dir: overrides

0 commit comments

Comments
 (0)