feat/drain_k8s_node #232
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/drain_k8s_node"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Grosse PR a review attentivement :
On veut s'assurer a la review qu'on ne laisse rien trainer et essayer de penser en dehors de la boite un peu aux cas d'utilisation differents.
462544c725to3257cd9569lgtm
@@ -0,0 +115,4 @@/// Delete all resources in this bundle from the cluster./// Resources are deleted in reverse order to respect dependencies.pub async fn delete(&self, client: &K8sClient) -> Result<(), Error> {Deleting resources in sequential reverse order can deadlock the deletion process. A solution idea is to launch all deletion in parallel
@@ -0,0 +40,4 @@pub fn build_privileged_pod(config: PrivilegedPodConfig,k8s_distribution: &KubernetesDistribution,This is never used for building the privileged pod, I feel like this should be at least a match over the various distributions that are implemented. Right now it is silently only working for open-shift distros
@@ -0,0 +147,4 @@let namespace = config.namespace.clone();// 1. On OpenShift, create RBAC binding to privileged SCCif let KubernetesDistribution::OpenshiftFamily = k8s_distribution {Maybe the above comment doesn't matter right now since this will only work if the distribution is OpenshiftFamily. It feels to me like this should also be a match over the KubernetesDistributions
There is just nothing to do on other distros than openshift family to get a privileged pod. No need for additional permissions mapping/binding like in openshift because of SCC.
@@ -0,0 +48,4 @@#[derive(Clone)]pub struct K8sClient {client: Client,k8s_distribution: Arc<OnceCell<KubernetesDistribution>>,It feels like a problem to me to have KubernetesDistribution defined in K8sAnywhere when it is used in the crate. It seems like everything related to KubernetesDistribution should be extracted here.