Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Charts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏国强
Charts
Commits
31530457
Commit
31530457
authored
Feb 06, 2021
by
Waqar Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add configured certificate to minio secret
parent
eaad608b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
test/minio/1.2.0/templates/_helpers.tpl
test/minio/1.2.0/templates/_helpers.tpl
+30
-0
test/minio/1.2.0/templates/secrets.yaml
test/minio/1.2.0/templates/secrets.yaml
+4
-0
No files found.
test/minio/1.2.0/templates/_helpers.tpl
View file @
31530457
...
...
@@ -4,3 +4,33 @@ Determine secret name.
{{- define "minio.secretName" -}}
{{- include "common.names.fullname" . -}}
{{- end -}}
{
{
/*
Retrieve
true
/
false
if
minio
certificate
is
configured
*/
}
}
{{- define "minio.certAvailable" -}}
{{- $values := (. | mustDeepCopy) -}}
{{- $_ := set $values "commonCertOptions" (dict "certKeyName" $values.certificate) -}}
{{- template "common.resources.cert_present" $values -}}
{{- end -}}
{
{
/*
Retrieve
public
key
of
minio
certificate
*/
}
}
{{- define "minio.cert.publicKey" -}}
{{- $values := (. | mustDeepCopy) -}}
{{- $_ := set $values "commonCertOptions" (dict "certKeyName" $values.certificate "publicKey" true) -}}
{{ include "common.resources.cert" $values }}
{{- end -}}
{
{
/*
Retrieve
private
key
of
minio
certificate
*/
}
}
{{- define "minio.cert.privateKey" -}}
{{- $values := (. | mustDeepCopy) -}}
{{- $_ := set $values "commonCertOptions" (dict "certKeyName" $values.certificate) -}}
{{ include "common.resources.cert" $values }}
{{- end -}}
test/minio/1.2.0/templates/secrets.yaml
View file @
31530457
...
...
@@ -7,3 +7,7 @@ type: Opaque
data
:
accesskey
:
{{
if .Values.accessKey
}}{{
.Values.accessKey | toString | b64enc | quote
}}{{
else
}}{{
randAlphaNum 20 | b64enc | quote
}}{{
end
}}
secretkey
:
{{
if .Values.secretKey
}}{{
.Values.secretKey | toString | b64enc | quote
}}{{
else
}}{{
randAlphaNum 40 | b64enc | quote
}}{{
end
}}
{{
- if eq (include "minio.certAvailable" .) true -
}}
certPublicKey
:
{{
template "minio.cert.publicKey" .
}}
certPrivateKey
:
{{
template "minio.cert.privateKey" .
}}
{{
- end -
}}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment