[WIP] AWS S3 backup

- mount backup credentials secret into Jenkins pod
This commit is contained in:
Tomasz Sęk 2019-01-16 22:33:00 +01:00
parent e609611c4d
commit cb2dfdd28a
No known key found for this signature in database
GPG Key ID: DC356D23F6A644D0
1 changed files with 16 additions and 0 deletions

View File

@ -33,6 +33,9 @@ const (
// this scripts are provided by user // this scripts are provided by user
JenkinsUserConfigurationVolumePath = "/var/jenkins/user-configuration" JenkinsUserConfigurationVolumePath = "/var/jenkins/user-configuration"
jenkinsBackupCredentialsVolumeName = "backup-credentials"
jenkinsBackupCredentialsVolumePath = "/var/jenkins/backup-credentials"
httpPortName = "http" httpPortName = "http"
slavePortName = "slavelistener" slavePortName = "slavelistener"
// HTTPPortInt defines Jenkins master HTTP port // HTTPPortInt defines Jenkins master HTTP port
@ -152,6 +155,11 @@ func NewJenkinsMasterPod(objectMeta metav1.ObjectMeta, jenkins *virtuslabv1alpha
MountPath: jenkinsOperatorCredentialsVolumePath, MountPath: jenkinsOperatorCredentialsVolumePath,
ReadOnly: true, ReadOnly: true,
}, },
{
Name: jenkinsBackupCredentialsVolumeName,
MountPath: jenkinsBackupCredentialsVolumePath,
ReadOnly: true,
},
}, },
}, },
}, },
@ -210,6 +218,14 @@ func NewJenkinsMasterPod(objectMeta metav1.ObjectMeta, jenkins *virtuslabv1alpha
}, },
}, },
}, },
{
Name: jenkinsBackupCredentialsVolumeName,
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: GetBackupCredentialsSecretName(jenkins),
},
},
},
}, },
}, },
} }