Skip to content

Commit

Permalink
Merge pull request #366 from appuio/feature/add-env-variables-stardog…
Browse files Browse the repository at this point in the history
…-operator

[stardog-userrole-operator]Add env support to stardog operator
  • Loading branch information
mhutter authored Oct 22, 2021
2 parents 3aef22b + 84bf8ac commit 4b5832f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions appuio/stardog-userrole-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: stardog-userrole-operator
version: 0.0.4
appVersion: 0.0.2
version: 0.1.0
appVersion: 0.1.1
description: Stardog User and Role Operator
sources:
- https://github.com/vshn/stardog-userrole-operator
Expand Down
6 changes: 4 additions & 2 deletions appuio/stardog-userrole-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# stardog-userrole-operator

![Version: 0.0.4](https://img.shields.io/badge/Version-0.0.4-informational?style=flat-square) ![AppVersion: 0.0.2](https://img.shields.io/badge/AppVersion-0.0.2-informational?style=flat-square)
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 0.1.1](https://img.shields.io/badge/AppVersion-0.1.1-informational?style=flat-square)

Stardog User and Role Operator

Expand All @@ -21,10 +21,12 @@ Edit the README.gotmpl.md template instead.
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| config.clusterAccess.enabled | bool | `true` | Enable cluster access to operator |
| config.env.RECONCILIATION_FREQUENCY | string | `"30s"` | Reconciliation frequency of CRD |
| config.env.RECONCILIATION_FREQUENCY_ON_ERROR | string | `"5m"` | Reconciliation frequency of CRD on error |
| image.pullPolicy | string | `"Always"` | |
| image.registry | string | `"docker.io"` | |
| image.repository | string | `"vshn/stardog-userrole-operator"` | |
| image.tag | string | `"0.0.2"` | |
| image.tag | string | `"v0.1.1"` | |
| imagePullSecrets | list | `[]` | |
| leaderElection.enabled | bool | `false` | Enable leader election for multiple replicas |
| metrics.proxy.enabled | bool | `false` | Enable metrics via service behind a authenticated proxy |
Expand Down
7 changes: 7 additions & 0 deletions appuio/stardog-userrole-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ spec:
- --metrics-addr=127.0.0.1:8080
{{- if .Values.leaderElection.enabled -}}
- --enable-leader-election
{{- end -}}
{{- with .Values.config.env }}
env:
{{- range $key, $value := . }}
- name: {{ $key | quote }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
ports:
Expand Down
4 changes: 2 additions & 2 deletions appuio/stardog-userrole-operator/test/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func Test_Deployment_ShouldRender_ImagePullSecrets(t *testing.T) {
}

func Test_Deployment_ShouldRender_CorrectImage(t *testing.T) {
expectedImage := "docker.io/vshn/stardog-userrole-operator:0.0.2"
expectedImage := "docker.io/vshn/stardog-userrole-operator:v0.1.1"
options := &helm.Options{}

got := renderDeployment(t, options, false)
Expand All @@ -82,7 +82,7 @@ func Test_Deployment_ShouldRender_CorrectImage(t *testing.T) {
}

func Test_Deployment_WhenProxyEnabled_ThenEnableRBACContainer(t *testing.T) {
expectedBaseImage := "docker.io/vshn/stardog-userrole-operator:0.0.2"
expectedBaseImage := "docker.io/vshn/stardog-userrole-operator:v0.1.1"
expectedProxyImage := "gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0"
options := &helm.Options{
SetValues: map[string]string{
Expand Down
7 changes: 6 additions & 1 deletion appuio/stardog-userrole-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image:
registry: docker.io
repository: vshn/stardog-userrole-operator
tag: 0.0.2
tag: v0.1.1
pullPolicy: Always

imagePullSecrets: []
Expand All @@ -25,6 +25,11 @@ config:
clusterAccess:
# -- Enable cluster access to operator
enabled: true
env:
# -- Reconciliation frequency of CRD
RECONCILIATION_FREQUENCY: "30s"
# -- Reconciliation frequency of CRD on error
RECONCILIATION_FREQUENCY_ON_ERROR: "5m"

resources:
limits:
Expand Down

0 comments on commit 4b5832f

Please sign in to comment.