Search in sources :

Example 1 with AdmissionOperation

use of com.enonic.kubernetes.operator.api.AdmissionOperation in project xp-operator by enonic.

the class MutationApi method xp7app.

private void xp7app(MutationRequest mt) {
    // Collect old and new object
    Xp7App oldR = (Xp7App) mt.getAdmissionReview().getRequest().getOldObject();
    Xp7App newR = (Xp7App) mt.getAdmissionReview().getRequest().getObject();
    // Create default status
    Xp7AppStatus defStatus = new Xp7AppStatus().withMessage("Created").withState(Xp7AppStatus.State.PENDING).withXp7AppStatusFields(new Xp7AppStatusFields());
    // Get OP
    AdmissionOperation op = getOperation(mt.getAdmissionReview());
    // Ensure status
    switch(op) {
        case // Always set the default status on new objects
        CREATE:
            patch(mt, true, "/status", newR.getStatus(), defStatus);
            break;
        case UPDATE:
            if (newR.getSpec() != null && !newR.getSpec().getUrl().equals(oldR.getSpec().getUrl())) {
                // On url change, set default status
                patch(mt, true, "/status", newR.getStatus(), defStatus);
            } else {
                // Else make sure the old status is not removed
                patch(mt, false, "/status", newR.getStatus(), oldR.getStatus());
            }
            break;
        case DELETE:
            // Set pending deletion status
            oldR.getStatus().setState(Xp7AppStatus.State.PENDING);
            oldR.getStatus().setMessage("Pending deletion");
            patch(mt, true, "/status", newR.getStatus(), oldR.getStatus());
            break;
    }
    // Ensure enabled
    patch(mt, false, "/spec/enabled", newR.getSpec().getEnabled(), true);
    if (op == AdmissionOperation.CREATE) {
        // Ensure finalizers
        List<String> oldFinalizers = ((HasMetadata) mt.getAdmissionReview().getRequest().getObject()).getMetadata().getFinalizers();
        Set<String> newFinalizers = oldFinalizers != null ? new HashSet<>(oldFinalizers) : new HashSet<>();
        String uninstallFinalizer = cfgStr("operator.charts.values.finalizers.app.uninstall");
        if (!newFinalizers.contains(uninstallFinalizer)) {
            newFinalizers.add(uninstallFinalizer);
            patch(mt, true, "/metadata/finalizers", null, newFinalizers);
        }
        // Ensure owner reference
        ensureOwnerReference(mt);
    }
}
Also used : AdmissionOperation(com.enonic.kubernetes.operator.api.AdmissionOperation) Xp7AppStatus(com.enonic.kubernetes.client.v1.xp7app.Xp7AppStatus) Xp7AppStatusFields(com.enonic.kubernetes.client.v1.xp7app.Xp7AppStatusFields) Xp7App(com.enonic.kubernetes.client.v1.xp7app.Xp7App)

Example 2 with AdmissionOperation

use of com.enonic.kubernetes.operator.api.AdmissionOperation in project xp-operator by enonic.

the class MutationApi method xp7config.

