-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
70 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
VERSION:=0.18.0 | ||
LIBRARY_VERSION:=0.0.1 | ||
PROVIDER_VERSION:=0.18.0 | ||
JSONNET_BIN:=jrsonnet | ||
|
||
grafanaplane: grafanaplane/raw.libsonnet grafanaplane/compositions.libsonnet | ||
|
||
grafanaplane/raw.libsonnet: generator/main.libsonnet generator/namespaced.libsonnet generator/crds.yaml generator/vendor | ||
$(JSONNET_BIN) -S -J generator/vendor generator/main.libsonnet | jsonnetfmt - > grafanaplane/raw.libsonnet | ||
$(JSONNET_BIN) -S -J generator/vendor -A 'version=$(LIBRARY_VERSION)-$(PROVIDER_VERSION)' generator/main.libsonnet | jsonnetfmt - > grafanaplane/raw.libsonnet | ||
|
||
grafanaplane/compositions.libsonnet: generator/compositions.libsonnet generator/namespaced.libsonnet generator/crds.yaml generator/vendor | ||
$(JSONNET_BIN) -J generator/vendor generator/compositions.libsonnet | jsonnetfmt - > grafanaplane/compositions.libsonnet | ||
|
||
generator/crds.yaml: | ||
cd generator && \ | ||
curl -sLO https://github.com/grafana/crossplane-provider-grafana/releases/download/v${VERSION}/crds.yaml | ||
curl -sLO https://github.com/grafana/crossplane-provider-grafana/releases/download/v$(PROVIDER_VERSION)/crds.yaml | ||
|
||
docs: grafanaplane | ||
@rm -rf docs/ | ||
@$(JSONNET_BIN) \ | ||
-J grafanaplane/vendor \ | ||
-J generator/vendor \ | ||
-S -c -m docs \ | ||
-e '(import "github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet").render(import "grafanaplane/main.libsonnet")' | ||
|
||
.PHONY: tag | ||
tag: | ||
git tag $(LIBRARY_VERSION)-$(PROVIDER_VERSION) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export JSONNET_BIN=jrsonnet | ||
export NVIM_JSONNET_USE_TANKA=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1 @@ | ||
local d = import 'github.com/jsonnet-libs/docsonnet/doc-util/main.libsonnet'; | ||
|
||
(import './raw.libsonnet') | ||
+ { | ||
'#': d.package.new( | ||
'grafanaplane', | ||
'github.com/Duologic/grafana-crossplane-libsonnet/grafanaplane', | ||
||| | ||
Jsonnet library providing a namespaced set of compositions/XRDs for the Grafana Crossplane provider. The compositions, XRDs and the library for creating the XRD objects is generated. | ||
The compositions/XRDs can be imported like this: | ||
```jsonnet | ||
local compositions = import "github.com/Duologic/grafana-crossplane-libsonnet/grafanaplane/compositions.libsonnet" | ||
[ | ||
# Each composition has a `definition` and `composition` key | ||
compositions.oss.v1alpha1.folder.composition, | ||
compositions.oss.v1alpha1.folder.definition, | ||
# When using Tanka, then providing the higher level objects is also possible | ||
compositions.cloud.v1alpha1.stack, # a composition/XRD pair | ||
compositions.oss, # whole group of composition/XRD pairs | ||
] | ||
``` | ||
The library in `main.libsonnet` can be used to build objects for these XRDs. | ||
|||, | ||
'main.libsonnet', | ||
'main' | ||
), | ||
} | ||
import './raw.libsonnet' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters