This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
-
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.
Signed-off-by: Mark Sagi-Kazar <[email protected]>
- Loading branch information
1 parent
01a57ad
commit 8d44a13
Showing
8 changed files
with
257 additions
and
9 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
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,27 @@ | ||
{{- if .Values.rbac.create }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ include "benthos-openmeter.fullname" . }} | ||
labels: | ||
{{- include "benthos-openmeter.labels" . | nindent 4 }} | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["pods"] | ||
verbs: ["list"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "benthos-openmeter.fullname" . }} | ||
labels: | ||
{{- include "benthos-openmeter.labels" . | nindent 4 }} | ||
roleRef: | ||
kind: ClusterRole | ||
apiGroup: rbac.authorization.k8s.io | ||
name: {{ include "benthos-openmeter.fullname" . }} | ||
subjects: | ||
- kind: ServiceAccount | ||
namespace: {{ .Release.Namespace }} | ||
name: {{ include "benthos-openmeter.serviceAccountName" . }} | ||
{{- end }} |
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,24 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "benthos-openmeter.fullname" . }} | ||
labels: | ||
{{- include "benthos-openmeter.labels" . | nindent 4 }} | ||
type: Opaque | ||
data: | ||
OPENMETER_URL: {{ required "OpenMeter URL is required" .Values.openmeter.url | b64enc | quote }} | ||
{{- with .Values.openmeter.token }} | ||
OPENMETER_TOKEN: {{ . | b64enc | quote }} | ||
{{- end }} | ||
|
||
|
||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "benthos-openmeter.componentName" (list . "config") }} | ||
labels: | ||
{{- include "benthos-openmeter.labels" . | nindent 4 }} | ||
type: Opaque | ||
data: | ||
config.yaml: {{ .Values.config | toYaml | b64enc | quote }} |
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
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,82 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-1 | ||
labels: | ||
openmeter.io/subject: customer-1 | ||
data.openmeter.io/customer_group: platinum | ||
spec: | ||
containers: | ||
- name: busybox | ||
image: busybox | ||
command: ["sh", "-c", "echo The app is running! && sleep 3600"] | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-2 | ||
labels: | ||
openmeter.io/subject: customer-2 | ||
data.openmeter.io/customer_group: gold | ||
spec: | ||
containers: | ||
- name: busybox | ||
image: busybox | ||
command: ["sh", "-c", "echo The app is running! && sleep 3600"] | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-3 | ||
labels: | ||
openmeter.io/subject: customer-3 | ||
data.openmeter.io/customer_group: platinum | ||
spec: | ||
containers: | ||
- name: busybox | ||
image: busybox | ||
command: ["sh", "-c", "echo The app is running! && sleep 3600"] | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-4 | ||
labels: | ||
openmeter.io/subject: customer-4 | ||
data.openmeter.io/customer_group: platinum | ||
spec: | ||
containers: | ||
- name: busybox | ||
image: busybox | ||
command: ["sh", "-c", "echo The app is running! && sleep 3600"] | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-5 | ||
labels: | ||
openmeter.io/subject: customer-5 | ||
data.openmeter.io/customer_group: gold | ||
spec: | ||
containers: | ||
- name: busybox | ||
image: busybox | ||
command: ["sh", "-c", "echo The app is running! && sleep 3600"] | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: pod-6 | ||
labels: | ||
openmeter.io/subject: customer-6 | ||
data.openmeter.io/customer_group: platinum | ||
spec: | ||
containers: | ||
- name: busybox | ||
image: busybox | ||
command: ["sh", "-c", "echo The app is running! && sleep 3600"] |