-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added repo & user password support (#1070)
Signed-off-by: Steve Hipwell <[email protected]>
- Loading branch information
1 parent
59aeb69
commit aa4d459
Showing
10 changed files
with
235 additions
and
119 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,26 +33,6 @@ config: | |
- NpmToken | ||
- NuGetApiKey | ||
- rutauth-realm | ||
roles: | ||
- id: nexus-administrators | ||
source: default | ||
name: nexus-administrators | ||
description: LDAP Administrator Role | ||
privileges: [] | ||
roles: | ||
- nx-admin | ||
users: | ||
- userId: test | ||
firstName: Test | ||
lastName: User | ||
emailAddress: [email protected] | ||
source: default | ||
status: active | ||
roles: | ||
- nx-anonymous | ||
externalRoles: [] | ||
ldap: | ||
enabled: false | ||
blobStores: [] | ||
cleanup: | ||
- name: ExampleCleanup | ||
|
@@ -78,6 +58,40 @@ config: | |
cleanup: | ||
policyNames: | ||
- ExampleCleanup | ||
roles: | ||
- id: nexus-administrators | ||
source: default | ||
name: nexus-administrators | ||
description: LDAP Administrator Role | ||
privileges: [] | ||
roles: | ||
- nx-admin | ||
users: | ||
- userId: test | ||
firstName: Test | ||
lastName: User | ||
emailAddress: [email protected] | ||
source: default | ||
status: active | ||
roles: | ||
- nx-anonymous | ||
externalRoles: [] | ||
password: | ||
secret: test-user | ||
key: passwordx | ||
- userId: test2 | ||
firstName: Test2 | ||
lastName: User | ||
emailAddress: [email protected] | ||
source: default | ||
status: active | ||
roles: | ||
- nx-anonymous | ||
externalRoles: [] | ||
password: | ||
secret: test-user2 | ||
ldap: | ||
enabled: false | ||
tasks: | ||
- name: "Cleanup service" | ||
typeId: repository.cleanup | ||
|
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 |
---|---|---|
|
@@ -127,26 +127,6 @@ config: | |
- NpmToken | ||
- NuGetApiKey | ||
- rutauth-realm | ||
roles: | ||
- id: nexus-administrators | ||
source: default | ||
name: nexus-administrators | ||
description: LDAP Administrator Role | ||
privileges: [] | ||
roles: | ||
- nx-admin | ||
users: | ||
- userId: test | ||
firstName: Test | ||
lastName: User | ||
emailAddress: [email protected] | ||
source: default | ||
status: active | ||
roles: | ||
- nx-anonymous | ||
externalRoles: [] | ||
ldap: | ||
enabled: false | ||
blobStores: | ||
- name: ExampleFileBlobStore | ||
type: file | ||
|
@@ -179,6 +159,43 @@ config: | |
cleanup: | ||
policyNames: | ||
- ExampleCleanup | ||
password: | ||
secret: test-repo | ||
key: passwordx | ||
roles: | ||
- id: nexus-administrators | ||
source: default | ||
name: nexus-administrators | ||
description: LDAP Administrator Role | ||
privileges: [] | ||
roles: | ||
- nx-admin | ||
users: | ||
- userId: test | ||
firstName: Test | ||
lastName: User | ||
emailAddress: [email protected] | ||
source: default | ||
status: active | ||
roles: | ||
- nx-anonymous | ||
externalRoles: [] | ||
password: | ||
secret: test-user | ||
key: passwordx | ||
- userId: test2 | ||
firstName: Test2 | ||
lastName: User | ||
emailAddress: [email protected] | ||
source: default | ||
status: active | ||
roles: | ||
- nx-anonymous | ||
externalRoles: [] | ||
password: | ||
secret: test-user2 | ||
ldap: | ||
enabled: false | ||
tasks: | ||
- name: "Cleanup service" | ||
typeId: repository.cleanup | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{- if .Values.testResources -}} | ||
{{- range concat .Values.config.repos .Values.config.users }} | ||
{{- if dig "password" "secret" nil . }} | ||
{{- $secretName := .password.secret -}} | ||
{{- $key := default "password" .password.key }} | ||
{{- $secret := lookup "v1" "Secret" $.Release.Namespace $secretName -}} | ||
{{- $password := (randAlpha 16) | b64enc }} | ||
{{- if $secret }} | ||
{{- $password = index $secret.data $key -}} | ||
{{- end }} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ $secretName }} | ||
namespace: {{ $.Release.Namespace }} | ||
labels: | ||
{{- include "nexus3.labels" $ | nindent 4 }} | ||
test-resource: "true" | ||
annotations: | ||
"helm.sh/hook": "pre-install" | ||
type: Opaque | ||
data: | ||
{{ $key }}: {{ $password | quote }} | ||
--- | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
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
Oops, something went wrong.