private void xp7config(MutationRequest mt) {
    // Collect old and new object
    Xp7Config oldR = (Xp7Config) mt.getAdmissionReview().getRequest().getOldObject();
    Xp7Config newR = (Xp7Config) mt.getAdmissionReview().getRequest().getObject();
    // Create default status
    Xp7ConfigStatus defStatus = new Xp7ConfigStatus().withMessage("Not loaded").withState(Xp7ConfigStatus.State.PENDING);
    // Get OP
    AdmissionOperation op = getOperation(mt.getAdmissionReview());
    // Ensure status
    switch(op) {
        case // Always set the default status on new objects
        CREATE:
            patch(mt, true, "/status", newR.getStatus(), defStatus);
            break;
        case UPDATE:
            if (newR.getSpec() != null && !newR.getSpec().equals(oldR.getSpec())) {
                // On any change change, set default status
                patch(mt, true, "/status", newR.getStatus(), defStatus);
            } else {
                // Else make sure the old status is not removed
                patch(mt, false, "/status", newR.getStatus(), oldR.getStatus());
            }
            break;
        case DELETE:
            // Do nothing
            break;
    }
    // Ensure defaults
    if (newR.getSpec() != null) {
        patch(mt, false, "/spec/dataBase64", newR.getSpec().getDataBase64(), false);
        patch(mt, false, "/spec/nodeGroup", newR.getSpec().getNodeGroup(), cfgStr("operator.charts.values.allNodesKey"));
    }
    if (op == AdmissionOperation.CREATE) {
        // Ensure owner reference
        ensureOwnerReference(mt);
    }
}
Also used : AdmissionOperation(com.enonic.kubernetes.operator.api.AdmissionOperation) Xp7Config(com.enonic.kubernetes.client.v1.xp7config.Xp7Config) Xp7ConfigStatus(com.enonic.kubernetes.client.v1.xp7config.Xp7ConfigStatus)

Example 3 with AdmissionOperation

use of com.enonic.kubernetes.operator.api.AdmissionOperation in project xp-operator by enonic.

the class MutationApi method xp7deployment.

