Skip to content

Commit

Permalink
Add type to upload secret (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorhun authored Aug 3, 2023
1 parent ebbf23f commit e234c49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions controllers/component_image_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ func (r *ComponentReconciler) createRemoteSecretUploadSecret(ctx context.Context
remotesecretv1beta1.RemoteSecretNameAnnotation: remoteSecretName,
},
},
Type: corev1.SecretTypeDockerConfigJson,
StringData: generateDockerconfigSecretData(imageURL, robotAccount),
}
if err := r.Client.Create(ctx, uploadSecret); err != nil {
Expand Down
1 change: 1 addition & 0 deletions controllers/component_image_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ var _ = Describe("Component image controller", func() {

Expect(uploadSecret.Labels[remotesecretv1beta1.UploadSecretLabel]).To(Equal("remotesecret"))
Expect(uploadSecret.Annotations[remotesecretv1beta1.RemoteSecretNameAnnotation]).To(Equal(remoteSecretKey.Name))
Expect(uploadSecret.Type).To(Equal(corev1.SecretTypeDockerConfigJson))

uploadSecretDockerconfigJson := string(uploadSecret.Data[corev1.DockerConfigJsonKey])
var authDataJson interface{}
Expand Down

0 comments on commit e234c49

Please sign in to comment.