Skip to content

Commit

Permalink
update trillian chart for iamUsername (sigstore#912)
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Callaway <[email protected]>
  • Loading branch information
bobcallaway authored and falcorocks committed Feb 14, 2025
1 parent dceb782 commit 3fa65dc
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 2 deletions.
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

0 comments on commit 3fa65dc

Please sign in to comment.