Skip to content

Commit

Permalink
fix(cloud): fix invalid characters in default stack secretName (#30)
Browse files Browse the repository at this point in the history
* fix(cloud): fix invalid characters in default stack secretName

Kubernetes resource names may only use lowercase letters, numerics, and
dashes. The default `secretName` suffix used uppercase letters, which
are not allowed.

* chore(version): 0.5.2-0.22.0

* fix(grafanaplane): correct argument order for providerConfig.new

---------

Co-authored-by: Duologic <jeroen@simplistic.be>
  • Loading branch information
alexander-bauer and Duologic authored Jan 16, 2025
1 parent d8e87dd commit 6f5844b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LIBRARY_VERSION:=0.5.1
LIBRARY_VERSION:=0.5.2
PROVIDER_VERSION:=0.22.0
JSONNET_BIN:=jrsonnet
CROSSPLANE?=crossplane
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Most of this library is generated: the Compositions/XRDs packages, Configuration
## Install

```
jb install github.com/grafana/grafana-crossplane-libsonnet/grafanaplane@0.5.1-0.22.0
jb install github.com/grafana/grafana-crossplane-libsonnet/grafanaplane@0.5.2-0.22.0
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions grafanaplane/main.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ local raw = import './zz/main.libsonnet';
),

stack: {
new(name, namespace, cloudProviderConfigName, secretName=name + '-providerConfigToken'): {
new(name, namespace, cloudProviderConfigName, secretName=name + '-providerconfig-token'): {
stack:
assert validStackSlug(name) :
'The slug/name needs to be a valid subdomain. One word. Only lowercase letters and numbers allowed. Must start with a letter. No dots, dashes, underscores, or spaces.';
Expand All @@ -101,7 +101,7 @@ local raw = import './zz/main.libsonnet';

serviceAccount: this.stackServiceAccount.fromStackResource(self.stack, namespace),
token: this.stackServiceAccountToken.fromStackServiceAccountResource(self.serviceAccount, namespace, secretName),
grafanaProviderConfig: root.global.providerConfig.new(name + '-grafana', namespace, secretName, 'instanceCredentials'),
grafanaProviderConfig: root.global.providerConfig.new(name + '-grafana', secretName, namespace, 'instanceCredentials'),
},
},
stackServiceAccount: {
Expand Down
16 changes: 8 additions & 8 deletions grafanaplane/zz/configurations.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
name: 'grafana-namespaced-alerting',
},
spec: {
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-alerting:0.5.1-0.22.0',
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-alerting:0.5.2-0.22.0',
},
},
cloud: {
Expand All @@ -22,7 +22,7 @@
name: 'grafana-namespaced-cloud',
},
spec: {
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-cloud:0.5.1-0.22.0',
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-cloud:0.5.2-0.22.0',
},
},
enterprise: {
Expand All @@ -35,7 +35,7 @@
name: 'grafana-namespaced-enterprise',
},
spec: {
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-enterprise:0.5.1-0.22.0',
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-enterprise:0.5.2-0.22.0',
},
},
ml: {
Expand All @@ -48,7 +48,7 @@
name: 'grafana-namespaced-ml',
},
spec: {
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-ml:0.5.1-0.22.0',
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-ml:0.5.2-0.22.0',
},
},
oncall: {
Expand All @@ -61,7 +61,7 @@
name: 'grafana-namespaced-oncall',
},
spec: {
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oncall:0.5.1-0.22.0',
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oncall:0.5.2-0.22.0',
},
},
oss: {
Expand All @@ -74,7 +74,7 @@
name: 'grafana-namespaced-oss',
},
spec: {
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oss:0.5.1-0.22.0',
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oss:0.5.2-0.22.0',
},
},
slo: {
Expand All @@ -87,7 +87,7 @@
name: 'grafana-namespaced-slo',
},
spec: {
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-slo:0.5.1-0.22.0',
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-slo:0.5.2-0.22.0',
},
},
sm: {
Expand All @@ -100,7 +100,7 @@
name: 'grafana-namespaced-sm',
},
spec: {
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-sm:0.5.1-0.22.0',
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-sm:0.5.2-0.22.0',
},
},
}
2 changes: 1 addition & 1 deletion grafanaplane/zz/version.libsonnet
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'0.5.1-0.22.0'
'0.5.2-0.22.0'

0 comments on commit 6f5844b

Please sign in to comment.