File tree 4 files changed +43
-66
lines changed 4 files changed +43
-66
lines changed Original file line number Diff line number Diff line change 22
22
" ko@latest" ,
23
23
" kubebuilder@latest" ,
24
24
" kubectl@latest" ,
25
- " kubernetes-helm@latest" ,
26
25
" kustomize@latest" ,
27
26
" pre-commit@latest" ,
28
27
" rsync@latest" ,
35
34
" path:./hack/flakes#go-mod-upgrade" ,
36
35
" path:./hack/flakes#golangci-lint" ,
37
36
" path:./hack/flakes#goprintconst" ,
37
+ " path:./hack/flakes#helm-with-plugins" ,
38
38
" path:./hack/flakes#release-please" ,
39
39
" path:./hack/flakes#setup-envtest"
40
40
],
Original file line number Diff line number Diff line change 1233
1233
}
1234
1234
}
1235
1235
},
1236
- "kubernetes-helm@latest": {
1237
- "last_modified": "2024-05-29T10:04:41Z",
1238
- "resolved": "github:NixOS/nixpkgs/ac82a513e55582291805d6f09d35b6d8b60637a1#kubernetes-helm",
1239
- "source": "devbox-search",
1240
- "version": "3.15.1",
1241
- "systems": {
1242
- "aarch64-darwin": {
1243
- "outputs": [
1244
- {
1245
- "name": "out",
1246
- "path": "/nix/store/nipci6fqwxvyz3bcq63mz4svi5bvcpb6-kubernetes-helm-3.15.1",
1247
- "default": true
1248
- }
1249
- ],
1250
- "store_path": "/nix/store/nipci6fqwxvyz3bcq63mz4svi5bvcpb6-kubernetes-helm-3.15.1"
1251
- },
1252
- "aarch64-linux": {
1253
- "outputs": [
1254
- {
1255
- "name": "out",
1256
- "path": "/nix/store/axp4ixbbbxhg8f630cj6rvxjdjbx99pw-kubernetes-helm-3.15.1",
1257
- "default": true
1258
- }
1259
- ],
1260
- "store_path": "/nix/store/axp4ixbbbxhg8f630cj6rvxjdjbx99pw-kubernetes-helm-3.15.1"
1261
- },
1262
- "x86_64-darwin": {
1263
- "outputs": [
1264
- {
1265
- "name": "out",
1266
- "path": "/nix/store/rvdcn0nsid05i4ardmvgn38bd1fkk9rw-kubernetes-helm-3.15.1",
1267
- "default": true
1268
- }
1269
- ],
1270
- "store_path": "/nix/store/rvdcn0nsid05i4ardmvgn38bd1fkk9rw-kubernetes-helm-3.15.1"
1271
- },
1272
- "x86_64-linux": {
1273
- "outputs": [
1274
- {
1275
- "name": "out",
1276
- "path": "/nix/store/i24nairmnj41aq4w6x7fp8wjrcd15i13-kubernetes-helm-3.15.1",
1277
- "default": true
1278
- }
1279
- ],
1280
- "store_path": "/nix/store/i24nairmnj41aq4w6x7fp8wjrcd15i13-kubernetes-helm-3.15.1"
1281
- }
1282
- }
1283
- },
1284
1236
"kustomize@latest": {
1285
1237
"last_modified": "2024-06-08T17:34:36Z",
1286
1238
"resolved": "github:NixOS/nixpkgs/cd18e2ae9ab8e2a0a8d715b60c91b54c0ac35ff9#kustomize",
Original file line number Diff line number Diff line change 129
129
"-X ${ t } .gitVersion=v${ version } "
130
130
] ;
131
131
} ;
132
+
133
+ helm-schema = buildGo122Module rec {
134
+ pname = "helm-schema" ;
135
+ version = "1.4.1" ;
136
+
137
+ src = fetchFromGitHub {
138
+ owner = "losisin" ;
139
+ repo = "helm-values-schema-json" ;
140
+ rev = "v${ version } " ;
141
+ hash = "sha256-pi/Xp4t8UFgdFvU2De2Uo/gVsVltan4iSw2XGEtynuw=" ;
142
+ } ;
143
+ doCheck = false ;
144
+ vendorHash = "sha256-F2mT36aYkLjUZbV5GQH8mNMZjGi/70dTENU2rRhAJq4=" ;
145
+ ldflags = let t = "main" ; in [
146
+ "-s"
147
+ "-w"
148
+ "-X ${ t } .BuildDate=19700101-00:00:00"
149
+ "-X ${ t } .GitCommit=v${ version } "
150
+ "-X ${ t } .Version=v${ version } "
151
+ ] ;
152
+
153
+ postPatch = ''
154
+ sed -i '/^hooks:/,+2 d' plugin.yaml
155
+ sed -i 's#command: "$HELM_PLUGIN_DIR/schema"#command: "$HELM_PLUGIN_DIR/helm-values-schema-json"#' plugin.yaml
156
+ '' ;
157
+
158
+ postInstall = ''
159
+ install -dm755 $out/${ pname }
160
+ mv $out/bin/* $out/${ pname } /
161
+ install -m644 -Dt $out/${ pname } plugin.yaml
162
+ '' ;
163
+ } ;
164
+
165
+ helm-with-plugins = wrapHelm kubernetes-helm {
166
+ plugins = [
167
+ helm-schema
168
+ ] ;
169
+ } ;
132
170
} ;
133
171
134
172
formatter = alejandra ;
Original file line number Diff line number Diff line change 1
1
# Copyright 2023 Nutanix. All rights reserved.
2
2
# SPDX-License-Identifier: Apache-2.0
3
3
4
- HELM_PLUGINS =$(REPO_ROOT ) /.local/helm/plugins
5
-
6
4
.PHONY : lint-chart
7
5
lint-chart : # # Lints helm chart
8
6
lint-chart :
@@ -16,18 +14,7 @@ lint-and-install-chart:
16
14
17
15
.PHONY : schema-chart
18
16
schema-chart : # # Updates helm values JSON schema
19
- schema-chart : helm-values-schema-plugin
20
- HELM_PLUGINS=$(HELM_PLUGINS ) helm schema \
21
- --input charts/cluster-api-runtime-extensions-nutanix/values.yaml \
22
- --output charts/cluster-api-runtime-extensions-nutanix/values.schema.json
23
-
24
- .PHONY : helm-values-schema-plugin
25
- helm-values-schema-plugin : # # Installs helm-values-schema plugin
26
- helm-values-schema-plugin :
27
- # Only install if plugin not yet installed
28
- HELM_PLUGINS=$(HELM_PLUGINS ) \
29
- helm plugin list | grep --silent " ^schema\s" \
30
- || \
31
- HELM_PLUGINS=$(HELM_PLUGINS ) \
32
- helm plugin install \
33
- https://github.com/losisin/helm-values-schema-json.git
17
+ schema-chart :
18
+ helm schema \
19
+ --input charts/cluster-api-runtime-extensions-nutanix/values.yaml \
20
+ --output charts/cluster-api-runtime-extensions-nutanix/values.schema.json
You can’t perform that action at this time.
0 commit comments