/** * Constructor * * @param namespace Kubernetes/OpenShift namespace where cluster resources are going to be created * @param cluster overall cluster name */ protected AbstractModel(String namespace, String cluster, Labels labels) { this.cluster = cluster; this.namespace = namespace; this.labels = labels.withCluster(cluster); }
Future<ReconciliationState> clusterOperatorSecret() { Labels labels = Labels.userLabels(kafkaAssembly.getMetadata().getLabels()).withKind(reconciliation.type().toString()).withCluster(reconciliation.name()); OwnerReference ownerRef = new OwnerReferenceBuilder() .withApiVersion(kafkaAssembly.getApiVersion()) .withKind(kafkaAssembly.getKind()) .withName(kafkaAssembly.getMetadata().getName()) .withUid(kafkaAssembly.getMetadata().getUid()) .withBlockOwnerDeletion(false) .withController(false) .build(); Secret secret = ModelUtils.buildSecret(clusterCa, clusterCa.clusterOperatorSecret(), namespace, ClusterOperator.secretName(name), "cluster-operator", "cluster-operator", labels, ownerRef); return withVoid(secretOperations.reconcile(namespace, ClusterOperator.secretName(name), secret)); }
Labels selectorLabels = Labels.EMPTY.withKind(reconciliation.type().toString()).withCluster(reconciliation.name()); Labels caLabels = Labels.userLabels(kafkaAssembly.getMetadata().getLabels()).withKind(reconciliation.type().toString()).withCluster(reconciliation.name()); Future<ReconciliationState> result = Future.future(); vertx.createSharedWorkerExecutor("kubernetes-ops-pool").<ReconciliationState>executeBlocking(