Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Fix/api issues#319

Merged
nxtcoder17 merged 2 commits into
mainfrom
fix/api-issues
May 9, 2024
Merged

Fix/api issues#319
nxtcoder17 merged 2 commits into
mainfrom
fix/api-issues

Conversation

@nxtcoder17
Copy link
Copy Markdown
Member

No description provided.

@nxtcoder17 nxtcoder17 requested a review from karthik1729 as a code owner May 9, 2024 11:08
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @nxtcoder17 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

return nil, errors.NewE(err)
}

if err := d.syncAccountLevelImagePullSecrets(ctx, nenv.Name, nenv.Spec.TargetNamespace); err != nil {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (code_refinement): Refactoring to a more generic secret sync function

Changing from 'syncAccountLevelImagePullSecrets' to 'syncImagePullSecretsToEnvironment' suggests a move towards a more generic and possibly reusable function. Ensure that this new method handles all specific cases previously covered.

Suggested change
if err := d.syncAccountLevelImagePullSecrets(ctx, nenv.Name, nenv.Spec.TargetNamespace); err != nil {
if err := d.syncImagePullSecretsToEnvironment(ctx, nenv.Name); err != nil {
return nil, errors.NewE(err)
}

Comment on lines 71 to 72

data[corev1.DockerConfigJsonKey] = []byte(base64.StdEncoding.EncodeToString(b))
// data[corev1.DockerConfigJsonKey] = []byte(base64.StdEncoding.EncodeToString(b))
data[corev1.DockerConfigJsonKey] = []byte(b)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Change in data encoding for Docker config JSON

The removal of base64 encoding for Docker config JSON data might affect how data is read and interpreted by Kubernetes. Ensure that this change is compatible with how Kubernetes expects and handles this data.

@nxtcoder17 nxtcoder17 merged commit bc4add1 into main May 9, 2024
@nxtcoder17 nxtcoder17 deleted the fix/api-issues branch May 9, 2024 11:36
abdheshnayak pushed a commit that referenced this pull request Nov 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant