-
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.
fix: refactor compositions into configurations
- Loading branch information
Showing
10 changed files
with
171 additions
and
236 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
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 |
---|---|---|
|
@@ -5,19 +5,19 @@ Jsonnet library providing a namespaced set of compositions/XRDs for the Grafana | |
## Install | ||
|
||
``` | ||
jb install github.com/Duologic/grafana-crossplane-libsonnet/[email protected].4-0.21.0 | ||
jb install github.com/grafana/grafana-crossplane-libsonnet/[email protected].6-0.21.0 | ||
``` | ||
|
||
## Usage | ||
|
||
```jsonnet | ||
local grafanaplane = import 'github.com/Duologic/grafana-crossplane-libsonnet/grafanaplane/main.libsonnet'; | ||
local grafanaplane = import 'github.com/grafana/grafana-crossplane-libsonnet/grafanaplane/main.libsonnet'; | ||
``` | ||
|
||
|
||
## Subpackages | ||
|
||
* [compositions](compositions.md) | ||
* [configurations](configurations.md) | ||
* [oss](oss/index.md) | ||
* [raw](raw/index.md) | ||
* [sm](sm/index.md) |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# configurations | ||
|
||
This package contains Configurations for the generated Compositions and CompositeResourceDefinitions (XRD). A single configuration imports compositions for a resource group. | ||
|
||
The Configurations can be imported like this: | ||
|
||
```jsonnet | ||
local grafanaplane = import 'github.com/grafana/grafana-crossplane-libsonnet/grafanaplane/main.libsonnet'; | ||
local configurations = grafanaplane.configurations; | ||
[ | ||
configuration.alerting, | ||
configuration.cloud, | ||
configuration.enterprise, | ||
configuration.ml, | ||
configuration.oncall, | ||
configuration.oss, | ||
configuration.slo, | ||
configuration.sm | ||
] | ||
``` | ||
|
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,8 +1,21 @@ | ||
local namespaced = import './namespaced.libsonnet'; | ||
local crossplane = import 'github.com/jsonnet-libs/crossplane-libsonnet/crossplane/1.14/main.libsonnet'; | ||
|
||
local configuration(key) = | ||
local configuration(key, version) = | ||
local conf = crossplane.pkg.v1.configuration; | ||
conf.new(key) | ||
+ conf.spec.withPackage('xpkg.upbound.io/grafana/' + key); | ||
+ conf.spec.withPackage('ghcr.io/grafana/crossplane/' + key + ':' + version); | ||
|
||
{} | ||
local groups = | ||
std.set( | ||
std.map( | ||
function(def) | ||
std.splitLimit(def.definition.spec.group, '.', 1)[0], | ||
namespaced | ||
) | ||
); | ||
|
||
function(configurationVersion) { | ||
[group]: configuration(group, configurationVersion) | ||
for group in groups | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.