-
Notifications
You must be signed in to change notification settings - Fork 705
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
Use correct secret in kubeapps namespace when syncing an app repo #1525
Conversation
…m another namespace.
} | ||
} | ||
|
||
// jobSpec returns a batchv1.JobSpec for running the chart-repo sync job | ||
func syncJobSpec(apprepo *apprepov1alpha1.AppRepository) batchv1.JobSpec { | ||
func syncJobSpec(apprepo *apprepov1alpha1.AppRepository, kubeappsNamespace string) batchv1.JobSpec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here (line 457) you also need to change the secretKeyRef?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks.
if apprepo.ObjectMeta.Namespace != kubeappsNamespace { | ||
secretKeyRef.LocalObjectReference.Name = kube.KubeappsSecretNameForRepo(apprepo.ObjectMeta.Name, apprepo.ObjectMeta.Namespace) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would be simpler to just create a copy of the apprepo in the kubeapps namespace. That would help with the garbage collection and wouldn't require to change these secret references on the fly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would, if we weren't transitioning towards an end goal of syncing across all namespaces and running the jobs in those namespaces. This way we can begin syncing AppRepos across namespaces, we are just still running the sync jobs in the kubeapps namespace until we can update the assetsvc to receive data from the syncer.
Thanks!
Updates the cronjob spec so that, when an app repository is from a namespace other than kubeapps, the correct secret ref is used for the repo.
Ref: #1521 .