Skip to content

Commit b494b84

Browse files
committed
run linter and update resources
1 parent 5693ba5 commit b494b84

File tree

3 files changed

+157
-5
lines changed

3 files changed

+157
-5
lines changed

api/v1beta1/grafanadatasource_types.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ import (
2222
"encoding/json"
2323
"errors"
2424
"fmt"
25-
v1 "k8s.io/api/core/v1"
2625
"time"
2726

27+
v1 "k8s.io/api/core/v1"
28+
2829
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2930
)
3031

controllers/datasource_controller.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ import (
2020
"context"
2121
"encoding/json"
2222
"fmt"
23-
v1 "k8s.io/api/core/v1"
2423
"strings"
2524
"time"
2625

26+
v1 "k8s.io/api/core/v1"
27+
2728
simplejson "github.com/bitly/go-simplejson"
2829
"github.com/grafana-operator/grafana-operator/v5/controllers/metrics"
2930

docs/docs/api.md

+153-3
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,10 @@ GrafanaDatasourceSpec defines the desired state of GrafanaDatasource
539539
</td>
540540
<td>false</td>
541541
</tr><tr>
542-
<td><b>secrets</b></td>
543-
<td>[]string</td>
542+
<td><b><a href="grafanadatasourcespecvaluesfromindex">valuesFrom</a></b></td>
543+
<td>[]object</td>
544544
<td>
545-
secrets used for variable expansion<br/>
545+
environments variables from secrets or config maps<br/>
546546
</td>
547547
<td>false</td>
548548
</tr></tbody>
@@ -778,6 +778,156 @@ A label selector requirement is a selector that contains values, a key, and an o
778778
</table>
779779

780780

781+
### GrafanaDatasource.spec.valuesFrom[index]
782+
<sup><sup>[↩ Parent](grafanadatasourcespec)</sup></sup>
783+
784+
785+
786+
787+
788+
<table>
789+
<thead>
790+
<tr>
791+
<th>Name</th>
792+
<th>Type</th>
793+
<th>Description</th>
794+
<th>Required</th>
795+
</tr>
796+
</thead>
797+
<tbody><tr>
798+
<td><b>targetPath</b></td>
799+
<td>string</td>
800+
<td>
801+
<br/>
802+
</td>
803+
<td>true</td>
804+
</tr><tr>
805+
<td><b><a href="grafanadatasourcespecvaluesfromindexvaluefrom">valueFrom</a></b></td>
806+
<td>object</td>
807+
<td>
808+
<br/>
809+
</td>
810+
<td>true</td>
811+
</tr></tbody>
812+
</table>
813+
814+
815+
### GrafanaDatasource.spec.valuesFrom[index].valueFrom
816+
<sup><sup>[↩ Parent](grafanadatasourcespecvaluesfromindex)</sup></sup>
817+
818+
819+
820+
821+
822+
<table>
823+
<thead>
824+
<tr>
825+
<th>Name</th>
826+
<th>Type</th>
827+
<th>Description</th>
828+
<th>Required</th>
829+
</tr>
830+
</thead>
831+
<tbody><tr>
832+
<td><b><a href="grafanadatasourcespecvaluesfromindexvaluefromconfigmapkeyref">configMapKeyRef</a></b></td>
833+
<td>object</td>
834+
<td>
835+
Selects a key of a ConfigMap.<br/>
836+
</td>
837+
<td>false</td>
838+
</tr><tr>
839+
<td><b><a href="grafanadatasourcespecvaluesfromindexvaluefromsecretkeyref">secretKeyRef</a></b></td>
840+
<td>object</td>
841+
<td>
842+
Selects a key of a Secret.<br/>
843+
</td>
844+
<td>false</td>
845+
</tr></tbody>
846+
</table>
847+
848+
849+
### GrafanaDatasource.spec.valuesFrom[index].valueFrom.configMapKeyRef
850+
<sup><sup>[↩ Parent](grafanadatasourcespecvaluesfromindexvaluefrom)</sup></sup>
851+
852+
853+
854+
Selects a key of a ConfigMap.
855+
856+
<table>
857+
<thead>
858+
<tr>
859+
<th>Name</th>
860+
<th>Type</th>
861+
<th>Description</th>
862+
<th>Required</th>
863+
</tr>
864+
</thead>
865+
<tbody><tr>
866+
<td><b>key</b></td>
867+
<td>string</td>
868+
<td>
869+
The key to select.<br/>
870+
</td>
871+
<td>true</td>
872+
</tr><tr>
873+
<td><b>name</b></td>
874+
<td>string</td>
875+
<td>
876+
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?<br/>
877+
</td>
878+
<td>false</td>
879+
</tr><tr>
880+
<td><b>optional</b></td>
881+
<td>boolean</td>
882+
<td>
883+
Specify whether the ConfigMap or its key must be defined<br/>
884+
</td>
885+
<td>false</td>
886+
</tr></tbody>
887+
</table>
888+
889+
890+
### GrafanaDatasource.spec.valuesFrom[index].valueFrom.secretKeyRef
891+
<sup><sup>[↩ Parent](grafanadatasourcespecvaluesfromindexvaluefrom)</sup></sup>
892+
893+
894+
895+
Selects a key of a Secret.
896+
897+
<table>
898+
<thead>
899+
<tr>
900+
<th>Name</th>
901+
<th>Type</th>
902+
<th>Description</th>
903+
<th>Required</th>
904+
</tr>
905+
</thead>
906+
<tbody><tr>
907+
<td><b>key</b></td>
908+
<td>string</td>
909+
<td>
910+
The key of the secret to select from. Must be a valid secret key.<br/>
911+
</td>
912+
<td>true</td>
913+
</tr><tr>
914+
<td><b>name</b></td>
915+
<td>string</td>
916+
<td>
917+
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?<br/>
918+
</td>
919+
<td>false</td>
920+
</tr><tr>
921+
<td><b>optional</b></td>
922+
<td>boolean</td>
923+
<td>
924+
Specify whether the Secret or its key must be defined<br/>
925+
</td>
926+
<td>false</td>
927+
</tr></tbody>
928+
</table>
929+
930+
781931
### GrafanaDatasource.status
782932
<sup><sup>[↩ Parent](grafanadatasource)</sup></sup>
783933

0 commit comments

Comments
 (0)