@@ -116,9 +116,8 @@ impl GitSyncResources {
116116 for ( i, git_sync) in git_syncs. iter ( ) . enumerate ( ) {
117117 let mut env_vars = vec ! [ ] ;
118118
119- if let Some ( Credentials :: BasicAuth {
120- basic_auth_secret_name,
121- } ) = & git_sync. credentials
119+ if let Some ( Credentials :: BasicAuthSecretName ( basic_auth_secret_name) ) =
120+ & git_sync. credentials
122121 {
123122 env_vars. push ( GitSyncResources :: env_var_from_secret (
124123 "GITSYNC_USERNAME" ,
@@ -131,7 +130,7 @@ impl GitSyncResources {
131130 "password" ,
132131 ) ) ;
133132 }
134- if let Some ( Credentials :: Ssh { .. } ) = git_sync. credentials {
133+ if let Some ( Credentials :: SshPrivateKeySecretName { .. } ) = git_sync. credentials {
135134 env_vars. push ( EnvVar {
136135 name : "GITSYNC_SSH_KEY_FILE" . to_owned ( ) ,
137136 value : Some ( format ! ( "{SSH_MOUNT_PATH_PREFIX}-{i}/key" ) . to_owned ( ) ) ,
@@ -166,7 +165,7 @@ impl GitSyncResources {
166165
167166 git_sync_container_volume_mounts. extend_from_slice ( extra_volume_mounts) ;
168167
169- if matches ! ( git_sync . credentials , Some ( Credentials :: Ssh { .. } ) ) {
168+ if let Some ( Credentials :: SshPrivateKeySecretName ( _ ) ) = git_sync . credentials {
170169 let ssh_mount_path = format ! ( "{SSH_MOUNT_PATH_PREFIX}-{i}" ) ;
171170 let ssh_volume_name = format ! ( "{SSH_VOLUME_NAME_PREFIX}-{i}" ) ;
172171
@@ -221,9 +220,8 @@ impl GitSyncResources {
221220 . push ( git_content_volume_mount) ;
222221 resources. git_content_folders . push ( git_content_folder) ;
223222
224- if let Some ( Credentials :: Ssh {
225- ssh_private_key_secret_name,
226- } ) = & git_sync. credentials
223+ if let Some ( Credentials :: SshPrivateKeySecretName ( ssh_private_key_secret_name) ) =
224+ & git_sync. credentials
227225 {
228226 let ssh_volume_name = format ! ( "{SSH_VOLUME_NAME_PREFIX}-{i}" ) ;
229227
0 commit comments