private void xp7deployment(MutationRequest mt) {
    // Collect old and new object
    Xp7Deployment oldR = (Xp7Deployment) mt.getAdmissionReview().getRequest().getOldObject();
    Xp7Deployment newR = (Xp7Deployment) mt.getAdmissionReview().getRequest().getObject();
    // Create default status
    Xp7DeploymentStatus defStatus = new Xp7DeploymentStatus().withMessage("Waiting for pods").withState(Xp7DeploymentStatus.State.PENDING).withXp7DeploymentStatusFields(new Xp7DeploymentStatusFields().withXp7DeploymentStatusFieldsPods(new LinkedList<>()));
    if (newR.getSpec() != null && newR.getSpec().getEnabled() != null && !newR.getSpec().getEnabled()) {
        defStatus.setState(Xp7DeploymentStatus.State.STOPPED);
        defStatus.setMessage("XP deployment stopped");
    }
    // Get OP
    AdmissionOperation op = getOperation(mt.getAdmissionReview());
    // Ensure status
    switch(op) {
        case // Always set the default status on new objects
        CREATE:
            patch(mt, true, "/status", newR.getStatus(), defStatus);
            break;
        case UPDATE:
            if (newR.getSpec() != null && !newR.getSpec().equals(oldR.getSpec())) {
                // On any change change, set default status
                patch(mt, true, "/status", newR.getStatus(), defStatus);
            } else {
                // Else make sure the old status is not removed
                patch(mt, false, "/status", newR.getStatus(), oldR.getStatus());
            }
            break;
        case DELETE:
            // Do nothing
            break;
    }
    List<Xp7DeploymentSpecNodesPreinstalledApps> preInstall = newR.getSpec().getNodesPreinstalledApps();
    if (preInstall == null || preInstall.isEmpty()) {
        patch(mt, true, "/spec/nodesPreinstalledApps", newR.getSpec().getNodesPreinstalledApps(), preInstalledApps);
    } else {
        List<String> names = preInstall.stream().map(Xp7DeploymentSpecNodesPreinstalledApps::getName).collect(Collectors.toList());
        List<Xp7DeploymentSpecNodesPreinstalledApps> newList = new LinkedList<>(preInstall);
        preInstalledApps.stream().filter(a -> !names.contains(a.getName())).forEach(newList::add);
        patch(mt, true, "/spec/nodesPreinstalledApps", newR.getSpec().getNodesPreinstalledApps(), newList);
    }
}
Also used : AdmissionOperation(com.enonic.kubernetes.operator.api.AdmissionOperation) LbServiceIpProducer(com.enonic.kubernetes.operator.domain.LbServiceIpProducer) java.util(java.util) Xp7App(com.enonic.kubernetes.client.v1.xp7app.Xp7App) Produces(javax.ws.rs.Produces) Xp7Config(com.enonic.kubernetes.client.v1.xp7config.Xp7Config) Path(javax.ws.rs.Path) DomainStatus(com.enonic.kubernetes.client.v1.domain.DomainStatus) BaseAdmissionApi(com.enonic.kubernetes.operator.api.BaseAdmissionApi) Inject(javax.inject.Inject) DomainStatusFields(com.enonic.kubernetes.client.v1.domain.DomainStatusFields) Xp7Deployment(com.enonic.kubernetes.client.v1.xp7deployment.Xp7Deployment) Consumes(javax.ws.rs.Consumes) Xp7ConfigStatus(com.enonic.kubernetes.client.v1.xp7config.Xp7ConfigStatus) Xp7DeploymentStatusFields(com.enonic.kubernetes.client.v1.xp7deployment.Xp7DeploymentStatusFields) Utils.createOwnerReference(com.enonic.kubernetes.common.Utils.createOwnerReference) Configuration.cfgStr(com.enonic.kubernetes.common.Configuration.cfgStr) Domain(com.enonic.kubernetes.client.v1.domain.Domain) Predicates.matchAnnotationPrefix(com.enonic.kubernetes.kubernetes.Predicates.matchAnnotationPrefix) Xp7AppStatus(com.enonic.kubernetes.client.v1.xp7app.Xp7AppStatus) POST(javax.ws.rs.POST) BaseEncoding(com.google.common.io.BaseEncoding) Xp7AppStatusFields(com.enonic.kubernetes.client.v1.xp7app.Xp7AppStatusFields) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) AdmissionResponseBuilder(io.fabric8.kubernetes.api.model.admission.v1.AdmissionResponseBuilder) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) Collectors(java.util.stream.Collectors) Xp7DeploymentSpecNodesPreinstalledApps(com.enonic.kubernetes.client.v1.xp7deployment.Xp7DeploymentSpecNodesPreinstalledApps) AdmissionReview(io.fabric8.kubernetes.api.model.admission.v1.AdmissionReview) Configuration.cfgBool(com.enonic.kubernetes.common.Configuration.cfgBool) Ingress(io.fabric8.kubernetes.api.model.networking.v1.Ingress) Configuration.cfgStrChild(com.enonic.kubernetes.common.Configuration.cfgStrChild) Xp7DeploymentStatus(com.enonic.kubernetes.client.v1.xp7deployment.Xp7DeploymentStatus) ApplicationScoped(javax.enterprise.context.ApplicationScoped) AdmissionOperation(com.enonic.kubernetes.operator.api.AdmissionOperation) Xp7Deployment(com.enonic.kubernetes.client.v1.xp7deployment.Xp7Deployment) Xp7DeploymentSpecNodesPreinstalledApps(com.enonic.kubernetes.client.v1.xp7deployment.Xp7DeploymentSpecNodesPreinstalledApps) Xp7DeploymentStatus(com.enonic.kubernetes.client.v1.xp7deployment.Xp7DeploymentStatus) Xp7DeploymentStatusFields(com.enonic.kubernetes.client.v1.xp7deployment.Xp7DeploymentStatusFields)

Example 4 with AdmissionOperation

use of com.enonic.kubernetes.operator.api.AdmissionOperation in project xp-operator by enonic.

the class AdmissionApi method xp7deployment.

