def create(self, namespace_value, conf): config.load_kube_config(config_file=self.kubeconfig) scale_function.set_global_namespace_value(namespace_value) if not (scale_function.check_namespace_exists()): scale_function.create_namespace() if not (scale_function.check_deployment_exists()): scale_function.create_deployment() if not (scale_function.check_cluster_role_exists( "ibm-spectrum-scale-csi-operator")): scale_function.create_cluster_role() if not (scale_function.check_service_account_exists( "ibm-spectrum-scale-csi-operator")): scale_function.create_service_account() if not (scale_function.check_cluster_role_binding_exists( "ibm-spectrum-scale-csi-operator")): scale_function.create_cluster_role_binding() if not (scale_function.check_crd_exists()): scale_function.create_crd()
def create(self): config.load_kube_config(config_file=self.kubeconfig) body = self.get_operator_body() if not (scale_function.check_namespace_exists()): scale_function.create_namespace() if not (scale_function.check_deployment_exists()): scale_function.create_deployment(body['Deployment']) if not (scale_function.check_cluster_role_exists( "ibm-spectrum-scale-csi-operator")): scale_function.create_cluster_role(body['ClusterRole']) if not (scale_function.check_service_account_exists( "ibm-spectrum-scale-csi-operator")): scale_function.create_service_account(body['ServiceAccount']) if not (scale_function.check_cluster_role_binding_exists( "ibm-spectrum-scale-csi-operator")): scale_function.create_cluster_role_binding( body['ClusterRoleBinding']) if not (scale_function.check_crd_exists()): scale_function.create_crd(body['CustomResourceDefinition'])