Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update trillian chart for iamUsername #912

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/trillian/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: |

type: application

version: 0.3.0
version: 0.3.1
appVersion: 1.7.0

keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/trillian/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- This README.md is generated. Please edit README.md.gotmpl -->

![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.7.0](https://img.shields.io/badge/AppVersion-1.7.0-informational?style=flat-square)
![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.7.0](https://img.shields.io/badge/AppVersion-1.7.0-informational?style=flat-square)

Trillian is a log that stores an accurate, immutable and verifiable history of activity.

Expand Down
8 changes: 8 additions & 0 deletions charts/trillian/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ Log Server Arguments
- {{ printf "--quota_system=%s" (include "trillian.quotaSystem" .) | quote }}
{{- if eq (include "trillian.storageSystem" .) "mysql" }}
{{- if and (.Values.mysql.gcp.enabled) (.Values.mysql.gcp.cloudsql.unixDomainSocket.enabled) }}
{{- if .Values.mysql.gcp.cloudsql.iamUsername }}
- {{ printf "--mysql_uri=%s@unix(%s/%s)/$(MYSQL_DATABASE)?parseTime=true" .Values.mysql.gcp.cloudsql.iamUsername .Values.mysql.gcp.cloudsql.unixDomainSocket.path .Values.mysql.gcp.instance | quote }}
{{- else }}
- {{ printf "--mysql_uri=$(MYSQL_USER):$(MYSQL_PASSWORD)@unix(%s/%s)/$(MYSQL_DATABASE)?parseTime=true" .Values.mysql.gcp.cloudsql.unixDomainSocket.path .Values.mysql.gcp.instance | quote }}
{{- end }}
{{- else }}
- "--mysql_uri=$(MYSQL_USER):$(MYSQL_PASSWORD)@tcp($(MYSQL_HOSTNAME):$(MYSQL_PORT))/$(MYSQL_DATABASE)"
{{- end }}
Expand All @@ -212,7 +216,11 @@ Log Signer Arguments
- {{ printf "--quota_system=%s" (include "trillian.quotaSystem" .) | quote }}
{{- if eq (include "trillian.storageSystem" .) "mysql" }}
{{- if and (.Values.mysql.gcp.enabled) (.Values.mysql.gcp.cloudsql.unixDomainSocket.enabled) }}
{{- if .Values.mysql.gcp.cloudsql.iamUsername }}
- {{ printf "--mysql_uri=%s@unix(%s/%s)/$(MYSQL_DATABASE)?parseTime=true" .Values.mysql.gcp.cloudsql.iamUsername .Values.mysql.gcp.cloudsql.unixDomainSocket.path .Values.mysql.gcp.instance | quote }}
{{- else }}
- {{ printf "--mysql_uri=$(MYSQL_USER):$(MYSQL_PASSWORD)@unix(%s/%s)/$(MYSQL_DATABASE)?parseTime=true" .Values.mysql.gcp.cloudsql.unixDomainSocket.path .Values.mysql.gcp.instance | quote }}
{{- end }}
{{- else }}
- "--mysql_uri=$(MYSQL_USER):$(MYSQL_PASSWORD)@tcp($(MYSQL_HOSTNAME):$(MYSQL_PORT))/$(MYSQL_DATABASE)"
{{- end }}
Expand Down
7 changes: 7 additions & 0 deletions charts/trillian/templates/createdb/createdb-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ spec:
- name: cloud-sql-proxy
image: "{{ template "trillian.image" .Values.mysql.gcp.scaffoldSQLProxy }}"
args: [
{{- if .Values.mysql.gcp.scaffoldSQLProxy.iamUsername }}
"--auto-iam-authn",
{{- end }}
{{- range .Values.mysql.gcp.scaffoldSQLProxy.extraArgs | default list }}
{{ . | quote }},
{{- end }}
Expand Down Expand Up @@ -77,7 +80,11 @@ spec:
value: "/var/exitdir"
args: [
"--db_name=$(MYSQL_DATABASE)",
{{- if .Values.mysql.gcp.scaffoldSQLProxy.iamUsername }}
{{ printf "--mysql_uri=%s@tcp($(MYSQL_HOSTNAME):$(MYSQL_PORT))/" .Values.mysql.gcp.scaffoldSQLProxy.iamUsername | quote }}
{{- else }}
"--mysql_uri=$(MYSQL_USER):$(MYSQL_PASSWORD)@tcp($(MYSQL_HOSTNAME):$(MYSQL_PORT))/"
{{- end }}
]
volumeMounts:
- name: exit-dir
Expand Down
3 changes: 3 additions & 0 deletions charts/trillian/templates/trillian-log-server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ spec:
image: "{{ template "trillian.image" .Values.mysql.gcp.cloudsql }}"
command:
- "/cloud-sql-proxy"
{{- if (((.Values.mysql).gcp).cloudsql).iamUsername }}
- "--auto-iam-authn"
{{- end }}
{{- if .Values.mysql.gcp.cloudsql.unixDomainSocket.enabled }}
- "--unix-socket"
- {{ .Values.mysql.gcp.cloudsql.unixDomainSocket.path | quote }}
Expand Down
3 changes: 3 additions & 0 deletions charts/trillian/templates/trillian-log-signer/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ spec:
image: "{{ template "trillian.image" .Values.mysql.gcp.cloudsql }}"
command:
- "/cloud-sql-proxy"
{{- if (((.Values.mysql).gcp).cloudsql).iamUsername }}
- "--auto-iam-authn"
{{- end }}
{{- if .Values.mysql.gcp.cloudsql.unixDomainSocket.enabled }}
- "--unix-socket"
- {{ .Values.mysql.gcp.cloudsql.unixDomainSocket.path | quote }}
Expand Down