private void xp7deployment(AdmissionReview admissionReview) {
    AdmissionOperation op = getOperation(admissionReview);
    Xp7Deployment newDeployment = (Xp7Deployment) admissionReview.getRequest().getObject();
    if (op != AdmissionOperation.DELETE) {
        // Check spec
        Preconditions.checkState(newDeployment.getSpec() != null, "'spec' cannot be null");
        Preconditions.checkState(newDeployment.getSpec().getEnabled() != null, "'spec.enabled' cannot be null");
        Preconditions.checkState(newDeployment.getSpec().getXpVersion() != null, "'spec.xpVersion' cannot be null");
        Preconditions.checkState(newDeployment.getSpec().getXp7DeploymentSpecNodesSharedDisks() != null, "'spec.nodesSharedDisks' cannot be null");
        Preconditions.checkState(newDeployment.getSpec().getXp7DeploymentSpecNodeGroups() != null, "'spec.nodeGroups' cannot be null");
        // Check status
        Preconditions.checkState(newDeployment.getStatus() != null, "'status' cannot be null");
        Preconditions.checkState(newDeployment.getStatus().getMessage() != null, "'status.message' cannot be null");
        Preconditions.checkState(newDeployment.getStatus().getState() != null, "'status.state' cannot be null");
        Preconditions.checkState(newDeployment.getStatus().getXp7DeploymentStatusFields() != null, "'status.fields' cannot be null");
        Preconditions.checkState(newDeployment.getStatus().getXp7DeploymentStatusFields().getXp7DeploymentStatusFieldsPods() != null, "'status.fields.pods' cannot be null");
        // Check node groups
        int nrOfMasterNodes = 0;
        int i = 0;
        for (Xp7DeploymentSpecNodeGroup ng : newDeployment.getSpec().getXp7DeploymentSpecNodeGroups()) {
            Preconditions.checkState(ng.getName() != null, "'spec.nodeGroups[" + i + "].name' cannot be null");
            Preconditions.checkState(!ng.getName().equals(cfgStr("operator.charts.values.allNodesKey")), "'spec.nodeGroups[" + i + "].name' cannot be " + cfgStr("operator.charts.values.allNodesKey"));
            dns1123("spec.nodeGroups[" + i + "].name", ng.getName());
            Preconditions.checkState(ng.getData() != null, "'spec.nodeGroups[" + i + "].data' cannot be null");
            Preconditions.checkState(ng.getMaster() != null, "'spec.nodeGroups[" + i + "].master' cannot be null");
            Preconditions.checkState(ng.getReplicas() != null, "'spec.nodeGroups[" + i + "].replicas' cannot be null");
            Preconditions.checkState(ng.getReplicas() >= 0, "'spec.nodeGroups[" + i + "].replicas' has to be >= 0");
            Preconditions.checkState(ng.getXp7DeploymentSpecNodeGroupEnvironment() != null, "'spec.nodeGroups[" + i + "].env' cannot be null");
            Preconditions.checkState(ng.getXp7DeploymentSpecNodeGroupResources() != null, "'spec.nodeGroups[" + i + "].resources' cannot be null");
            Preconditions.checkState(ng.getXp7DeploymentSpecNodeGroupResources().getCpu() != null, "'spec.nodeGroups[" + i + "].resources.cpu' cannot be null");
            Preconditions.checkState(ng.getXp7DeploymentSpecNodeGroupResources().getMemory() != null, "'spec.nodeGroups[" + i + "].resources.memory' cannot be null");
            Preconditions.checkState(ng.getXp7DeploymentSpecNodeGroupResources().getMemory().contains("Mi") || ng.getXp7DeploymentSpecNodeGroupResources().getMemory().contains("Gi"), "'spec.nodeGroups[" + i + "].resources.memory' can only be defined with Gi or Mi");
            Preconditions.checkState(ng.getXp7DeploymentSpecNodeGroupResources().getXp7DeploymentSpecNodeGroupDisks() != null, "'spec.nodeGroups[" + i + "].resources.disks' cannot be null");
            // Check disks
            if (ng.getData()) {
                Preconditions.checkState(ng.getXp7DeploymentSpecNodeGroupResources().getXp7DeploymentSpecNodeGroupDisks().stream().anyMatch(d -> d.getName().equals("index")), "nodes with data=true must have disk 'index' defined");
            }
            if (ng.getMaster()) {
                nrOfMasterNodes += ng.getReplicas();
            }
            i++;
        }
        // Check replicas
        Preconditions.checkState(nrOfMasterNodes > 0, "some nodeGroups must have master=true");
        Preconditions.checkState(nrOfMasterNodes % 2 == 1, "number of master nodes has to be an odd number");
    }
    // Strict label and name validation
    cfgIfBool("operator.deployment.xp.labels.strictValidation", () -> {
        Preconditions.checkState(newDeployment.getMetadata() != null, "'metadata' cannot be null");
        Preconditions.checkState(newDeployment.getMetadata().getLabels() != null, "'metadata.labels' cannot be null");
        String cloud = newDeployment.getMetadata().getLabels().get(cfgStr("operator.deployment.xp.labels.cloud"));
        String solution = newDeployment.getMetadata().getLabels().get(cfgStr("operator.deployment.xp.labels.solution"));
        String environment = newDeployment.getMetadata().getLabels().get(cfgStr("operator.deployment.xp.labels.environment"));
        String service = newDeployment.getMetadata().getLabels().get(cfgStr("operator.deployment.xp.labels.service"));
        Preconditions.checkState(cloud != null, String.format("'metadata.labels.%s' cannot be null", cfgStr("operator.deployment.xp.labels.cloud")));
        Preconditions.checkState(solution != null, String.format("'metadata.labels.%s' cannot be null", cfgStr("operator.deployment.xp.labels.solution")));
        Preconditions.checkState(environment != null, String.format("'metadata.labels.%s' cannot be null", cfgStr("operator.deployment.xp.labels.environment")));
        Preconditions.checkState(service != null, String.format("'metadata.labels.%s' cannot be null", cfgStr("operator.deployment.xp.labels.service")));
        String name = String.format("%s-%s-%s-%s", cloud, solution, environment, service);
        Preconditions.checkState(newDeployment.getMetadata().getName().equals(name), String.format("Xp7Deployment name must be equal to <Cloud>-<Solution>-<Environment>-<Service> according to labels, i.e: '%s'", name));
    });
    if (op == AdmissionOperation.CREATE) {
        Optional<Xp7Deployment> xp7Deployments = getXp7Deployment(admissionReview.getRequest().getObject());
        Preconditions.checkState(xp7Deployments.isEmpty(), "There is already an Xp7Deployment in NS '%s'", newDeployment.getMetadata().getNamespace());
        // Assert version is > 7.7.X, if we cant parse version, just let it go
        ComparableVersion currentVersion = new ComparableVersion("7.7.0");
        try {
            if (newDeployment.getSpec().getXpVersion().startsWith("7.")) {
                currentVersion = new ComparableVersion(newDeployment.getSpec().getXpVersion());
            } else if (newDeployment.getSpec().getXpVersion().startsWith("enonic/xp:7.")) {
                String pattern = "^enonic\\/xp:([0-9]+\\.[0-9]+\\.[0-9]+)";
                Matcher m = Pattern.compile(pattern).matcher(newDeployment.getSpec().getXpVersion());
                if (m.find()) {
                    currentVersion = new ComparableVersion(m.group(1));
                }
            }
        } catch (Exception e) {
        // Just ignore
        }
        Preconditions.checkState(currentVersion.compareTo(new ComparableVersion("7.6.100")) > 0, "Operator only supports XP version 7.7 and higher");
    }
}
Also used : AdmissionOperation(com.enonic.kubernetes.operator.api.AdmissionOperation) Mapping(com.enonic.kubernetes.operator.ingress.Mapping) Xp7App(com.enonic.kubernetes.client.v1.xp7app.Xp7App) Produces(javax.ws.rs.Produces) Predicates.inNodeGroupAllOr(com.enonic.kubernetes.kubernetes.Predicates.inNodeGroupAllOr) HTTPIngressPath(io.fabric8.kubernetes.api.model.networking.v1.HTTPIngressPath) Xp7Config(com.enonic.kubernetes.client.v1.xp7config.Xp7Config) Path(javax.ws.rs.Path) Xp7DeploymentSpecNodeGroup(com.enonic.kubernetes.client.v1.xp7deployment.Xp7DeploymentSpecNodeGroup) BaseAdmissionApi(com.enonic.kubernetes.operator.api.BaseAdmissionApi) HashSet(java.util.HashSet) Matcher(java.util.regex.Matcher) Xp7Deployment(com.enonic.kubernetes.client.v1.xp7deployment.Xp7Deployment) Consumes(javax.ws.rs.Consumes) Configuration.cfgStr(com.enonic.kubernetes.common.Configuration.cfgStr) ComparableVersion(org.apache.maven.artifact.versioning.ComparableVersion) Configuration.cfgIfBool(com.enonic.kubernetes.common.Configuration.cfgIfBool) Domain(com.enonic.kubernetes.client.v1.domain.Domain) Predicates.matchAnnotationPrefix(com.enonic.kubernetes.kubernetes.Predicates.matchAnnotationPrefix) POST(javax.ws.rs.POST) Predicates.inSameNamespaceAs(com.enonic.kubernetes.kubernetes.Predicates.inSameNamespaceAs) Predicates.fieldEquals(com.enonic.kubernetes.kubernetes.Predicates.fieldEquals) OperatorXp7ConfigSync.getAnnotationMappings(com.enonic.kubernetes.operator.ingress.OperatorXp7ConfigSync.getAnnotationMappings) Collection(java.util.Collection) Predicates.withName(com.enonic.kubernetes.kubernetes.Predicates.withName) Set(java.util.Set) Validator.dns1123(com.enonic.kubernetes.common.Validator.dns1123) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) Predicates.isBeingBackupRestored(com.enonic.kubernetes.kubernetes.Predicates.isBeingBackupRestored) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) Collectors(java.util.stream.Collectors) Validator(com.enonic.kubernetes.common.Validator) List(java.util.List) AdmissionReview(io.fabric8.kubernetes.api.model.admission.v1.AdmissionReview) Ingress(io.fabric8.kubernetes.api.model.networking.v1.Ingress) Optional(java.util.Optional) Preconditions(com.google.common.base.Preconditions) ApplicationScoped(javax.enterprise.context.ApplicationScoped) Pattern(java.util.regex.Pattern) AdmissionOperation(com.enonic.kubernetes.operator.api.AdmissionOperation) Collections(java.util.Collections) Xp7Deployment(com.enonic.kubernetes.client.v1.xp7deployment.Xp7Deployment) Matcher(java.util.regex.Matcher) ComparableVersion(org.apache.maven.artifact.versioning.ComparableVersion) Xp7DeploymentSpecNodeGroup(com.enonic.kubernetes.client.v1.xp7deployment.Xp7DeploymentSpecNodeGroup) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException)

