Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flux oci support part 4 #5032

Merged
merged 8 commits into from
Jul 9, 2022

Conversation

gfichtenholt
Copy link
Contributor

@gfichtenholt gfichtenholt commented Jul 6, 2022

Incremental checkpoint. In this PR:

All tests (integration and unit) are passing

@gfichtenholt gfichtenholt self-assigned this Jul 6, 2022
@netlify
Copy link

netlify bot commented Jul 6, 2022

Deploy Preview for kubeapps-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ed82350
🔍 Latest deploy log https://app.netlify.com/sites/kubeapps-dev/deploys/62c8fdbd6957fb0009f54dad
😎 Deploy Preview https://deploy-preview-5032--kubeapps-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@gfichtenholt gfichtenholt linked an issue Jul 6, 2022 that may be closed by this pull request
Copy link
Contributor

@antgamdia antgamdia left a comment

Choose a reason for hiding this comment

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

Great! Thanks for the changes!

func NewLocalDockerConfigJsonSecret(ownerRepo types.NamespacedName) *apiv1.Secret {
return &apiv1.Secret{
ObjectMeta: metav1.ObjectMeta{
GenerateName: ownerRepo.Name + "-",
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we want to add some common labels like managed-by so that we can group/identify those resources more easily?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That sounds good to me. A separate PR though, we make it consistent accross all plugins. This PR is about OCI support. Let me know and I will file an issue

@@ -436,6 +439,14 @@ func (s *Server) validateUserManagedRepoSecret(
if secret.Data["keyFile"] == nil || secret.Data["certFile"] == nil {
return nil, status.Errorf(codes.Internal, "Specified secret [%s] missing fields 'keyFile' and/or 'certFile'", secretRef)
}
case corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_DOCKER_CONFIG_JSON:
Copy link
Contributor

Choose a reason for hiding this comment

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

Great, I'm updating my PR (#4954) to also support it. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for review

@@ -514,11 +526,12 @@ func (s *Server) setOwnerReferencesForRepoSecret(
func (s *Server) updateKubeappsManagedRepoSecret(
ctx context.Context,
repoName types.NamespacedName,
typ string,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a slight preference towards type instead of typ, but up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I wanted to do that. But VSCode is not letting me. I think 'type' may be a reserved keyword ?

volumes:
- name: "config"
configMap:
name: "registry-configmap"
Copy link
Contributor

Choose a reason for hiding this comment

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

Not really important, but we tend to end with a line break. To do it, I use to set files.insertFinalNewline": true in VScode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@@ -94,7 +94,7 @@ require (
k8s.io/kubernetes v1.22.10
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
oras.land/oras-go v1.2.0
oras.land/oras-go/v2 v2.0.0-20220621073716-14422086e418
oras.land/oras-go/v2 v2.0.0-alpha
Copy link
Contributor

Choose a reason for hiding this comment

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

They released v2.0.0-rc.1, perhaps you want to use it instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I am on it. Next PR

@gfichtenholt gfichtenholt merged commit 82a5469 into vmware-tanzu:main Jul 9, 2022
@gfichtenholt gfichtenholt deleted the flux-oci-support-4 branch July 9, 2022 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Support for OCI registries in Flux plugin
3 participants