Compare commits
3 Commits
964f7e9c5d
...
0.5.0
Author | SHA1 | Date | |
---|---|---|---|
e602d9f045
|
|||
1bbfd49265
|
|||
93c81fddb9
|
@@ -6,16 +6,17 @@ name: default
|
|||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
- tag
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: release
|
- name: release
|
||||||
image: cr.grachevko.ru/drone/helm:RELEASE.2023-03-01T13-46-55Z
|
image: cr.grachevko.ru/drone/helm:24
|
||||||
settings:
|
settings:
|
||||||
|
tag: ${DRONE_TAG}
|
||||||
username:
|
username:
|
||||||
from_secret: HELM_REPO_USERNAME
|
from_secret: HELM_REPO_USERNAME
|
||||||
password:
|
password:
|
||||||
from_secret: HELM_REPO_PASSWORD
|
from_secret: HELM_REPO_PASSWORD
|
||||||
when:
|
when:
|
||||||
branch:
|
event:
|
||||||
- master
|
- tag
|
||||||
- rc
|
|
||||||
|
2
.github/workflows/main.yaml
vendored
2
.github/workflows/main.yaml
vendored
@@ -1,6 +1,6 @@
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on: [ push ]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
@@ -10,6 +10,6 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: wget
|
- name: wget
|
||||||
image: busybox
|
image: busybox
|
||||||
command: [ 'wget' ]
|
command: ['wget']
|
||||||
args: [ '{{ include "common.fullname" . }}:{{ .Values.service.port }}' ]
|
args: ['{{ include "common.fullname" . }}:{{ .Values.service.port }}']
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
|
@@ -115,6 +115,8 @@ The order in which this function returns a secret password:
|
|||||||
{{- $password = randAscii $passwordLength }}
|
{{- $password = randAscii $passwordLength }}
|
||||||
{{- $password = regexReplaceAllLiteral "\\W" $password "@" | substr 5 $passwordLength }}
|
{{- $password = regexReplaceAllLiteral "\\W" $password "@" | substr 5 $passwordLength }}
|
||||||
{{- $password = printf "%s%s" $subStr $password | toString | shuffle | b64enc | quote }}
|
{{- $password = printf "%s%s" $subStr $password | toString | shuffle | b64enc | quote }}
|
||||||
|
{{- else if .hex }}
|
||||||
|
{{- $password = include "common.secrets.randHex" $passwordLength | b64enc | quote }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- $password = randAlphaNum $passwordLength | b64enc | quote }}
|
{{- $password = randAlphaNum $passwordLength | b64enc | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -122,6 +124,23 @@ The order in which this function returns a secret password:
|
|||||||
{{- printf "%s" $password -}}
|
{{- printf "%s" $password -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- /*
|
||||||
|
Returns given number of random Hex characters.
|
||||||
|
- randNumeric 4 | atoi generates a random number in [0, 10^4)
|
||||||
|
This is a range evenly divisble by 16, but even if off by one,
|
||||||
|
that last partial interval offsetting randomness is only 1 part in 625.
|
||||||
|
- mod N 16 maps to the range 0-15
|
||||||
|
- printf "%x" represents a single number 0-15 as a single hex character
|
||||||
|
*/}}
|
||||||
|
{{- define "common.secrets.randHex" -}}
|
||||||
|
{{- $result := "" }}
|
||||||
|
{{- range $i := until . }}
|
||||||
|
{{- $rand_hex_char := mod (randNumeric 4 | atoi) 16 | printf "%x" }}
|
||||||
|
{{- $result = print $result $rand_hex_char }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $result }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Reuses the value from an existing secret, otherwise sets its value to a default value.
|
Reuses the value from an existing secret, otherwise sets its value to a default value.
|
||||||
|
|
||||||
|
0
values.yaml
Normal file
0
values.yaml
Normal file
Reference in New Issue
Block a user