Example 5 with AdmissionOperation

use of com.enonic.kubernetes.operator.api.AdmissionOperation in project xp-operator by enonic.

the class AdmissionApi method domain.

private void domain(final AdmissionReview admissionReview) {
    AdmissionOperation op = getOperation(admissionReview);
    if (op == AdmissionOperation.DELETE) {
        return;
    }
    Domain newDomain = (Domain) admissionReview.getRequest().getObject();
    // Check spec
    Preconditions.checkState(newDomain.getSpec() != null, "'spec' cannot be null");
    Preconditions.checkState(newDomain.getSpec().getHost() != null, "'spec.host' cannot be null");
    Validator.dns1123("spec.host", newDomain.getSpec().getHost());
    Preconditions.checkState(newDomain.getSpec().getDnsRecord() != null, "'spec.dnsRecord' cannot be null");
    if (newDomain.getSpec().getDnsRecord()) {
        Preconditions.checkState(newDomain.getSpec().getCdn() != null, "'spec.cdn' cannot be null if dnsRecord = true");
    }
    if (newDomain.getSpec().getDomainSpecCertificate() != null) {
        Preconditions.checkState(newDomain.getSpec().getDomainSpecCertificate().getAuthority() != null, "'spec.certificate.authority' cannot be null");
        switch(newDomain.getSpec().getDomainSpecCertificate().getAuthority()) {
            case CUSTOM:
                Preconditions.checkState(newDomain.getSpec().getDomainSpecCertificate().getIdentifier() != null, "'spec.certificate.identifier' cannot be null when authority is CUSTOM");
            case CLUSTER_ISSUER:
                Preconditions.checkState(newDomain.getSpec().getDomainSpecCertificate().getIdentifier() != null, "'spec.certificate.identifier' cannot be null when authority is CLUSTER_ISSUER");
        }
    }
    // Check status
    Preconditions.checkState(newDomain.getStatus() != null, "'status' cannot be null");
    Preconditions.checkState(newDomain.getStatus().getMessage() != null, "'status.message' cannot be null");
    Preconditions.checkState(newDomain.getStatus().getState() != null, "'status.state' cannot be null");
    Preconditions.checkState(newDomain.getStatus().getDomainStatusFields() != null, "'status.fields' cannot be null");
    Preconditions.checkState(newDomain.getStatus().getDomainStatusFields().getDnsRecordCreated() != null, "'status.fields.dnsRecordCreated' cannot be null");
    Preconditions.checkState(newDomain.getStatus().getDomainStatusFields().getPublicIps() != null, "'status.fields.publicIps' cannot be null");
    if (op == AdmissionOperation.UPDATE) {
        Domain oldDomain = (Domain) admissionReview.getRequest().getOldObject();
        Preconditions.checkState(oldDomain.getSpec().getHost().equals(newDomain.getSpec().getHost()), "'spec.host' cannot be changed");
    }
}
Also used : AdmissionOperation(com.enonic.kubernetes.operator.api.AdmissionOperation) Domain(com.enonic.kubernetes.client.v1.domain.Domain)

