-
Notifications
You must be signed in to change notification settings - Fork 103
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
Replicaset integration in virtual kubelet provider #383
Conversation
e265936
to
dca9743
Compare
87c4ae2
to
4404f0c
Compare
08166d6
to
7553864
Compare
e9a1b24
to
918e561
Compare
/rebase |
Rebase status: success! |
918e561
to
1577688
Compare
985ad02
to
c28c6f6
Compare
7e29f05
to
c5ae836
Compare
c5ae836
to
0fea2f3
Compare
volumesOut = append(volumesOut, v) | ||
} | ||
// copy all volumes of type Secret except for the default token | ||
if v.Secret != nil && !strings.Contains(v.Secret.SecretName, "default-token") { |
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.
Why are we not appending the default token secret? I read that was the same also before these change, but I don' remember why
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 guess this is the heritage from our missing support to service account secrets. I will remove that condition in a new PR and I will check the correctness of the mechanism, if you agree
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, fine for me
pkg/virtualKubelet/provider/pods.go
Outdated
podTranslated, err = serviceEnv.TranslateServiceEnvVariables(podTranslated, pod.Namespace, nattedNS, apiController.CacheManager()) | ||
_, err = p.foreignClient.AppsV1().ReplicaSets(foreignReplicaset.Namespace).Create(context.TODO(), foreignReplicaset, metav1.CreateOptions{}) |
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.
Probably we are missing service environment translations
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.
Nice catch, we were going to miss them. I introduced them again. Anyway, I have some doubts about that function: what happens if, let's say one over ten services hasn't been replicated yet? The translated pod will have all the service environment variables but one?
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, good point, but I think that is the same for local deployment. If the pod comes before that a service is available it can't have it in env var but has to discover it with DNS
I think that in both the cases you have to be sure that the service was available a lot of time before the creation of the pod
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, I suppose there is the same issue even in local deployments.
9f2d737
to
ab6ffc7
Compare
4373d2b
to
49830b8
Compare
/rebase |
This commit replaces the foreign CRUD operations on pods with operations on replicasets. In addition, some tests have been created, and the forge pkg for the object manipulation has been introduced.
49830b8
to
712d094
Compare
Description
This PR heavily changes the Liqo provider of the virtual kubelet intending to implement the management of foreign
replicasets
instead ofpods
. The CRUD operations until now "pod-oriented" have to be migrated toward an approach "replica-set" oriented, by mapping the operations as follows:CreatePod
has to create a new remotereplicaset
UpdatePod
has to update a remotereplicaset
DeletePod
has to delete a remotereplicaset
The
replicasets
have one replica each that aims at mapping home pods one by one with foreign pods. The mapping of each home pod with a foreignpod
is implemented by a label in the replicaset specpodTemplateSpec
field.Address #380