Skip to content

Commit

Permalink
Merge pull request #139 from holaplex/mpw/analytics-chart-fix
Browse files Browse the repository at this point in the history
expose graphql server, update netpols, deployment
  • Loading branch information
mpwsh authored Aug 19, 2023
2 parents fe62343 + 1a6bc5a commit 2e05176
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/hub-analytics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type: application
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

version: 0.2.1
version: 0.2.2

# 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
Expand Down
12 changes: 12 additions & 0 deletions charts/hub-analytics/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ spec:
name: {{ include "hub-analytics.fullname" . }}
- secretRef:
name: {{ include "hub-analytics.fullname" . }}
ports:
- name: http
containerPort: {{ .Values.environment.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /health
port: http
readinessProbe:
httpGet:
path: /health
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
1 change: 1 addition & 0 deletions charts/hub-analytics/templates/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: {{ include "hub-analytics.fullname" . }}
data:
{{- with .Values.environment }}
PORT: {{ .port | quote }}
RUST_LOG: {{ .logLevel }}
KAFKA_BROKERS: {{ required "must set kafka brokers" .kafkaBrokers | quote }}
KAFKA_SSL: {{ default "false" .kafkaSsl | quote }}
Expand Down
11 changes: 8 additions & 3 deletions charts/hub-analytics/templates/netpol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,18 @@ spec:
{{- if .Values.networkPolicies.extraEgress }}
{{ toYaml .Values.networkPolicies.extraEgress | indent 4 }}
{{- end }}
{{- if .Values.networkPolicies.extraIngress }}
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: router
ports:
- port: {{ .Values.environment.port }}
protocol: TCP
{{- if .Values.networkPolicies.extraIngress }}
{{ toYaml .Values.networkPolicies.extraIngress | indent 4 }}
{{- end }}
policyTypes:
{{- if .Values.networkPolicies.extraIngress }}
- Ingress
{{- end }}
- Egress
{{- end }}
15 changes: 15 additions & 0 deletions charts/hub-analytics/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "hub-analytics.fullname" . }}
labels:
{{- include "hub-analytics.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "hub-analytics.selectorLabels" . | nindent 4 }}
5 changes: 5 additions & 0 deletions charts/hub-analytics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ securityContext:
runAsUser: 10000
runAsGroup: 10000

service:
type: ClusterIP
port: 80

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down Expand Up @@ -91,6 +95,7 @@ secrets:

environment:
logLevel: info
port: "3000"
kafkaBrokers: "hub-eventbus-cluster-0.hub-eventbus-cluster.default.svc.cluster.local.:9093"
kafkaSsl: false
kafkaUsername: ""
Expand Down

0 comments on commit 2e05176

Please sign in to comment.