Aggregations

AdmissionOperation (com.enonic.kubernetes.operator.api.AdmissionOperation)9 Domain (com.enonic.kubernetes.client.v1.domain.Domain)7 Xp7App (com.enonic.kubernetes.client.v1.xp7app.Xp7App)6 Xp7Config (com.enonic.kubernetes.client.v1.xp7config.Xp7Config)6 Xp7Deployment (com.enonic.kubernetes.client.v1.xp7deployment.Xp7Deployment)5 Configuration.cfgStr (com.enonic.kubernetes.common.Configuration.cfgStr)5 Predicates.matchAnnotationPrefix (com.enonic.kubernetes.kubernetes.Predicates.matchAnnotationPrefix)5 BaseAdmissionApi (com.enonic.kubernetes.operator.api.BaseAdmissionApi)5 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)5 HasMetadata (io.fabric8.kubernetes.api.model.HasMetadata)5 AdmissionReview (io.fabric8.kubernetes.api.model.admission.v1.AdmissionReview)5 Ingress (io.fabric8.kubernetes.api.model.networking.v1.Ingress)5 Collectors (java.util.stream.Collectors)5 ApplicationScoped (javax.enterprise.context.ApplicationScoped)5 Consumes (javax.ws.rs.Consumes)5 POST (javax.ws.rs.POST)5 Path (javax.ws.rs.Path)5 Produces (javax.ws.rs.Produces)5 Xp7DeploymentSpecNodeGroup (com.enonic.kubernetes.client.v1.xp7deployment.Xp7DeploymentSpecNodeGroup)4 Configuration.cfgIfBool (com.enonic.kubernetes.common.Configuration.cfgIfBool)4