Skip to content

Commit

Permalink
refactor core-infra Helm Chart
Browse files Browse the repository at this point in the history
  • Loading branch information
ortwinschneider committed Jan 15, 2021
1 parent e54254b commit 5224e96
Show file tree
Hide file tree
Showing 16 changed files with 50 additions and 54 deletions.
2 changes: 1 addition & 1 deletion helm/bobbycar-core-infra/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 4.5.18
appVersion: 4.5.24

sources:
- https://github.com/sa-mw-dach/bobbycar
Expand Down
2 changes: 1 addition & 1 deletion helm/bobbycar-core-infra/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Bobbycar core infrastructure components
- Datagrid CR and Route

- AMQ Streams Operator Subscription
- AMQ Streams Kafka Cluster and Topics
- AMQ Streams Kafka Cluster
- AMQ Streams Kafka HTTP Bridge Cluster and Route
2 changes: 1 addition & 1 deletion helm/bobbycar-core-infra/templates/amq-broker-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: broker.amq.io/v2alpha3
kind: ActiveMQArtemis
metadata:
name: {{ .Values.amqBroker.name }}
name: bobbycar-amq-mqtt
namespace: {{ .Values.namespace }}
spec:
deploymentPlan:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: {{ .Values.amqOperator.name }}
name: amq-broker
namespace: {{ .Values.namespace }}
spec:
channel: current
channel: {{ .Values.amqOperator.channel }}
installPlanApproval: {{ .Values.amqOperator.installPlanApproval }}
name: amq-broker
source: redhat-operators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: {{ .Values.strimziOperator.name }}
name: amq-streams
namespace: {{ .Values.namespace }}
spec:
channel: stable
channel: {{ .Values.strimziOperator.channel }}
installPlanApproval: {{ .Values.strimziOperator.installPlanApproval }}
name: amq-streams
source: redhat-operators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: {{ .Values.camelKOperator.name }}
name: red-hat-camel-k
namespace: {{ .Values.namespace }}
spec:
channel: techpreview
channel: {{ .Values.camelKOperator.channel }}
installPlanApproval: {{ .Values.camelKOperator.installPlanApproval }}
name: red-hat-camel-k
source: redhat-operators
Expand Down
8 changes: 4 additions & 4 deletions helm/bobbycar-core-infra/templates/datagrid-route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
name: datagrid
namespace: {{ .Values.namespace }}
labels:
clusterName: {{ .Values.datagrid.name }}
infinispan_cr: {{ .Values.datagrid.name }}
clusterName: bobbycar-dg
infinispan_cr: bobbycar-dg
spec:
host: {{ .Values.datagrid.name }}-{{ .Values.namespace }}.{{ .Values.ocpDomain }}
host: bobbycar-dg-{{ .Values.namespace }}.{{ .Values.ocpDomain }}
to:
kind: Service
name: {{ .Values.datagrid.name }}
name: bobbycar-dg
weight: 100
port:
targetPort: 11222
Expand Down
4 changes: 2 additions & 2 deletions helm/bobbycar-core-infra/templates/datagrid-subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: {{ .Values.datagridOperator.name }}
name: datagrid
namespace: {{ .Values.namespace }}
spec:
channel: 8.0.x
channel: {{ .Values.datagridOperator.channel }}
installPlanApproval: {{ .Values.datagridOperator.installPlanApproval }}
name: datagrid
source: redhat-operators
Expand Down
11 changes: 6 additions & 5 deletions helm/bobbycar-core-infra/templates/datagrid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
apiVersion: infinispan.org/v1
kind: Infinispan
metadata:
name: {{ .Values.datagrid.name }}
name: bobbycar-dg
namespace: {{ .Values.namespace }}
spec:
replicas: {{ .Values.datagrid.replicas }}
service:
type: DataGrid
type: {{ .Values.datagrid.type }}
container:
storage: 2Gi
container:
cpu: '500m'
cpu: {{ .Values.datagrid.cpu }}
extraJvmOpts: '-XX:NativeMemoryTracking=summary'
memory: 1Gi
expose: {}
memory: {{ .Values.datagrid.memory }}
expose:
type: Route
logging:
categories:
org.infinispan: info
Expand Down
4 changes: 2 additions & 2 deletions helm/bobbycar-core-infra/templates/kafka-bridge-route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ metadata:
name: kafka-bridge
namespace: {{ .Values.namespace }}
spec:
host: {{ .Values.kafka.bridge.name }}-{{ .Values.namespace }}.{{ .Values.ocpDomain }}
host: bobbycar-{{ .Values.namespace }}.{{ .Values.ocpDomain }}
to:
kind: Service
name: {{ .Values.kafka.bridge.name }}-bridge-service
name: bobbycar-bridge-service
weight: 100
port:
targetPort: rest-api
Expand Down
4 changes: 2 additions & 2 deletions helm/bobbycar-core-infra/templates/kafka-bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
apiVersion: kafka.strimzi.io/v1alpha1
kind: KafkaBridge
metadata:
name: {{ .Values.kafka.bridge.name }}
name: bobbycar
namespace: {{ .Values.namespace }}
spec:
replicas: {{ .Values.kafka.bridge.replicas }}
bootstrapServers: {{ .Values.kafka.bridge.bootstrapServers }}
bootstrapServers: bobbycar-cluster-kafka-bootstrap:9092
http:
port: {{ .Values.kafka.bridge.port }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion helm/bobbycar-core-infra/templates/kafka-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: kafka.strimzi.io/v1beta1
kind: Kafka
metadata:
name: {{ .Values.kafka.cluster.name }}
name: bobbycar-cluster
namespace: {{ .Values.namespace }}
spec:
kafka:
Expand Down
6 changes: 2 additions & 4 deletions helm/bobbycar-core-infra/templates/kafka-gps-topic.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{{- if .Values.components.enabled.kafka -}}
apiVersion: kafka.strimzi.io/v1beta1
kind: KafkaTopic
metadata:
name: {{ .Values.kafka.topic.gps.name }}
namespace: {{ .Values.namespace }}
labels:
strimzi.io/cluster: {{ .Values.kafka.cluster.name }}
strimzi.io/cluster: bobbycar-cluster
spec:
partitions: {{ .Values.kafka.topic.gps.partitions }}
replicas: {{ .Values.kafka.topic.gps.replicas }}
config:
retention.ms: 7200000
retention.ms: {{ .Values.kafka.topic.gps.retention }}
segment.bytes: 1073741824
{{- end }}

6 changes: 2 additions & 4 deletions helm/bobbycar-core-infra/templates/kafka-metrics-topic.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{{- if .Values.components.enabled.kafka -}}
apiVersion: kafka.strimzi.io/v1beta1
kind: KafkaTopic
metadata:
name: {{ .Values.kafka.topic.metrics.name }}
namespace: {{ .Values.namespace }}
labels:
strimzi.io/cluster: {{ .Values.kafka.cluster.name }}
strimzi.io/cluster: bobbycar-cluster
spec:
partitions: {{ .Values.kafka.topic.metrics.partitions }}
replicas: {{ .Values.kafka.topic.metrics.replicas }}
config:
retention.ms: 7200000
retention.ms: {{ .Values.kafka.topic.metrics.retention }}
segment.bytes: 1073741824
{{- end }}

Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{{- if .Values.components.enabled.kafka -}}
apiVersion: kafka.strimzi.io/v1beta1
kind: KafkaTopic
metadata:
name: {{ .Values.kafka.topic.zonechange.name }}
namespace: {{ .Values.namespace }}
labels:
strimzi.io/cluster: {{ .Values.kafka.cluster.name }}
strimzi.io/cluster: bobbycar-cluster
spec:
partitions: {{ .Values.kafka.topic.zonechange.partitions }}
replicas: {{ .Values.kafka.topic.zonechange.replicas }}
config:
retention.ms: 7200000
retention.ms: {{ .Values.kafka.topic.zonechange.retention }}
segment.bytes: 1073741824
{{- end }}

35 changes: 18 additions & 17 deletions helm/bobbycar-core-infra/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

namespace: bobbycar
namespace: bc
appName: Bobbycar
ocpDomain: apps.ocp4.stormshift.coe.muc.redhat.com

Expand All @@ -16,58 +16,59 @@ components:

# AMQ Broker Operator Subscription
amqOperator:
name: amq-broker
installPlanApproval: Automatic
startingCSV: amq-broker-operator.v0.17.0
startingCSV: amq-broker-operator.v0.18.0
channel: current

# Camel-K Operator Subscription
camelKOperator:
name: red-hat-camel-k
installPlanApproval: Automatic
startingCSV: red-hat-camel-k-operator.v1.0.0
channel: techpreview

# Datagrid Operator Subscription
datagridOperator:
name: datagrid
installPlanApproval: Automatic
startingCSV: datagrid-operator.v8.0.3
channel: 8.0.x

# AMQ Streams Operator Subscription
strimziOperator:
name: amq-streams
installPlanApproval: Automatic
startingCSV: amqstreams.v1.6.0
startingCSV: amqstreams.v1.6.1
channel: stable

datagrid:
name: bobbycar-dg
replicas: 1
type: DataGrid
cpu: '500m'
memory: 1Gi

amqBroker:
name: bobbycar-amq-mqtt
instances: 1
instances: 1
console:
expose: true

kafka:
cluster:
name: bobbycar-cluster
brokerReplicas: 1
brokerReplicas: 2
zookeeperReplicas: 3
bridge:
name: bobbycar
replicas: 1
bootstrapServers: bobbycar-cluster-kafka-bootstrap:9092
port: 8080
topic:
gps:
name: bobbycar-gps
partitions: 1
replicas: 1
retention: 60000
metrics:
name: bobbycar-metrics
partitions: 1
replicas: 1
zonechange:
replicas: 1
retention: 60000
zonechange:
name: bobbycar-zonechange
partitions: 1
replicas: 1
replicas: 1
retention: 300000

0 comments on commit 5224e96

Please sign in to comment.