-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from cloudcheflabs/2
2
- Loading branch information
Showing
72 changed files
with
3,281 additions
and
0 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
7 changes: 7 additions & 0 deletions
7
trino-ecosystem/trino-gateway/additional-charts/mysql/Chart.yaml
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,7 @@ | ||
apiVersion: v2 | ||
name: dataroaster-trino-gateway-mysql | ||
version: v1.0.0 | ||
appVersion: 5.7 | ||
description: dataroaster mysql for trino gateway. | ||
|
||
|
73 changes: 73 additions & 0 deletions
73
trino-ecosystem/trino-gateway/additional-charts/mysql/templates/mysql.yaml
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,73 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: mysql-secrets | ||
namespace: {{ .Values.namespace }} | ||
type: Opaque | ||
data: | ||
ROOT_PASSWORD: {{ .Values.rootPassword | b64enc }} | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: mysql-data-disk | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: {{ .Values.storage.size }} | ||
storageClassName: {{ .Values.storage.storageClass }} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: mysql-statefulset | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: mysql | ||
spec: | ||
serviceName: mysql-service | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: mysql | ||
template: | ||
metadata: | ||
labels: | ||
app: mysql | ||
spec: | ||
containers: | ||
- name: mysql | ||
image: mysql:5.7 | ||
ports: | ||
- containerPort: 3306 | ||
volumeMounts: | ||
- mountPath: "/var/lib/mysql" | ||
subPath: "mysql" | ||
name: mysql-data | ||
env: | ||
- name: MYSQL_ROOT_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: mysql-secrets | ||
key: ROOT_PASSWORD | ||
volumes: | ||
- name: mysql-data | ||
persistentVolumeClaim: | ||
claimName: mysql-data-disk | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: mysql-service | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
selector: | ||
app: mysql | ||
ports: | ||
- protocol: TCP | ||
port: 3306 | ||
targetPort: 3306 |
5 changes: 5 additions & 0 deletions
5
trino-ecosystem/trino-gateway/additional-charts/mysql/values.yaml
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,5 @@ | ||
namespace: trino-gateway | ||
storage: | ||
storageClass: standard | ||
size: 5Gi | ||
rootPassword: mysqlpass123 |
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,6 @@ | ||
|
||
apiVersion: v2 | ||
name: dataroaster-trino-gateway | ||
version: v1.0.3 | ||
appVersion: v1.0.1 | ||
description: dataroaster trino gateway |
38 changes: 38 additions & 0 deletions
38
trino-ecosystem/trino-gateway/chart/templates/configmap.yaml
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,38 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: trino-gateway | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: trino-gateway | ||
data: | ||
application.properties: | | ||
[email protected]@ | ||
application-prod.yml: | | ||
# spring boot server | ||
server: | ||
port: {{ .Values.server.port }} | ||
servlet: | ||
context-path: / | ||
# trino proxy | ||
trino: | ||
proxy: | ||
port: {{ .Values.trino.proxy.port }} | ||
authentication: {{ .Values.trino.proxy.authentication }} | ||
tls: | ||
enabled: {{ .Values.trino.proxy.tls.enabled }} | ||
keystorePath: {{ .Values.trino.proxy.tls.keystorePath }} | ||
keystorePass: {{ .Values.trino.proxy.tls.keystorePass }} | ||
trustStorePath: {{ .Values.trino.proxy.tls.trustStorePath }} | ||
trustStorePass: {{ .Values.trino.proxy.tls.trustStorePass }} | ||
# jdbc | ||
jdbc: | ||
driverClassName: com.mysql.jdbc.Driver | ||
url: {{ .Values.jdbc.url }} | ||
user: {{ .Values.jdbc.user }} | ||
pass: {{ .Values.jdbc.pass }} | ||
# hibernate | ||
hibernate: | ||
dialect: org.hibernate.dialect.MySQL5Dialect | ||
show_sql: {{ .Values.hibernate.show_sql }} | ||
globally_quoted_identifiers: {{ .Values.hibernate.globally_quoted_identifiers }} |
56 changes: 56 additions & 0 deletions
56
trino-ecosystem/trino-gateway/chart/templates/deployment.yaml
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,56 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: trino-gateway | ||
labels: | ||
app: trino-gateway | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: trino-gateway | ||
template: | ||
metadata: | ||
labels: | ||
app: trino-gateway | ||
annotations: | ||
{{- toYaml $.Values.tolerations | nindent 8 }} | ||
spec: | ||
affinity: | ||
{{- toYaml $.Values.affinity | nindent 8 }} | ||
tolerations: | ||
{{- toYaml $.Values.tolerations | nindent 8 }} | ||
nodeSelector: | ||
{{- toYaml $.Values.nodeSelector | nindent 8 }} | ||
{{- if .Values.priorityClassName }} | ||
priorityClassName: {{ .Values.priorityClassName }} | ||
{{- end }} | ||
hostNetwork: {{ .Values.hostNetwork }} | ||
serviceAccountName: {{ .Values.serviceAccount }} | ||
containers: | ||
- name: trino-gateway | ||
image: {{ .Values.image }} | ||
imagePullPolicy: {{ .Values.imagePullPolicy }} | ||
resources: | ||
{{- toYaml $.Values.resources | nindent 12 }} | ||
command: | ||
- "./run-trino-gateway.sh" | ||
volumeMounts: | ||
- name: trino-gateway-volume | ||
mountPath: /opt/trino-gateway/conf/application.properties | ||
subPath: application.properties | ||
- name: trino-gateway-volume | ||
mountPath: /opt/trino-gateway/conf/application-prod.yml | ||
subPath: application-prod.yml | ||
ports: | ||
- name: proxy | ||
containerPort: {{ .Values.trino.proxy.port }} | ||
protocol: TCP | ||
- name: rest | ||
containerPort: {{ .Values.server.port }} | ||
protocol: TCP | ||
volumes: | ||
- name: trino-gateway-volume | ||
configMap: | ||
name: trino-gateway |
24 changes: 24 additions & 0 deletions
24
trino-ecosystem/trino-gateway/chart/templates/proxy-ingress.yaml
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: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: trino-gateway-proxy-ingress | ||
namespace: {{ .Values.namespace }} | ||
annotations: | ||
cert-manager.io/cluster-issuer: {{ .Values.certManager.clusterIssue }} | ||
spec: | ||
ingressClassName: {{ .Values.ingress.ingressClassName }} | ||
rules: | ||
- host: {{ .Values.ingress.proxyHostName }} | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: trino-gateway-proxy-service | ||
port: | ||
number: {{ .Values.trino.proxy.port }} | ||
path: / | ||
pathType: ImplementationSpecific | ||
tls: | ||
- hosts: | ||
- {{ .Values.ingress.proxyHostName }} | ||
secretName: {{ .Values.ingress.proxyHostName }}-tls |
24 changes: 24 additions & 0 deletions
24
trino-ecosystem/trino-gateway/chart/templates/rest-ingress.yaml
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: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: trino-gateway-rest-ingress | ||
namespace: {{ .Values.namespace }} | ||
annotations: | ||
cert-manager.io/cluster-issuer: {{ .Values.certManager.clusterIssue }} | ||
spec: | ||
ingressClassName: {{ .Values.ingress.ingressClassName }} | ||
rules: | ||
- host: {{ .Values.ingress.restHostName }} | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: trino-gateway-rest-service | ||
port: | ||
number: {{ .Values.server.port }} | ||
path: / | ||
pathType: ImplementationSpecific | ||
tls: | ||
- hosts: | ||
- {{ .Values.ingress.restHostName }} | ||
secretName: {{ .Values.ingress.restHostName }}-tls |
34 changes: 34 additions & 0 deletions
34
trino-ecosystem/trino-gateway/chart/templates/service.yaml
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,34 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: trino-gateway-proxy-service | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: trino-gateway | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: {{ .Values.trino.proxy.port }} | ||
targetPort: proxy | ||
protocol: TCP | ||
name: trino-gateway-proxy | ||
selector: | ||
app: trino-gateway | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: trino-gateway-rest-service | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: trino-gateway | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: {{ .Values.server.port }} | ||
targetPort: rest | ||
protocol: TCP | ||
name: trino-gateway-rest | ||
selector: | ||
app: trino-gateway |
7 changes: 7 additions & 0 deletions
7
trino-ecosystem/trino-gateway/chart/templates/serviceaccount.yaml
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,7 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ .Values.serviceAccount }} | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app.kubernetes.io/name: trino-gateway |
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,52 @@ | ||
namespace: trino-gateway | ||
serviceAccount: trino-gateway | ||
image: cloudcheflabs/trino-gateway:v1.0.1 | ||
imagePullPolicy: Always | ||
resources: | ||
requests: | ||
cpu: 200m | ||
memory: 1Gi | ||
limits: | ||
cpu: 300m | ||
memory: 1500Mi | ||
priorityClassName: "" | ||
annotations: null | ||
affinity: null | ||
tolerations: null | ||
nodeSelector: null | ||
hostNetwork: false | ||
|
||
# ingress. | ||
ingress: | ||
ingressClassName: nginx | ||
proxyHostName: trino-gateway-proxy-test.cloudchef-labs.com | ||
restHostName: trino-gateway-rest-test.cloudchef-labs.com | ||
|
||
# cert-manager. | ||
certManager: | ||
clusterIssue: letsencrypt-prod | ||
|
||
# spring boot server | ||
server: | ||
port: 8099 | ||
# trino proxy | ||
trino: | ||
proxy: | ||
port: 18080 | ||
authentication: true | ||
tls: | ||
enabled: false | ||
keystorePath: /home/opc/keystore.jks | ||
keystorePass: changeit | ||
trustStorePath: /home/opc/.keystore | ||
trustStorePass: changeit | ||
# jdbc | ||
jdbc: | ||
url: jdbc:mysql://mysql-service.trino-gateway.svc:3306/trino_proxy?useSSL=false | ||
user: trino | ||
pass: Trino123! | ||
|
||
# hibernate | ||
hibernate: | ||
show_sql: false | ||
globally_quoted_identifiers: true |
Oops, something went wrong.