Merge "Configure ssh from jump host to VMs"

This commit is contained in:
Zuul 2021-07-09 21:44:06 +00:00 committed by Gerrit Code Review
commit df389d6367
9 changed files with 69 additions and 4 deletions

View File

@ -1,5 +1,6 @@
resources:
# - ../../../../../function/dex-aio
# - ../../../../../function/dex-aio
- ssh-private-keys-secret.yaml
- sipcluster.yaml
- namespace.yaml
namespace: lma-infra

View File

@ -1,3 +1,4 @@
resources:
- networking.yaml
- versions.yaml
- versions.yaml
- secrets.yaml

View File

@ -0,0 +1,22 @@
# These rules inject env vars into the k8scontrol function.
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: lma-provide-infra-secrets-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: localhost/replacement-transformer
replacements:
- source:
objref:
kind: VariableCatalogue
name: generated-secrets
fieldref: "{.sshKeys.privateKey}"
target:
objref:
kind: Secret
namespace: lma-infra
name: ssh-private-keys
fieldrefs:
- "data.ssh-privatekey%REPLACEMENT_SSH_PRIVATEKEY%"

View File

@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: ssh-private-keys
type: kubernetes.io/ssh-auth
data:
ssh-privatekey: REPLACEMENT_SSH_PRIVATEKEY

View File

@ -1,5 +1,6 @@
resources:
# - ../../../../../function/dex-aio
# - ../../../../../function/dex-aio
- ssh-private-keys-secret.yaml
- sipcluster.yaml
- namespace.yaml
namespace: wordpress-infra

View File

@ -1,3 +1,4 @@
resources:
- networking.yaml
- versions.yaml
- versions.yaml
- secrets.yaml

View File

@ -0,0 +1,22 @@
# These rules inject env vars into the k8scontrol function.
apiVersion: airshipit.org/v1alpha1
kind: ReplacementTransformer
metadata:
name: wordpress-provide-infra-secrets-replacements
annotations:
config.kubernetes.io/function: |-
container:
image: localhost/replacement-transformer
replacements:
- source:
objref:
kind: VariableCatalogue
name: generated-secrets
fieldref: "{.sshKeys.privateKey}"
target:
objref:
kind: Secret
namespace: wordpress-infra
name: ssh-private-keys
fieldrefs:
- "data.ssh-privatekey%REPLACEMENT_SSH_PRIVATEKEY%"

View File

@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: ssh-private-keys
type: kubernetes.io/ssh-auth
data:
ssh-privatekey: REPLACEMENT_SSH_PRIVATEKEY

View File

@ -1,2 +1,3 @@
resources:
- ../../../../../sub-cluster/workers/replacements