From c73ceebafd7d86b6bd94013a1b902ed5aa007fc9 Mon Sep 17 00:00:00 2001 From: Javatar81 Date: Fri, 30 Aug 2024 16:56:01 +0200 Subject: [PATCH] Added tests w/wo additionalProps + negative test, simplified test crd --- .../invoker.properties | 0 .../ignore-unknown-toplevel-objects/pom.xml | 89 + ...estIgnoreUnknownTopleveObjsFromConfig.java | 97 + .../io/fabric8/it/top/TestToplevelFields.java | 74 + .../src/test/resources/application-crd.yml | 237 + .../src/test/resources/sample-addprops.yaml} | 2 +- .../test/resources/sample-no-addprops.yaml | 26 + .../test/resources/sample-tl-operation.yaml | 29 + .../invoker.properties | 17 + .../pom.xml | 2 +- ...erveUnknownToplevelObjectsFromConfig.java} | 15 +- .../io/fabric8/it/top/TestToplevelFields.java | 83 + .../src/test/resources/application-crd.yml | 237 + .../src/test/resources/sample-addprops.yaml | 36 + .../test/resources/sample-tl-operation.yaml | 29 + .../io/fabric8/it/top/TestToplevelFields.java | 67 - .../src/test/resources/application-crd.yml | 5697 ----------------- 17 files changed, 963 insertions(+), 5774 deletions(-) rename java-generator/it/src/it/{toplevel-fields => ignore-unknown-toplevel-objects}/invoker.properties (100%) create mode 100644 java-generator/it/src/it/ignore-unknown-toplevel-objects/pom.xml create mode 100644 java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestIgnoreUnknownTopleveObjsFromConfig.java create mode 100644 java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestToplevelFields.java create mode 100644 java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/application-crd.yml rename java-generator/it/src/it/{toplevel-fields/src/test/resources/sample.yaml => ignore-unknown-toplevel-objects/src/test/resources/sample-addprops.yaml} (97%) create mode 100644 java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/sample-no-addprops.yaml create mode 100644 java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/sample-tl-operation.yaml create mode 100644 java-generator/it/src/it/preserve-unknown-toplevel-objects/invoker.properties rename java-generator/it/src/it/{toplevel-fields => preserve-unknown-toplevel-objects}/pom.xml (97%) rename java-generator/it/src/it/{toplevel-fields/src/test/java/io/fabric8/it/top/TestPreserveUnkonwnUsabilityFromConfig.java => preserve-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestPreserveUnknownToplevelObjectsFromConfig.java} (86%) create mode 100644 java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestToplevelFields.java create mode 100644 java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/application-crd.yml create mode 100644 java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/sample-addprops.yaml create mode 100644 java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/sample-tl-operation.yaml delete mode 100644 java-generator/it/src/it/toplevel-fields/src/test/java/io/fabric8/it/top/TestToplevelFields.java delete mode 100644 java-generator/it/src/it/toplevel-fields/src/test/resources/application-crd.yml diff --git a/java-generator/it/src/it/toplevel-fields/invoker.properties b/java-generator/it/src/it/ignore-unknown-toplevel-objects/invoker.properties similarity index 100% rename from java-generator/it/src/it/toplevel-fields/invoker.properties rename to java-generator/it/src/it/ignore-unknown-toplevel-objects/invoker.properties diff --git a/java-generator/it/src/it/ignore-unknown-toplevel-objects/pom.xml b/java-generator/it/src/it/ignore-unknown-toplevel-objects/pom.xml new file mode 100644 index 00000000000..c8011bee21a --- /dev/null +++ b/java-generator/it/src/it/ignore-unknown-toplevel-objects/pom.xml @@ -0,0 +1,89 @@ + + + + + 4.0.0 + + ignore-unknown-toplevel-objects + io.fabric8.it + 0.0-SNAPSHOT + jar + + + @maven.compiler.source@ + @maven.compiler.target@ + + + + + io.fabric8 + java-generator-integration-tests + @project.version@ + + + io.fabric8 + generator-annotations + @project.version@ + + + org.junit.jupiter + junit-jupiter-api + @junit.version@ + test + + + org.junit.jupiter + junit-jupiter-engine + @junit.version@ + test + + + + + + + io.fabric8 + java-generator-maven-plugin + @project.version@ + + + + generate + + + + + src/test/resources/application-crd.yml + false + false + + + + org.apache.maven.plugins + maven-surefire-plugin + @maven.surefire.plugin.version@ + + false + false + + + + + + diff --git a/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestIgnoreUnknownTopleveObjsFromConfig.java b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestIgnoreUnknownTopleveObjsFromConfig.java new file mode 100644 index 00000000000..68b0038a634 --- /dev/null +++ b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestIgnoreUnknownTopleveObjsFromConfig.java @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2015 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.fabric8.it.top; + +import com.fasterxml.jackson.databind.JsonNode; +import io.fabric8.kubernetes.api.model.AnyType; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.client.utils.Serialization; +import org.junit.jupiter.api.Test; +import io.fabric8.java.generator.testing.KubernetesResourceDiff; +import io.argoproj.v1alpha1.Application; +import io.argoproj.v1alpha1.ApplicationSpec; +import io.argoproj.v1alpha1.applicationspec.Destination; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.Files; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + +class TestIgnoreUnknownTopleveObjsFromConfig { + + @Test + void testDeserialization() { + try { + Application.class.getMethod("getAdditionalProperties"); + fail("No getAdditionalProperties method expected"); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } + } + + private Application createSampleApplicationNoAdditionalFields(String name) throws Exception { + Application application = new Application(); + ObjectMeta meta = new ObjectMeta(); + meta.setName(name); + meta.setNamespace("mynamespace"); + application.setMetadata(meta); + ApplicationSpec spec = new ApplicationSpec(); + application.setSpec(spec); + spec.setProject("default"); + Destination des = new Destination(); + des.setNamespace("targetnamespace"); + des.setServer("https://kubernetes.default.svc"); + spec.setDestination(des); + return application; + } + + @Test + void testAgainstSampleNoAdditionalFields() throws Exception { + // Arrange + Path resPath = Paths.get(getClass().getResource("/sample-no-addprops.yaml").toURI()); + String yamlContent = new String(Files.readAllBytes(resPath), "UTF8"); + Application sample = createSampleApplicationNoAdditionalFields("testapp-no-addprops"); + KubernetesResourceDiff diff = new KubernetesResourceDiff(yamlContent, Serialization.asYaml(sample)); + + // Act + List aggregatedDiffs = diff.getListOfDiffs(); + + // Assert + assertEquals(0, aggregatedDiffs.size()); + } + + @Test + void testAgainstSampleWithAdditionalFields() throws Exception { + // Arrange + Path resPath = Paths.get(getClass().getResource("/sample-addprops.yaml").toURI()); + String yamlContent = new String(Files.readAllBytes(resPath), "UTF8"); + Application sample = createSampleApplicationNoAdditionalFields(" testapp-addprops"); + KubernetesResourceDiff diff = new KubernetesResourceDiff(yamlContent, Serialization.asYaml(sample)); + + // Act + List aggregatedDiffs = diff.getListOfDiffs(); + + // Assert + // We expect 6 additional fields that are not available in the sample object + assertEquals(6, aggregatedDiffs.size()); + } +} diff --git a/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestToplevelFields.java b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestToplevelFields.java new file mode 100644 index 00000000000..c00014eed56 --- /dev/null +++ b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestToplevelFields.java @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2015 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.fabric8.it.top; + +import com.fasterxml.jackson.databind.JsonNode; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.client.utils.Serialization; +import org.junit.jupiter.api.Test; +import io.fabric8.java.generator.testing.KubernetesResourceDiff; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.Files; +import java.util.List; +import io.argoproj.v1alpha1.Application; +import io.argoproj.v1alpha1.ApplicationSpec; +import io.argoproj.v1alpha1.applicationspec.Destination; +import io.argoproj.v1alpha1.application.Operation; +import io.argoproj.v1alpha1.application.operation.InitiatedBy; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + +class TestToplevelFields { + + private Application createSampleApplication() throws Exception { + Application application = new Application(); + ObjectMeta meta = new ObjectMeta(); + meta.setName("testapp-tl-operation"); + meta.setNamespace("mynamespace"); + application.setMetadata(meta); + ApplicationSpec spec = new ApplicationSpec(); + application.setSpec(spec); + spec.setProject("default"); + Destination des = new Destination(); + des.setNamespace("targetnamespace"); + des.setServer("https://kubernetes.default.svc"); + spec.setDestination(des); + Operation op = new Operation(); + InitiatedBy initiatedBy = new InitiatedBy(); + initiatedBy.setUsername("me"); + op.setInitiatedBy(initiatedBy); + application.setOperation(op); + return application; + } + @Test + void testAgainstSample() throws Exception { + // Arrange + Path resPath = Paths.get(getClass().getResource("/sample-tl-operation.yaml").toURI()); + String yamlContent = new String(Files.readAllBytes(resPath), "UTF8"); + Application sample = createSampleApplication(); + KubernetesResourceDiff diff = new KubernetesResourceDiff(yamlContent, Serialization.asYaml(sample)); + + // Act + List aggregatedDiffs = diff.getListOfDiffs(); + + // Assert + assertEquals(0, aggregatedDiffs.size()); + } + +} diff --git a/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/application-crd.yml b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/application-crd.yml new file mode 100644 index 00000000000..5027d718195 --- /dev/null +++ b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/application-crd.yml @@ -0,0 +1,237 @@ +# +# Copyright (C) 2015 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1 +metadata: + name: applications.argoproj.io + uid: 1012051c-07b7-44a6-b656-aa74d0464868 + resourceVersion: '5050848773' + generation: 12 + creationTimestamp: '2020-04-03T21:21:50Z' + labels: + app.kubernetes.io/name: applications.argoproj.io + app.kubernetes.io/part-of: argocd + operators.coreos.com/openshift-gitops-operator.openshift-operators: '' + annotations: + operatorframework.io/installed-alongside-27ff3f11b7652ca2: openshift-operators/openshift-gitops-operator.v1.11.1 + operatorframework.io/installed-alongside-27ff4011b7652e55: openshift-operators/openshift-gitops-operator.v1.11.0 +spec: + group: argoproj.io + names: + plural: applications + singular: application + shortNames: + - app + - apps + kind: Application + listKind: ApplicationList + scope: Namespaced + versions: + - name: v1alpha1 + served: true + storage: true + schema: + openAPIV3Schema: + description: Application is a definition of Application resource. + type: object + required: + - metadata + - spec + properties: + apiVersion: + description: >- + APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the + latest internal value, and may reject unrecognized values. More + info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: >- + Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the + client submits requests to. Cannot be updated. In CamelCase. + More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + operation: + description: >- + Operation contains information about a requested or running + operation + type: object + properties: + initiatedBy: + description: >- + InitiatedBy contains information about who initiated the + operations + type: object + properties: + automated: + description: >- + Automated is set to true if operation was initiated + automatically by the application controller. + type: boolean + username: + description: >- + Username contains the name of a user who started + operation + type: string + spec: + description: >- + ApplicationSpec represents desired application state. Contains + link to repository with application definition and additional + parameters link definition revision. + type: object + required: + - destination + - project + properties: + destination: + description: >- + Destination is a reference to the target Kubernetes server + and namespace + type: object + properties: + name: + description: >- + Name is an alternate way of specifying the target + cluster by its symbolic name. This must be set if Server + is not set. + type: string + namespace: + description: >- + Namespace specifies the target namespace for the + application's resources. The namespace will only be set + for namespace-scoped resources that have not set a value + for .metadata.namespace + type: string + server: + description: >- + Server specifies the URL of the target cluster's + Kubernetes control plane API. This must be set if Name + is not set. + type: string + ignoreDifferences: + description: >- + IgnoreDifferences is a list of resources and their fields + which should be ignored during comparison + type: array + items: + description: >- + ResourceIgnoreDifferences contains resource filter and + list of json paths which should be ignored during + comparison with live state. + type: object + required: + - kind + properties: + group: + type: string + jqPathExpressions: + type: array + items: + type: string + jsonPointers: + type: array + items: + type: string + kind: + type: string + managedFieldsManagers: + description: >- + ManagedFieldsManagers is a list of trusted managers. + Fields mutated by those managers will take precedence + over the desired state defined in the SCM and won't be + displayed in diffs + type: array + items: + type: string + name: + type: string + namespace: + type: string + info: + description: >- + Info contains a list of information (URLs, email addresses, + and plain text) that relates to the application + type: array + items: + type: object + required: + - name + - value + properties: + name: + type: string + value: + type: string + project: + description: >- + Project is a reference to the project this application + belongs to. The empty string means that application belongs + to the 'default' project. + type: string + status: + description: >- + ApplicationStatus contains status information for the + application + type: object + properties: + resourceHealthSource: + description: >- + ResourceHealthSource indicates where the resource health + status is stored: inline if not set or appTree + type: string + subresources: {} + additionalPrinterColumns: + - name: Sync Status + type: string + jsonPath: .status.sync.status + - name: Health Status + type: string + jsonPath: .status.health.status + - name: Revision + type: string + priority: 10 + jsonPath: .status.sync.revision + conversion: + strategy: None +status: + conditions: + - type: NamesAccepted + status: 'True' + lastTransitionTime: '2020-04-03T21:21:51Z' + reason: NoConflicts + message: no conflicts found + - type: Established + status: 'True' + lastTransitionTime: '2020-04-03T21:21:51Z' + reason: InitialNamesAccepted + message: the initial names have been accepted + acceptedNames: + plural: applications + singular: application + shortNames: + - app + - apps + kind: Application + listKind: ApplicationList + storedVersions: + - v1alpha1 + diff --git a/java-generator/it/src/it/toplevel-fields/src/test/resources/sample.yaml b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/sample-addprops.yaml similarity index 97% rename from java-generator/it/src/it/toplevel-fields/src/test/resources/sample.yaml rename to java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/sample-addprops.yaml index e0ce6c5f375..ac4a6dc5c5d 100644 --- a/java-generator/it/src/it/toplevel-fields/src/test/resources/sample.yaml +++ b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/sample-addprops.yaml @@ -17,7 +17,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - name: testapp + name: testapp-addprops namespace: mynamespace consumerID: "{uuid}" url: "tcp://admin:public@localhost:1883" diff --git a/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/sample-no-addprops.yaml b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/sample-no-addprops.yaml new file mode 100644 index 00000000000..fd99f1cd044 --- /dev/null +++ b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/sample-no-addprops.yaml @@ -0,0 +1,26 @@ +# +# Copyright (C) 2015 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: testapp-no-addprops + namespace: mynamespace +spec: + destination: + namespace: targetnamespace + server: 'https://kubernetes.default.svc' + project: default diff --git a/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/sample-tl-operation.yaml b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/sample-tl-operation.yaml new file mode 100644 index 00000000000..87241aab64b --- /dev/null +++ b/java-generator/it/src/it/ignore-unknown-toplevel-objects/src/test/resources/sample-tl-operation.yaml @@ -0,0 +1,29 @@ +# +# Copyright (C) 2015 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: testapp-tl-operation + namespace: mynamespace +spec: + destination: + namespace: targetnamespace + server: 'https://kubernetes.default.svc' + project: default +operation: + initiatedBy: + username: "me" diff --git a/java-generator/it/src/it/preserve-unknown-toplevel-objects/invoker.properties b/java-generator/it/src/it/preserve-unknown-toplevel-objects/invoker.properties new file mode 100644 index 00000000000..9135f207843 --- /dev/null +++ b/java-generator/it/src/it/preserve-unknown-toplevel-objects/invoker.properties @@ -0,0 +1,17 @@ +# +# Copyright (C) 2015 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +invoker.goals=test diff --git a/java-generator/it/src/it/toplevel-fields/pom.xml b/java-generator/it/src/it/preserve-unknown-toplevel-objects/pom.xml similarity index 97% rename from java-generator/it/src/it/toplevel-fields/pom.xml rename to java-generator/it/src/it/preserve-unknown-toplevel-objects/pom.xml index 14e1906552c..edf12ede59f 100644 --- a/java-generator/it/src/it/toplevel-fields/pom.xml +++ b/java-generator/it/src/it/preserve-unknown-toplevel-objects/pom.xml @@ -20,7 +20,7 @@ 4.0.0 - toplevel-fields + preserve-unknown-toplevel-objects io.fabric8.it 0.0-SNAPSHOT jar diff --git a/java-generator/it/src/it/toplevel-fields/src/test/java/io/fabric8/it/top/TestPreserveUnkonwnUsabilityFromConfig.java b/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestPreserveUnknownToplevelObjectsFromConfig.java similarity index 86% rename from java-generator/it/src/it/toplevel-fields/src/test/java/io/fabric8/it/top/TestPreserveUnkonwnUsabilityFromConfig.java rename to java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestPreserveUnknownToplevelObjectsFromConfig.java index 5d9817d7916..c2c6e0dbbaa 100644 --- a/java-generator/it/src/it/toplevel-fields/src/test/java/io/fabric8/it/top/TestPreserveUnkonwnUsabilityFromConfig.java +++ b/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestPreserveUnknownToplevelObjectsFromConfig.java @@ -35,22 +35,21 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -class TestPreserveUnknownUsabilityFromConfig { +class TestPreserveUnknownToplevelObjectsFromConfig { @Test void testDeserialization() { // Arrange Application sample = - Serialization.unmarshal(getClass().getResourceAsStream("/sample.yaml"), Application.class); + Serialization.unmarshal(getClass().getResourceAsStream("/sample-addprops.yaml"), Application.class); // Assert - System.out.println(sample.getAdditionalProperties()); assertEquals(5, sample.getAdditionalProperties().size()); } - private Application createSampleApplication() throws Exception { + private Application createSampleApplicationAdditionalFields() throws Exception { Application application = new Application(); ObjectMeta meta = new ObjectMeta(); - meta.setName("testapp"); + meta.setName("testapp-addprops"); meta.setNamespace("mynamespace"); application.setMetadata(meta); ApplicationSpec spec = new ApplicationSpec(); @@ -73,11 +72,11 @@ private Application createSampleApplication() throws Exception { } @Test - void testAgainstSample() throws Exception { + void testAgainstSampleAdditionalFields() throws Exception { // Arrange - Path resPath = Paths.get(getClass().getResource("/sample.yaml").toURI()); + Path resPath = Paths.get(getClass().getResource("/sample-addprops.yaml").toURI()); String yamlContent = new String(Files.readAllBytes(resPath), "UTF8"); - Application sample = createSampleApplication(); + Application sample = createSampleApplicationAdditionalFields(); KubernetesResourceDiff diff = new KubernetesResourceDiff(yamlContent, Serialization.asYaml(sample)); // Act diff --git a/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestToplevelFields.java b/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestToplevelFields.java new file mode 100644 index 00000000000..031da3180da --- /dev/null +++ b/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/java/io/fabric8/it/top/TestToplevelFields.java @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2015 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.fabric8.it.dummy; + +import com.fasterxml.jackson.databind.JsonNode; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.client.utils.Serialization; +import org.junit.jupiter.api.Test; +import io.fabric8.java.generator.testing.KubernetesResourceDiff; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.Files; +import java.util.List; +import io.argoproj.v1alpha1.Application; +import io.argoproj.v1alpha1.ApplicationSpec; +import io.argoproj.v1alpha1.applicationspec.Destination; +import io.argoproj.v1alpha1.application.Operation; +import io.argoproj.v1alpha1.application.operation.InitiatedBy; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + +class TestToplevelFields { + + @Test + void testDeserialization() { + // Arrange + Application sample = + Serialization.unmarshal(getClass().getResourceAsStream("/sample-tl-operation.yaml"), Application.class); + // Assert + assertEquals(0, sample.getAdditionalProperties().size()); + } + + private Application createSampleApplication() throws Exception { + Application application = new Application(); + ObjectMeta meta = new ObjectMeta(); + meta.setName("testapp-tl-operation"); + meta.setNamespace("mynamespace"); + application.setMetadata(meta); + ApplicationSpec spec = new ApplicationSpec(); + application.setSpec(spec); + spec.setProject("default"); + Destination des = new Destination(); + des.setNamespace("targetnamespace"); + des.setServer("https://kubernetes.default.svc"); + spec.setDestination(des); + Operation op = new Operation(); + InitiatedBy initiatedBy = new InitiatedBy(); + initiatedBy.setUsername("me"); + op.setInitiatedBy(initiatedBy); + application.setOperation(op); + return application; + } + @Test + void testAgainstSample() throws Exception { + // Arrange + Path resPath = Paths.get(getClass().getResource("/sample-tl-operation.yaml").toURI()); + String yamlContent = new String(Files.readAllBytes(resPath), "UTF8"); + Application sample = createSampleApplication(); + KubernetesResourceDiff diff = new KubernetesResourceDiff(yamlContent, Serialization.asYaml(sample)); + + // Act + List aggregatedDiffs = diff.getListOfDiffs(); + + // Assert + assertEquals(0, aggregatedDiffs.size()); + } + +} diff --git a/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/application-crd.yml b/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/application-crd.yml new file mode 100644 index 00000000000..5027d718195 --- /dev/null +++ b/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/application-crd.yml @@ -0,0 +1,237 @@ +# +# Copyright (C) 2015 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +kind: CustomResourceDefinition +apiVersion: apiextensions.k8s.io/v1 +metadata: + name: applications.argoproj.io + uid: 1012051c-07b7-44a6-b656-aa74d0464868 + resourceVersion: '5050848773' + generation: 12 + creationTimestamp: '2020-04-03T21:21:50Z' + labels: + app.kubernetes.io/name: applications.argoproj.io + app.kubernetes.io/part-of: argocd + operators.coreos.com/openshift-gitops-operator.openshift-operators: '' + annotations: + operatorframework.io/installed-alongside-27ff3f11b7652ca2: openshift-operators/openshift-gitops-operator.v1.11.1 + operatorframework.io/installed-alongside-27ff4011b7652e55: openshift-operators/openshift-gitops-operator.v1.11.0 +spec: + group: argoproj.io + names: + plural: applications + singular: application + shortNames: + - app + - apps + kind: Application + listKind: ApplicationList + scope: Namespaced + versions: + - name: v1alpha1 + served: true + storage: true + schema: + openAPIV3Schema: + description: Application is a definition of Application resource. + type: object + required: + - metadata + - spec + properties: + apiVersion: + description: >- + APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the + latest internal value, and may reject unrecognized values. More + info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: >- + Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the + client submits requests to. Cannot be updated. In CamelCase. + More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + operation: + description: >- + Operation contains information about a requested or running + operation + type: object + properties: + initiatedBy: + description: >- + InitiatedBy contains information about who initiated the + operations + type: object + properties: + automated: + description: >- + Automated is set to true if operation was initiated + automatically by the application controller. + type: boolean + username: + description: >- + Username contains the name of a user who started + operation + type: string + spec: + description: >- + ApplicationSpec represents desired application state. Contains + link to repository with application definition and additional + parameters link definition revision. + type: object + required: + - destination + - project + properties: + destination: + description: >- + Destination is a reference to the target Kubernetes server + and namespace + type: object + properties: + name: + description: >- + Name is an alternate way of specifying the target + cluster by its symbolic name. This must be set if Server + is not set. + type: string + namespace: + description: >- + Namespace specifies the target namespace for the + application's resources. The namespace will only be set + for namespace-scoped resources that have not set a value + for .metadata.namespace + type: string + server: + description: >- + Server specifies the URL of the target cluster's + Kubernetes control plane API. This must be set if Name + is not set. + type: string + ignoreDifferences: + description: >- + IgnoreDifferences is a list of resources and their fields + which should be ignored during comparison + type: array + items: + description: >- + ResourceIgnoreDifferences contains resource filter and + list of json paths which should be ignored during + comparison with live state. + type: object + required: + - kind + properties: + group: + type: string + jqPathExpressions: + type: array + items: + type: string + jsonPointers: + type: array + items: + type: string + kind: + type: string + managedFieldsManagers: + description: >- + ManagedFieldsManagers is a list of trusted managers. + Fields mutated by those managers will take precedence + over the desired state defined in the SCM and won't be + displayed in diffs + type: array + items: + type: string + name: + type: string + namespace: + type: string + info: + description: >- + Info contains a list of information (URLs, email addresses, + and plain text) that relates to the application + type: array + items: + type: object + required: + - name + - value + properties: + name: + type: string + value: + type: string + project: + description: >- + Project is a reference to the project this application + belongs to. The empty string means that application belongs + to the 'default' project. + type: string + status: + description: >- + ApplicationStatus contains status information for the + application + type: object + properties: + resourceHealthSource: + description: >- + ResourceHealthSource indicates where the resource health + status is stored: inline if not set or appTree + type: string + subresources: {} + additionalPrinterColumns: + - name: Sync Status + type: string + jsonPath: .status.sync.status + - name: Health Status + type: string + jsonPath: .status.health.status + - name: Revision + type: string + priority: 10 + jsonPath: .status.sync.revision + conversion: + strategy: None +status: + conditions: + - type: NamesAccepted + status: 'True' + lastTransitionTime: '2020-04-03T21:21:51Z' + reason: NoConflicts + message: no conflicts found + - type: Established + status: 'True' + lastTransitionTime: '2020-04-03T21:21:51Z' + reason: InitialNamesAccepted + message: the initial names have been accepted + acceptedNames: + plural: applications + singular: application + shortNames: + - app + - apps + kind: Application + listKind: ApplicationList + storedVersions: + - v1alpha1 + diff --git a/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/sample-addprops.yaml b/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/sample-addprops.yaml new file mode 100644 index 00000000000..ac4a6dc5c5d --- /dev/null +++ b/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/sample-addprops.yaml @@ -0,0 +1,36 @@ +# +# Copyright (C) 2015 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: testapp-addprops + namespace: mynamespace +consumerID: "{uuid}" +url: "tcp://admin:public@localhost:1883" +qos: 1 +anArray: + - 1 + - 2 + - 3 +anObject: + ONE: 1 + TWO: 2 +spec: + destination: + namespace: targetnamespace + server: 'https://kubernetes.default.svc' + project: default diff --git a/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/sample-tl-operation.yaml b/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/sample-tl-operation.yaml new file mode 100644 index 00000000000..87241aab64b --- /dev/null +++ b/java-generator/it/src/it/preserve-unknown-toplevel-objects/src/test/resources/sample-tl-operation.yaml @@ -0,0 +1,29 @@ +# +# Copyright (C) 2015 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: testapp-tl-operation + namespace: mynamespace +spec: + destination: + namespace: targetnamespace + server: 'https://kubernetes.default.svc' + project: default +operation: + initiatedBy: + username: "me" diff --git a/java-generator/it/src/it/toplevel-fields/src/test/java/io/fabric8/it/top/TestToplevelFields.java b/java-generator/it/src/it/toplevel-fields/src/test/java/io/fabric8/it/top/TestToplevelFields.java deleted file mode 100644 index ecdbf073acf..00000000000 --- a/java-generator/it/src/it/toplevel-fields/src/test/java/io/fabric8/it/top/TestToplevelFields.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2015 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.fabric8.it.dummy; - -import com.fasterxml.jackson.databind.JsonNode; -import io.fabric8.kubernetes.api.model.ObjectMeta; -import io.fabric8.kubernetes.client.utils.Serialization; -import org.junit.jupiter.api.Test; -import io.fabric8.java.generator.testing.KubernetesResourceDiff; - -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.Files; -import java.util.List; -import io.argoproj.v1alpha1.Application; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.fail; - -class TestToplevelFields { - - @Test - void testHasOperationField() { - try { - Application.class.getDeclaredField("operation"); - } catch (NoSuchFieldException e) { - e.printStackTrace(); - fail("No field operation"); - } - } - @Test - void testHasOperationGetter() { - try { - Application.class.getMethod("getOperation"); - } catch (NoSuchMethodException e) { - e.printStackTrace(); - fail("No getter for operation"); - } - } - - @Test - void testHasOperationSetter() { - String expectedParamType = "io.argoproj.v1alpha1.application.Operation"; - try { - Application.class.getMethod("setOperation", Class.forName(expectedParamType)); - } catch (NoSuchMethodException e) { - e.printStackTrace(); - fail("No setter for operation"); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - fail("Expected setter param type" + expectedParamType + "not found."); - } - } -} diff --git a/java-generator/it/src/it/toplevel-fields/src/test/resources/application-crd.yml b/java-generator/it/src/it/toplevel-fields/src/test/resources/application-crd.yml deleted file mode 100644 index f7085fca87c..00000000000 --- a/java-generator/it/src/it/toplevel-fields/src/test/resources/application-crd.yml +++ /dev/null @@ -1,5697 +0,0 @@ -# -# Copyright (C) 2015 Red Hat, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1 -metadata: - name: applications.argoproj.io - uid: 1012051c-07b7-44a6-b656-aa74d0464868 - resourceVersion: '5050848773' - generation: 12 - creationTimestamp: '2020-04-03T21:21:50Z' - labels: - app.kubernetes.io/name: applications.argoproj.io - app.kubernetes.io/part-of: argocd - operators.coreos.com/openshift-gitops-operator.openshift-operators: '' - annotations: - operatorframework.io/installed-alongside-27ff3f11b7652ca2: openshift-operators/openshift-gitops-operator.v1.11.1 - operatorframework.io/installed-alongside-27ff4011b7652e55: openshift-operators/openshift-gitops-operator.v1.11.0 -spec: - group: argoproj.io - names: - plural: applications - singular: application - shortNames: - - app - - apps - kind: Application - listKind: ApplicationList - scope: Namespaced - versions: - - name: v1alpha1 - served: true - storage: true - schema: - openAPIV3Schema: - description: Application is a definition of Application resource. - type: object - required: - - metadata - - spec - properties: - apiVersion: - description: >- - APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the - latest internal value, and may reject unrecognized values. More - info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: >- - Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the - client submits requests to. Cannot be updated. In CamelCase. - More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - operation: - description: >- - Operation contains information about a requested or running - operation - type: object - properties: - info: - description: Info is a list of informational items for this operation - type: array - items: - type: object - required: - - name - - value - properties: - name: - type: string - value: - type: string - initiatedBy: - description: >- - InitiatedBy contains information about who initiated the - operations - type: object - properties: - automated: - description: >- - Automated is set to true if operation was initiated - automatically by the application controller. - type: boolean - username: - description: >- - Username contains the name of a user who started - operation - type: string - retry: - description: Retry controls the strategy to apply if a sync fails - type: object - properties: - backoff: - description: >- - Backoff controls how to backoff on subsequent retries of - failed syncs - type: object - properties: - duration: - description: >- - Duration is the amount to back off. Default unit is - seconds, but could also be a duration (e.g. "2m", - "1h") - type: string - factor: - description: >- - Factor is a factor to multiply the base duration - after each failed retry - type: integer - format: int64 - maxDuration: - description: >- - MaxDuration is the maximum amount of time allowed - for the backoff strategy - type: string - limit: - description: >- - Limit is the maximum number of attempts for retrying a - failed sync. If set to 0, no retries will be performed. - type: integer - format: int64 - sync: - description: Sync contains parameters for the operation - type: object - properties: - dryRun: - description: >- - DryRun specifies to perform a `kubectl apply --dry-run` - without actually performing the sync - type: boolean - syncOptions: - description: >- - SyncOptions provide per-sync sync-options, e.g. - Validate=false - type: array - items: - type: string - manifests: - description: >- - Manifests is an optional field that overrides sync - source with a local directory for development - type: array - items: - type: string - resources: - description: >- - Resources describes which resources shall be part of the - sync - type: array - items: - description: SyncOperationResource contains resources to sync. - type: object - required: - - kind - - name - properties: - group: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - prune: - description: >- - Prune specifies to delete resources from the cluster - that are no longer tracked in git - type: boolean - syncStrategy: - description: SyncStrategy describes how to perform the sync - type: object - properties: - apply: - description: >- - Apply will perform a `kubectl apply` to perform the - sync. - type: object - properties: - force: - description: >- - Force indicates whether or not to supply the - --force flag to `kubectl apply`. The --force - flag deletes and re-create the resource, when - PATCH encounters conflict and has retried for 5 - times. - type: boolean - hook: - description: >- - Hook will submit any referenced resources to perform - the sync. This is the default strategy - type: object - properties: - force: - description: >- - Force indicates whether or not to supply the - --force flag to `kubectl apply`. The --force - flag deletes and re-create the resource, when - PATCH encounters conflict and has retried for 5 - times. - type: boolean - sources: - description: >- - Sources overrides the source definition set in the - application. This is typically set in a Rollback - operation and is nil during a Sync operation - type: array - items: - description: >- - ApplicationSource contains all required information - about the source of an application - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git - repository, and is only valid for applications - sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional labels to - add to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies whether to - apply env variables substitution for - annotation values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether to - force applying common annotations to resources - for Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to force - applying common labels to resources for - Kustomize apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of Kustomize to - use for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image override - specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize image - definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of additional - annotations to add to rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that Kustomize - adds to all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas - override specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to resources - for Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to resources - for Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the source - to sync the application to. In case of Git, this - can be commit, tag, or branch. If omitted, will - equal to HEAD. In case of Helm, this is a semver - tag for the Chart's version. - type: string - directory: - description: Directory holds path/directory specific options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match paths - against that should be explicitly excluded - from being used during manifest generation - type: string - include: - description: >- - Include contains a glob pattern to match paths - against that should be explicitly included - during manifest generation - type: string - jsonnet: - description: Jsonnet holds options specific to Jsonnet - type: object - properties: - extVars: - description: >- - ExtVars is a list of Jsonnet External - Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: >- - TLAS is a list of Jsonnet Top-level - Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a directory - recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within sources - field. This field will not be used if used with a - `source` tag. - type: string - plugin: - description: >- - Plugin holds config management plugin specific - options - type: object - properties: - env: - description: Env is a list of environment variable entries - type: array - items: - description: >- - EnvEntry represents an entry in the - application's environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, - usually expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: >- - Array is the value of an array type - parameter. - type: array - items: - type: string - map: - description: >- - Map is the value of a map type - parameter. - type: object - additionalProperties: - type: string - name: - description: >- - Name is the name identifying a - parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git or Helm) - that contains the application manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be - passed to helm template, defined as a map. - This takes precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be passed to - helm template, typically defined as a block. - ValuesObject takes precedence over Values, so - use one or the other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to the helm - template - type: array - items: - description: >- - HelmFileParameter is a file parameter that's - passed to helm template during manifest - generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing - the values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value files to - use when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters which - are passed to the helm template command upon - manifest generation - type: array - items: - description: >- - HelmParameter is a parameter that's passed - to helm template during manifest generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell - Helm to interpret booleans and numbers - as strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: >- - Value is the value for the Helm - parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all - domains (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to use. - If omitted it will use the application name - type: string - version: - description: >- - Version is the Helm version to use for - templating ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm template - from failing when valueFiles do not exist - locally by not appending them to helm template - --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource definition - installation step (Helm's --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be specified - for applications sourced from a Helm repo. - type: string - revisions: - description: >- - Revisions is the list of revision (Git) or chart version - (Helm) which to sync each source in sources field for - the application to If omitted, will use the revision - specified in app spec. - type: array - items: - type: string - source: - description: >- - Source overrides the source definition set in the - application. This is typically set in a Rollback - operation and is nil during a Sync operation - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git repository, - and is only valid for applications sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional labels to - add to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies whether to - apply env variables substitution for annotation - values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether to - force applying common annotations to resources - for Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to force - applying common labels to resources for - Kustomize apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of Kustomize to - use for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image override - specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize image - definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of additional - annotations to add to rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that Kustomize adds - to all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas - override specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to resources for - Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to resources for - Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the source to - sync the application to. In case of Git, this can be - commit, tag, or branch. If omitted, will equal to - HEAD. In case of Helm, this is a semver tag for the - Chart's version. - type: string - directory: - description: Directory holds path/directory specific options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match paths - against that should be explicitly excluded from - being used during manifest generation - type: string - include: - description: >- - Include contains a glob pattern to match paths - against that should be explicitly included - during manifest generation - type: string - jsonnet: - description: Jsonnet holds options specific to Jsonnet - type: object - properties: - extVars: - description: >- - ExtVars is a list of Jsonnet External - Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: >- - TLAS is a list of Jsonnet Top-level - Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a directory - recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within sources - field. This field will not be used if used with a - `source` tag. - type: string - plugin: - description: >- - Plugin holds config management plugin specific - options - type: object - properties: - env: - description: Env is a list of environment variable entries - type: array - items: - description: >- - EnvEntry represents an entry in the - application's environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, usually - expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: >- - Array is the value of an array type - parameter. - type: array - items: - type: string - map: - description: Map is the value of a map type parameter. - type: object - additionalProperties: - type: string - name: - description: Name is the name identifying a parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git or Helm) - that contains the application manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be passed - to helm template, defined as a map. This takes - precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be passed to - helm template, typically defined as a block. - ValuesObject takes precedence over Values, so - use one or the other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to the helm - template - type: array - items: - description: >- - HelmFileParameter is a file parameter that's - passed to helm template during manifest - generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing - the values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value files to use - when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters which - are passed to the helm template command upon - manifest generation - type: array - items: - description: >- - HelmParameter is a parameter that's passed to - helm template during manifest generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell - Helm to interpret booleans and numbers as - strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: Value is the value for the Helm parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all domains - (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to use. If - omitted it will use the application name - type: string - version: - description: >- - Version is the Helm version to use for - templating ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm template - from failing when valueFiles do not exist - locally by not appending them to helm template - --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource definition - installation step (Helm's --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be specified - for applications sourced from a Helm repo. - type: string - revision: - description: >- - Revision is the revision (Git) or chart version (Helm) - which to sync the application to If omitted, will use - the revision specified in app spec. - type: string - spec: - description: >- - ApplicationSpec represents desired application state. Contains - link to repository with application definition and additional - parameters link definition revision. - type: object - required: - - destination - - project - properties: - destination: - description: >- - Destination is a reference to the target Kubernetes server - and namespace - type: object - properties: - name: - description: >- - Name is an alternate way of specifying the target - cluster by its symbolic name. This must be set if Server - is not set. - type: string - namespace: - description: >- - Namespace specifies the target namespace for the - application's resources. The namespace will only be set - for namespace-scoped resources that have not set a value - for .metadata.namespace - type: string - server: - description: >- - Server specifies the URL of the target cluster's - Kubernetes control plane API. This must be set if Name - is not set. - type: string - ignoreDifferences: - description: >- - IgnoreDifferences is a list of resources and their fields - which should be ignored during comparison - type: array - items: - description: >- - ResourceIgnoreDifferences contains resource filter and - list of json paths which should be ignored during - comparison with live state. - type: object - required: - - kind - properties: - group: - type: string - jqPathExpressions: - type: array - items: - type: string - jsonPointers: - type: array - items: - type: string - kind: - type: string - managedFieldsManagers: - description: >- - ManagedFieldsManagers is a list of trusted managers. - Fields mutated by those managers will take precedence - over the desired state defined in the SCM and won't be - displayed in diffs - type: array - items: - type: string - name: - type: string - namespace: - type: string - info: - description: >- - Info contains a list of information (URLs, email addresses, - and plain text) that relates to the application - type: array - items: - type: object - required: - - name - - value - properties: - name: - type: string - value: - type: string - project: - description: >- - Project is a reference to the project this application - belongs to. The empty string means that application belongs - to the 'default' project. - type: string - revisionHistoryLimit: - description: >- - RevisionHistoryLimit limits the number of items kept in the - application's revision history, which is used for - informational purposes as well as for rollbacks to previous - versions. This should only be changed in exceptional - circumstances. Setting to zero will store no history. This - will reduce storage used. Increasing will increase the space - used to store the history, so we do not recommend increasing - it. Default is 10. - type: integer - format: int64 - source: - description: >- - Source is a reference to the location of the application's - manifests or chart - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git repository, and - is only valid for applications sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional labels to add - to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies whether to apply - env variables substitution for annotation values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether to force - applying common annotations to resources for - Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to force - applying common labels to resources for Kustomize - apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of Kustomize to use - for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image override - specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize image - definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of additional - annotations to add to rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that Kustomize adds to - all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas override - specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to resources for - Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to resources for - Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the source to - sync the application to. In case of Git, this can be - commit, tag, or branch. If omitted, will equal to HEAD. - In case of Helm, this is a semver tag for the Chart's - version. - type: string - directory: - description: Directory holds path/directory specific options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match paths - against that should be explicitly excluded from - being used during manifest generation - type: string - include: - description: >- - Include contains a glob pattern to match paths - against that should be explicitly included during - manifest generation - type: string - jsonnet: - description: Jsonnet holds options specific to Jsonnet - type: object - properties: - extVars: - description: ExtVars is a list of Jsonnet External Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be passed - to jsonnet during manifest generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: TLAS is a list of Jsonnet Top-level Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be passed - to jsonnet during manifest generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a directory - recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within sources field. - This field will not be used if used with a `source` tag. - type: string - plugin: - description: Plugin holds config management plugin specific options - type: object - properties: - env: - description: Env is a list of environment variable entries - type: array - items: - description: >- - EnvEntry represents an entry in the application's - environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, usually - expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: Array is the value of an array type parameter. - type: array - items: - type: string - map: - description: Map is the value of a map type parameter. - type: object - additionalProperties: - type: string - name: - description: Name is the name identifying a parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git or Helm) that - contains the application manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be passed to - helm template, defined as a map. This takes - precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be passed to helm - template, typically defined as a block. ValuesObject - takes precedence over Values, so use one or the - other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to the helm - template - type: array - items: - description: >- - HelmFileParameter is a file parameter that's - passed to helm template during manifest generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing the - values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value files to use - when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters which are - passed to the helm template command upon manifest - generation - type: array - items: - description: >- - HelmParameter is a parameter that's passed to helm - template during manifest generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell Helm to - interpret booleans and numbers as strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: Value is the value for the Helm parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all domains - (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to use. If - omitted it will use the application name - type: string - version: - description: >- - Version is the Helm version to use for templating - ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm template from - failing when valueFiles do not exist locally by not - appending them to helm template --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource definition - installation step (Helm's --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be specified for - applications sourced from a Helm repo. - type: string - sources: - description: >- - Sources is a reference to the location of the application's - manifests or chart - type: array - items: - description: >- - ApplicationSource contains all required information about - the source of an application - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git repository, - and is only valid for applications sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional labels to add - to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies whether to - apply env variables substitution for annotation - values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether to force - applying common annotations to resources for - Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to force - applying common labels to resources for Kustomize - apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of Kustomize to use - for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image override - specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize image - definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of additional - annotations to add to rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that Kustomize adds - to all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas override - specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to resources for - Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to resources for - Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the source to - sync the application to. In case of Git, this can be - commit, tag, or branch. If omitted, will equal to - HEAD. In case of Helm, this is a semver tag for the - Chart's version. - type: string - directory: - description: Directory holds path/directory specific options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match paths - against that should be explicitly excluded from - being used during manifest generation - type: string - include: - description: >- - Include contains a glob pattern to match paths - against that should be explicitly included during - manifest generation - type: string - jsonnet: - description: Jsonnet holds options specific to Jsonnet - type: object - properties: - extVars: - description: >- - ExtVars is a list of Jsonnet External - Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: TLAS is a list of Jsonnet Top-level Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a directory - recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within sources - field. This field will not be used if used with a - `source` tag. - type: string - plugin: - description: Plugin holds config management plugin specific options - type: object - properties: - env: - description: Env is a list of environment variable entries - type: array - items: - description: >- - EnvEntry represents an entry in the - application's environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, usually - expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: >- - Array is the value of an array type - parameter. - type: array - items: - type: string - map: - description: Map is the value of a map type parameter. - type: object - additionalProperties: - type: string - name: - description: Name is the name identifying a parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git or Helm) - that contains the application manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be passed to - helm template, defined as a map. This takes - precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be passed to helm - template, typically defined as a block. - ValuesObject takes precedence over Values, so use - one or the other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to the helm - template - type: array - items: - description: >- - HelmFileParameter is a file parameter that's - passed to helm template during manifest - generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing the - values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value files to use - when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters which are - passed to the helm template command upon manifest - generation - type: array - items: - description: >- - HelmParameter is a parameter that's passed to - helm template during manifest generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell Helm - to interpret booleans and numbers as strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: Value is the value for the Helm parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all domains - (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to use. If - omitted it will use the application name - type: string - version: - description: >- - Version is the Helm version to use for templating - ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm template - from failing when valueFiles do not exist locally - by not appending them to helm template --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource definition - installation step (Helm's --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be specified for - applications sourced from a Helm repo. - type: string - syncPolicy: - description: SyncPolicy controls when and how a sync will be performed - type: object - properties: - automated: - description: >- - Automated will keep an application synced to the target - revision - type: object - properties: - allowEmpty: - description: >- - AllowEmpty allows apps have zero live resources - (default: false) - type: boolean - prune: - description: >- - Prune specifies whether to delete resources from the - cluster that are not found in the sources anymore as - part of automated sync (default: false) - type: boolean - selfHeal: - description: >- - SelfHeal specifies whether to revert resources back - to their desired state upon modification in the - cluster (default: false) - type: boolean - managedNamespaceMetadata: - description: >- - ManagedNamespaceMetadata controls metadata in the given - namespace (if CreateNamespace=true) - type: object - properties: - annotations: - type: object - additionalProperties: - type: string - labels: - type: object - additionalProperties: - type: string - retry: - description: Retry controls failed sync retry behavior - type: object - properties: - backoff: - description: >- - Backoff controls how to backoff on subsequent - retries of failed syncs - type: object - properties: - duration: - description: >- - Duration is the amount to back off. Default unit - is seconds, but could also be a duration (e.g. - "2m", "1h") - type: string - factor: - description: >- - Factor is a factor to multiply the base duration - after each failed retry - type: integer - format: int64 - maxDuration: - description: >- - MaxDuration is the maximum amount of time - allowed for the backoff strategy - type: string - limit: - description: >- - Limit is the maximum number of attempts for retrying - a failed sync. If set to 0, no retries will be - performed. - type: integer - format: int64 - syncOptions: - description: Options allow you to specify whole app sync-options - type: array - items: - type: string - status: - description: >- - ApplicationStatus contains status information for the - application - type: object - properties: - resourceHealthSource: - description: >- - ResourceHealthSource indicates where the resource health - status is stored: inline if not set or appTree - type: string - resources: - description: >- - Resources is a list of Kubernetes resources managed by this - application - type: array - items: - description: >- - ResourceStatus holds the current sync and health status of - a resource TODO: describe members of this type - type: object - properties: - hook: - type: boolean - name: - type: string - status: - description: >- - SyncStatusCode is a type which represents possible - comparison results - type: string - syncWave: - type: integer - format: int64 - kind: - type: string - version: - type: string - requiresPruning: - type: boolean - namespace: - type: string - health: - description: >- - HealthStatus contains information about the currently - observed health state of an application or resource - type: object - properties: - message: - description: >- - Message is a human-readable informational message - describing the health status - type: string - status: - description: >- - Status holds the status code of the application or - resource - type: string - group: - type: string - summary: - description: >- - Summary contains a list of URLs and container images used by - this application - type: object - properties: - externalURLs: - description: >- - ExternalURLs holds all external URLs of application - child resources. - type: array - items: - type: string - images: - description: Images holds all images of application child resources. - type: array - items: - type: string - reconciledAt: - description: >- - ReconciledAt indicates when the application state was - reconciled using the latest git version - type: string - format: date-time - operationState: - description: >- - OperationState contains information about any ongoing - operations, such as a sync - type: object - required: - - operation - - phase - - startedAt - properties: - finishedAt: - description: FinishedAt contains time of operation completion - type: string - format: date-time - message: - description: >- - Message holds any pertinent messages when attempting to - perform operation (typically errors). - type: string - operation: - description: Operation is the original requested operation - type: object - properties: - info: - description: >- - Info is a list of informational items for this - operation - type: array - items: - type: object - required: - - name - - value - properties: - name: - type: string - value: - type: string - initiatedBy: - description: >- - InitiatedBy contains information about who initiated - the operations - type: object - properties: - automated: - description: >- - Automated is set to true if operation was - initiated automatically by the application - controller. - type: boolean - username: - description: >- - Username contains the name of a user who started - operation - type: string - retry: - description: Retry controls the strategy to apply if a sync fails - type: object - properties: - backoff: - description: >- - Backoff controls how to backoff on subsequent - retries of failed syncs - type: object - properties: - duration: - description: >- - Duration is the amount to back off. Default - unit is seconds, but could also be a - duration (e.g. "2m", "1h") - type: string - factor: - description: >- - Factor is a factor to multiply the base - duration after each failed retry - type: integer - format: int64 - maxDuration: - description: >- - MaxDuration is the maximum amount of time - allowed for the backoff strategy - type: string - limit: - description: >- - Limit is the maximum number of attempts for - retrying a failed sync. If set to 0, no retries - will be performed. - type: integer - format: int64 - sync: - description: Sync contains parameters for the operation - type: object - properties: - dryRun: - description: >- - DryRun specifies to perform a `kubectl apply - --dry-run` without actually performing the sync - type: boolean - syncOptions: - description: >- - SyncOptions provide per-sync sync-options, e.g. - Validate=false - type: array - items: - type: string - manifests: - description: >- - Manifests is an optional field that overrides - sync source with a local directory for - development - type: array - items: - type: string - resources: - description: >- - Resources describes which resources shall be - part of the sync - type: array - items: - description: >- - SyncOperationResource contains resources to - sync. - type: object - required: - - kind - - name - properties: - group: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - prune: - description: >- - Prune specifies to delete resources from the - cluster that are no longer tracked in git - type: boolean - syncStrategy: - description: SyncStrategy describes how to perform the sync - type: object - properties: - apply: - description: >- - Apply will perform a `kubectl apply` to - perform the sync. - type: object - properties: - force: - description: >- - Force indicates whether or not to supply - the --force flag to `kubectl apply`. The - --force flag deletes and re-create the - resource, when PATCH encounters conflict - and has retried for 5 times. - type: boolean - hook: - description: >- - Hook will submit any referenced resources to - perform the sync. This is the default - strategy - type: object - properties: - force: - description: >- - Force indicates whether or not to supply - the --force flag to `kubectl apply`. The - --force flag deletes and re-create the - resource, when PATCH encounters conflict - and has retried for 5 times. - type: boolean - sources: - description: >- - Sources overrides the source definition set in - the application. This is typically set in a - Rollback operation and is nil during a Sync - operation - type: array - items: - description: >- - ApplicationSource contains all required - information about the source of an application - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git - repository, and is only valid for - applications sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional - labels to add to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies - whether to apply env variables - substitution for annotation values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether - to force applying common annotations to - resources for Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to - force applying common labels to - resources for Kustomize apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of - Kustomize to use for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image - override specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize - image definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of - additional annotations to add to - rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that - Kustomize adds to all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas - override specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to - resources for Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to - resources for Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the - source to sync the application to. In case - of Git, this can be commit, tag, or - branch. If omitted, will equal to HEAD. In - case of Helm, this is a semver tag for the - Chart's version. - type: string - directory: - description: >- - Directory holds path/directory specific - options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match - paths against that should be explicitly - excluded from being used during manifest - generation - type: string - include: - description: >- - Include contains a glob pattern to match - paths against that should be explicitly - included during manifest generation - type: string - jsonnet: - description: >- - Jsonnet holds options specific to - Jsonnet - type: object - properties: - extVars: - description: >- - ExtVars is a list of Jsonnet External - Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: >- - TLAS is a list of Jsonnet Top-level - Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a - directory recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within - sources field. This field will not be used - if used with a `source` tag. - type: string - plugin: - description: >- - Plugin holds config management plugin - specific options - type: object - properties: - env: - description: >- - Env is a list of environment variable - entries - type: array - items: - description: >- - EnvEntry represents an entry in the - application's environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, - usually expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: >- - Array is the value of an array type - parameter. - type: array - items: - type: string - map: - description: >- - Map is the value of a map type - parameter. - type: object - additionalProperties: - type: string - name: - description: >- - Name is the name identifying a - parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git - or Helm) that contains the application - manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be - passed to helm template, defined as a - map. This takes precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be - passed to helm template, typically - defined as a block. ValuesObject takes - precedence over Values, so use one or - the other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to - the helm template - type: array - items: - description: >- - HelmFileParameter is a file parameter - that's passed to helm template during - manifest generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing - the values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value - files to use when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters - which are passed to the helm template - command upon manifest generation - type: array - items: - description: >- - HelmParameter is a parameter that's - passed to helm template during manifest - generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell - Helm to interpret booleans and numbers - as strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: >- - Value is the value for the Helm - parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all - domains (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to - use. If omitted it will use the - application name - type: string - version: - description: >- - Version is the Helm version to use for - templating ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm - template from failing when valueFiles do - not exist locally by not appending them - to helm template --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource - definition installation step (Helm's - --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be - specified for applications sourced from a - Helm repo. - type: string - revisions: - description: >- - Revisions is the list of revision (Git) or chart - version (Helm) which to sync each source in - sources field for the application to If omitted, - will use the revision specified in app spec. - type: array - items: - type: string - source: - description: >- - Source overrides the source definition set in - the application. This is typically set in a - Rollback operation and is nil during a Sync - operation - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git - repository, and is only valid for - applications sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional - labels to add to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies - whether to apply env variables - substitution for annotation values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether - to force applying common annotations to - resources for Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to - force applying common labels to - resources for Kustomize apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of - Kustomize to use for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image - override specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize - image definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of - additional annotations to add to - rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that - Kustomize adds to all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas - override specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to - resources for Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to - resources for Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the - source to sync the application to. In case - of Git, this can be commit, tag, or branch. - If omitted, will equal to HEAD. In case of - Helm, this is a semver tag for the Chart's - version. - type: string - directory: - description: >- - Directory holds path/directory specific - options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match - paths against that should be explicitly - excluded from being used during manifest - generation - type: string - include: - description: >- - Include contains a glob pattern to match - paths against that should be explicitly - included during manifest generation - type: string - jsonnet: - description: >- - Jsonnet holds options specific to - Jsonnet - type: object - properties: - extVars: - description: >- - ExtVars is a list of Jsonnet External - Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: >- - TLAS is a list of Jsonnet Top-level - Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a - directory recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within - sources field. This field will not be used - if used with a `source` tag. - type: string - plugin: - description: >- - Plugin holds config management plugin - specific options - type: object - properties: - env: - description: >- - Env is a list of environment variable - entries - type: array - items: - description: >- - EnvEntry represents an entry in the - application's environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, - usually expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: >- - Array is the value of an array type - parameter. - type: array - items: - type: string - map: - description: >- - Map is the value of a map type - parameter. - type: object - additionalProperties: - type: string - name: - description: >- - Name is the name identifying a - parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git or - Helm) that contains the application - manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be - passed to helm template, defined as a - map. This takes precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be - passed to helm template, typically - defined as a block. ValuesObject takes - precedence over Values, so use one or - the other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to - the helm template - type: array - items: - description: >- - HelmFileParameter is a file parameter - that's passed to helm template during - manifest generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing - the values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value - files to use when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters - which are passed to the helm template - command upon manifest generation - type: array - items: - description: >- - HelmParameter is a parameter that's - passed to helm template during manifest - generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell - Helm to interpret booleans and numbers - as strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: >- - Value is the value for the Helm - parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all - domains (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to - use. If omitted it will use the - application name - type: string - version: - description: >- - Version is the Helm version to use for - templating ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm - template from failing when valueFiles do - not exist locally by not appending them - to helm template --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource - definition installation step (Helm's - --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be - specified for applications sourced from a - Helm repo. - type: string - revision: - description: >- - Revision is the revision (Git) or chart version - (Helm) which to sync the application to If - omitted, will use the revision specified in app - spec. - type: string - phase: - description: Phase is the current phase of the operation - type: string - retryCount: - description: RetryCount contains time of operation retries - type: integer - format: int64 - startedAt: - description: StartedAt contains time of operation start - type: string - format: date-time - syncResult: - description: SyncResult is the result of a Sync operation - type: object - required: - - revision - properties: - managedNamespaceMetadata: - description: >- - ManagedNamespaceMetadata contains the current sync - state of managed namespace metadata - type: object - properties: - annotations: - type: object - additionalProperties: - type: string - labels: - type: object - additionalProperties: - type: string - resources: - description: >- - Resources contains a list of sync result items for - each individual resource in a sync operation - type: array - items: - description: >- - ResourceResult holds the operation result details - of a specific resource - type: object - required: - - group - - kind - - name - - namespace - - version - properties: - syncPhase: - description: >- - SyncPhase indicates the particular phase of - the sync that this result was acquired in - type: string - message: - description: >- - Message contains an informational or error - message for the last sync OR operation - type: string - name: - description: Name specifies the name of the resource - type: string - status: - description: >- - Status holds the final result of the sync. - Will be empty if the resources is yet to be - applied/pruned and is always zero-value for - hooks - type: string - kind: - description: Kind specifies the API kind of the resource - type: string - version: - description: >- - Version specifies the API version of the - resource - type: string - hookPhase: - description: >- - HookPhase contains the state of any operation - associated with this resource OR hook This can - also contain values for non-hook resources. - type: string - namespace: - description: >- - Namespace specifies the target namespace of - the resource - type: string - hookType: - description: >- - HookType specifies the type of the hook. Empty - for non-hook resources - type: string - group: - description: Group specifies the API group of the resource - type: string - revision: - description: >- - Revision holds the revision this sync operation was - performed to - type: string - revisions: - description: >- - Revisions holds the revision this sync operation was - performed for respective indexed source in sources - field - type: array - items: - type: string - source: - description: >- - Source records the application source information of - the sync, used for comparing auto-sync - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git - repository, and is only valid for applications - sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional labels - to add to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies whether - to apply env variables substitution for - annotation values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether to - force applying common annotations to - resources for Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to force - applying common labels to resources for - Kustomize apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of Kustomize - to use for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image override - specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize - image definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of additional - annotations to add to rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that Kustomize - adds to all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas - override specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to resources - for Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to resources - for Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the - source to sync the application to. In case of - Git, this can be commit, tag, or branch. If - omitted, will equal to HEAD. In case of Helm, - this is a semver tag for the Chart's version. - type: string - directory: - description: Directory holds path/directory specific options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match - paths against that should be explicitly - excluded from being used during manifest - generation - type: string - include: - description: >- - Include contains a glob pattern to match - paths against that should be explicitly - included during manifest generation - type: string - jsonnet: - description: Jsonnet holds options specific to Jsonnet - type: object - properties: - extVars: - description: >- - ExtVars is a list of Jsonnet External - Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: >- - TLAS is a list of Jsonnet Top-level - Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a - directory recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within - sources field. This field will not be used if - used with a `source` tag. - type: string - plugin: - description: >- - Plugin holds config management plugin specific - options - type: object - properties: - env: - description: >- - Env is a list of environment variable - entries - type: array - items: - description: >- - EnvEntry represents an entry in the - application's environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, - usually expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: >- - Array is the value of an array type - parameter. - type: array - items: - type: string - map: - description: >- - Map is the value of a map type - parameter. - type: object - additionalProperties: - type: string - name: - description: >- - Name is the name identifying a - parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git or - Helm) that contains the application manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be - passed to helm template, defined as a map. - This takes precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be passed to - helm template, typically defined as a block. - ValuesObject takes precedence over Values, - so use one or the other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to the - helm template - type: array - items: - description: >- - HelmFileParameter is a file parameter - that's passed to helm template during - manifest generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing - the values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value files to - use when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters - which are passed to the helm template - command upon manifest generation - type: array - items: - description: >- - HelmParameter is a parameter that's passed - to helm template during manifest - generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell - Helm to interpret booleans and numbers - as strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: >- - Value is the value for the Helm - parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all - domains (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to use. - If omitted it will use the application name - type: string - version: - description: >- - Version is the Helm version to use for - templating ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm - template from failing when valueFiles do not - exist locally by not appending them to helm - template --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource definition - installation step (Helm's --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be - specified for applications sourced from a Helm - repo. - type: string - sources: - description: >- - Source records the application source information of - the sync, used for comparing auto-sync - type: array - items: - description: >- - ApplicationSource contains all required - information about the source of an application - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git - repository, and is only valid for applications - sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional - labels to add to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies - whether to apply env variables - substitution for annotation values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether - to force applying common annotations to - resources for Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to - force applying common labels to resources - for Kustomize apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of - Kustomize to use for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image - override specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize - image definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of additional - annotations to add to rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that - Kustomize adds to all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas - override specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to - resources for Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to - resources for Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the - source to sync the application to. In case of - Git, this can be commit, tag, or branch. If - omitted, will equal to HEAD. In case of Helm, - this is a semver tag for the Chart's version. - type: string - directory: - description: >- - Directory holds path/directory specific - options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match - paths against that should be explicitly - excluded from being used during manifest - generation - type: string - include: - description: >- - Include contains a glob pattern to match - paths against that should be explicitly - included during manifest generation - type: string - jsonnet: - description: Jsonnet holds options specific to Jsonnet - type: object - properties: - extVars: - description: >- - ExtVars is a list of Jsonnet External - Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: >- - TLAS is a list of Jsonnet Top-level - Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a - directory recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within - sources field. This field will not be used if - used with a `source` tag. - type: string - plugin: - description: >- - Plugin holds config management plugin specific - options - type: object - properties: - env: - description: >- - Env is a list of environment variable - entries - type: array - items: - description: >- - EnvEntry represents an entry in the - application's environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, - usually expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: >- - Array is the value of an array type - parameter. - type: array - items: - type: string - map: - description: >- - Map is the value of a map type - parameter. - type: object - additionalProperties: - type: string - name: - description: >- - Name is the name identifying a - parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git or - Helm) that contains the application manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be - passed to helm template, defined as a map. - This takes precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be passed - to helm template, typically defined as a - block. ValuesObject takes precedence over - Values, so use one or the other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to the - helm template - type: array - items: - description: >- - HelmFileParameter is a file parameter - that's passed to helm template during - manifest generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing - the values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value files - to use when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters - which are passed to the helm template - command upon manifest generation - type: array - items: - description: >- - HelmParameter is a parameter that's - passed to helm template during manifest - generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell - Helm to interpret booleans and numbers - as strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: >- - Value is the value for the Helm - parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all - domains (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to - use. If omitted it will use the - application name - type: string - version: - description: >- - Version is the Helm version to use for - templating ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm - template from failing when valueFiles do - not exist locally by not appending them to - helm template --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource definition - installation step (Helm's --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be - specified for applications sourced from a Helm - repo. - type: string - history: - description: >- - History contains information about the application's sync - history - type: array - items: - description: >- - RevisionHistory contains history information about a - previous sync - type: object - required: - - deployedAt - - id - properties: - deployStartedAt: - description: >- - DeployStartedAt holds the time the sync operation - started - type: string - format: date-time - deployedAt: - description: DeployedAt holds the time the sync operation completed - type: string - format: date-time - id: - description: >- - ID is an auto incrementing identifier of the - RevisionHistory - type: integer - format: int64 - revision: - description: >- - Revision holds the revision the sync was performed - against - type: string - revisions: - description: >- - Revisions holds the revision of each source in sources - field the sync was performed against - type: array - items: - type: string - source: - description: >- - Source is a reference to the application source used - for the sync operation - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git - repository, and is only valid for applications - sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional labels to - add to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies whether to - apply env variables substitution for - annotation values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether to - force applying common annotations to resources - for Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to force - applying common labels to resources for - Kustomize apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of Kustomize to - use for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image override - specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize image - definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of additional - annotations to add to rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that Kustomize - adds to all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas - override specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to resources - for Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to resources - for Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the source - to sync the application to. In case of Git, this - can be commit, tag, or branch. If omitted, will - equal to HEAD. In case of Helm, this is a semver - tag for the Chart's version. - type: string - directory: - description: Directory holds path/directory specific options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match paths - against that should be explicitly excluded - from being used during manifest generation - type: string - include: - description: >- - Include contains a glob pattern to match paths - against that should be explicitly included - during manifest generation - type: string - jsonnet: - description: Jsonnet holds options specific to Jsonnet - type: object - properties: - extVars: - description: >- - ExtVars is a list of Jsonnet External - Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: >- - TLAS is a list of Jsonnet Top-level - Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a directory - recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within sources - field. This field will not be used if used with a - `source` tag. - type: string - plugin: - description: >- - Plugin holds config management plugin specific - options - type: object - properties: - env: - description: Env is a list of environment variable entries - type: array - items: - description: >- - EnvEntry represents an entry in the - application's environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, - usually expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: >- - Array is the value of an array type - parameter. - type: array - items: - type: string - map: - description: >- - Map is the value of a map type - parameter. - type: object - additionalProperties: - type: string - name: - description: >- - Name is the name identifying a - parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git or Helm) - that contains the application manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be - passed to helm template, defined as a map. - This takes precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be passed to - helm template, typically defined as a block. - ValuesObject takes precedence over Values, so - use one or the other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to the helm - template - type: array - items: - description: >- - HelmFileParameter is a file parameter that's - passed to helm template during manifest - generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing - the values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value files to - use when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters which - are passed to the helm template command upon - manifest generation - type: array - items: - description: >- - HelmParameter is a parameter that's passed - to helm template during manifest generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell - Helm to interpret booleans and numbers - as strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: >- - Value is the value for the Helm - parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all - domains (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to use. - If omitted it will use the application name - type: string - version: - description: >- - Version is the Helm version to use for - templating ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm template - from failing when valueFiles do not exist - locally by not appending them to helm template - --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource definition - installation step (Helm's --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be specified - for applications sourced from a Helm repo. - type: string - sources: - description: >- - Sources is a reference to the application sources used - for the sync operation - type: array - items: - description: >- - ApplicationSource contains all required information - about the source of an application - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git - repository, and is only valid for applications - sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional labels - to add to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies whether - to apply env variables substitution for - annotation values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether to - force applying common annotations to - resources for Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to force - applying common labels to resources for - Kustomize apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of Kustomize - to use for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image override - specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize - image definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of additional - annotations to add to rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that Kustomize - adds to all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas - override specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to resources - for Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to resources - for Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the - source to sync the application to. In case of - Git, this can be commit, tag, or branch. If - omitted, will equal to HEAD. In case of Helm, - this is a semver tag for the Chart's version. - type: string - directory: - description: Directory holds path/directory specific options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match - paths against that should be explicitly - excluded from being used during manifest - generation - type: string - include: - description: >- - Include contains a glob pattern to match - paths against that should be explicitly - included during manifest generation - type: string - jsonnet: - description: Jsonnet holds options specific to Jsonnet - type: object - properties: - extVars: - description: >- - ExtVars is a list of Jsonnet External - Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: >- - TLAS is a list of Jsonnet Top-level - Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a - directory recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within - sources field. This field will not be used if - used with a `source` tag. - type: string - plugin: - description: >- - Plugin holds config management plugin specific - options - type: object - properties: - env: - description: >- - Env is a list of environment variable - entries - type: array - items: - description: >- - EnvEntry represents an entry in the - application's environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, - usually expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: >- - Array is the value of an array type - parameter. - type: array - items: - type: string - map: - description: >- - Map is the value of a map type - parameter. - type: object - additionalProperties: - type: string - name: - description: >- - Name is the name identifying a - parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git or - Helm) that contains the application manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be - passed to helm template, defined as a map. - This takes precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be passed to - helm template, typically defined as a block. - ValuesObject takes precedence over Values, - so use one or the other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to the - helm template - type: array - items: - description: >- - HelmFileParameter is a file parameter - that's passed to helm template during - manifest generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing - the values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value files to - use when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters - which are passed to the helm template - command upon manifest generation - type: array - items: - description: >- - HelmParameter is a parameter that's passed - to helm template during manifest - generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell - Helm to interpret booleans and numbers - as strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: >- - Value is the value for the Helm - parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all - domains (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to use. - If omitted it will use the application name - type: string - version: - description: >- - Version is the Helm version to use for - templating ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm - template from failing when valueFiles do not - exist locally by not appending them to helm - template --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource definition - installation step (Helm's --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be - specified for applications sourced from a Helm - repo. - type: string - sourceType: - description: SourceType specifies the type of this application - type: string - conditions: - description: >- - Conditions is a list of currently observed application - conditions - type: array - items: - description: >- - ApplicationCondition contains details about an application - condition, which is usually an error or warning - type: object - required: - - message - - type - properties: - lastTransitionTime: - description: >- - LastTransitionTime is the time the condition was last - observed - type: string - format: date-time - message: - description: >- - Message contains human-readable message indicating - details about condition - type: string - type: - description: Type is an application condition type - type: string - observedAt: - description: >- - ObservedAt indicates when the application state was updated - without querying latest git state Deprecated: controller no - longer updates ObservedAt field - type: string - format: date-time - sync: - description: >- - Sync contains information about the application's current - sync status - type: object - required: - - status - properties: - comparedTo: - description: >- - ComparedTo contains information about what has been - compared - type: object - required: - - destination - properties: - destination: - description: >- - Destination is a reference to the application's - destination used for comparison - type: object - properties: - name: - description: >- - Name is an alternate way of specifying the - target cluster by its symbolic name. This must - be set if Server is not set. - type: string - namespace: - description: >- - Namespace specifies the target namespace for the - application's resources. The namespace will only - be set for namespace-scoped resources that have - not set a value for .metadata.namespace - type: string - server: - description: >- - Server specifies the URL of the target cluster's - Kubernetes control plane API. This must be set - if Name is not set. - type: string - ignoreDifferences: - description: >- - IgnoreDifferences is a reference to the - application's ignored differences used for - comparison - type: array - items: - description: >- - ResourceIgnoreDifferences contains resource filter - and list of json paths which should be ignored - during comparison with live state. - type: object - required: - - kind - properties: - group: - type: string - jqPathExpressions: - type: array - items: - type: string - jsonPointers: - type: array - items: - type: string - kind: - type: string - managedFieldsManagers: - description: >- - ManagedFieldsManagers is a list of trusted - managers. Fields mutated by those managers - will take precedence over the desired state - defined in the SCM and won't be displayed in - diffs - type: array - items: - type: string - name: - type: string - namespace: - type: string - source: - description: >- - Source is a reference to the application's source - used for comparison - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git - repository, and is only valid for applications - sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional labels - to add to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies whether - to apply env variables substitution for - annotation values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether to - force applying common annotations to - resources for Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to force - applying common labels to resources for - Kustomize apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of Kustomize - to use for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image override - specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize - image definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of additional - annotations to add to rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that Kustomize - adds to all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas - override specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to resources - for Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to resources - for Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the - source to sync the application to. In case of - Git, this can be commit, tag, or branch. If - omitted, will equal to HEAD. In case of Helm, - this is a semver tag for the Chart's version. - type: string - directory: - description: Directory holds path/directory specific options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match - paths against that should be explicitly - excluded from being used during manifest - generation - type: string - include: - description: >- - Include contains a glob pattern to match - paths against that should be explicitly - included during manifest generation - type: string - jsonnet: - description: Jsonnet holds options specific to Jsonnet - type: object - properties: - extVars: - description: >- - ExtVars is a list of Jsonnet External - Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: >- - TLAS is a list of Jsonnet Top-level - Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a - directory recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within - sources field. This field will not be used if - used with a `source` tag. - type: string - plugin: - description: >- - Plugin holds config management plugin specific - options - type: object - properties: - env: - description: >- - Env is a list of environment variable - entries - type: array - items: - description: >- - EnvEntry represents an entry in the - application's environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, - usually expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: >- - Array is the value of an array type - parameter. - type: array - items: - type: string - map: - description: >- - Map is the value of a map type - parameter. - type: object - additionalProperties: - type: string - name: - description: >- - Name is the name identifying a - parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git or - Helm) that contains the application manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be - passed to helm template, defined as a map. - This takes precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be passed to - helm template, typically defined as a block. - ValuesObject takes precedence over Values, - so use one or the other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to the - helm template - type: array - items: - description: >- - HelmFileParameter is a file parameter - that's passed to helm template during - manifest generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing - the values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value files to - use when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters - which are passed to the helm template - command upon manifest generation - type: array - items: - description: >- - HelmParameter is a parameter that's passed - to helm template during manifest - generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell - Helm to interpret booleans and numbers - as strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: >- - Value is the value for the Helm - parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all - domains (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to use. - If omitted it will use the application name - type: string - version: - description: >- - Version is the Helm version to use for - templating ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm - template from failing when valueFiles do not - exist locally by not appending them to helm - template --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource definition - installation step (Helm's --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be - specified for applications sourced from a Helm - repo. - type: string - sources: - description: >- - Sources is a reference to the application's multiple - sources used for comparison - type: array - items: - description: >- - ApplicationSource contains all required - information about the source of an application - type: object - required: - - repoURL - properties: - path: - description: >- - Path is a directory path within the Git - repository, and is only valid for applications - sourced from Git. - type: string - kustomize: - description: Kustomize holds kustomize specific options - type: object - properties: - commonLabels: - description: >- - CommonLabels is a list of additional - labels to add to rendered manifests - type: object - additionalProperties: - type: string - commonAnnotationsEnvsubst: - description: >- - CommonAnnotationsEnvsubst specifies - whether to apply env variables - substitution for annotation values - type: boolean - forceCommonAnnotations: - description: >- - ForceCommonAnnotations specifies whether - to force applying common annotations to - resources for Kustomize apps - type: boolean - forceCommonLabels: - description: >- - ForceCommonLabels specifies whether to - force applying common labels to resources - for Kustomize apps - type: boolean - patches: - description: Patches is a list of Kustomize patches - type: array - items: - type: object - properties: - options: - type: object - additionalProperties: - type: boolean - patch: - type: string - path: - type: string - target: - type: object - properties: - annotationSelector: - type: string - group: - type: string - kind: - type: string - labelSelector: - type: string - name: - type: string - namespace: - type: string - version: - type: string - version: - description: >- - Version controls which version of - Kustomize to use for rendering manifests - type: string - images: - description: >- - Images is a list of Kustomize image - override specifications - type: array - items: - description: >- - KustomizeImage represents a Kustomize - image definition in the format - [old_image_name=]: - type: string - commonAnnotations: - description: >- - CommonAnnotations is a list of additional - annotations to add to rendered manifests - type: object - additionalProperties: - type: string - namespace: - description: >- - Namespace sets the namespace that - Kustomize adds to all resources - type: string - replicas: - description: >- - Replicas is a list of Kustomize Replicas - override specifications - type: array - items: - type: object - required: - - count - - name - properties: - count: - description: Number of replicas - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true - name: - description: Name of Deployment or StatefulSet - type: string - nameSuffix: - description: >- - NameSuffix is a suffix appended to - resources for Kustomize apps - type: string - namePrefix: - description: >- - NamePrefix is a prefix appended to - resources for Kustomize apps - type: string - targetRevision: - description: >- - TargetRevision defines the revision of the - source to sync the application to. In case of - Git, this can be commit, tag, or branch. If - omitted, will equal to HEAD. In case of Helm, - this is a semver tag for the Chart's version. - type: string - directory: - description: >- - Directory holds path/directory specific - options - type: object - properties: - exclude: - description: >- - Exclude contains a glob pattern to match - paths against that should be explicitly - excluded from being used during manifest - generation - type: string - include: - description: >- - Include contains a glob pattern to match - paths against that should be explicitly - included during manifest generation - type: string - jsonnet: - description: Jsonnet holds options specific to Jsonnet - type: object - properties: - extVars: - description: >- - ExtVars is a list of Jsonnet External - Variables - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - libs: - description: Additional library search dirs - type: array - items: - type: string - tlas: - description: >- - TLAS is a list of Jsonnet Top-level - Arguments - type: array - items: - description: >- - JsonnetVar represents a variable to be - passed to jsonnet during manifest - generation - type: object - required: - - name - - value - properties: - code: - type: boolean - name: - type: string - value: - type: string - recurse: - description: >- - Recurse specifies whether to scan a - directory recursively for manifests - type: boolean - ref: - description: >- - Ref is reference to another source within - sources field. This field will not be used if - used with a `source` tag. - type: string - plugin: - description: >- - Plugin holds config management plugin specific - options - type: object - properties: - env: - description: >- - Env is a list of environment variable - entries - type: array - items: - description: >- - EnvEntry represents an entry in the - application's environment - type: object - required: - - name - - value - properties: - name: - description: >- - Name is the name of the variable, - usually expressed in uppercase - type: string - value: - description: Value is the value of the variable - type: string - name: - type: string - parameters: - type: array - items: - type: object - properties: - array: - description: >- - Array is the value of an array type - parameter. - type: array - items: - type: string - map: - description: >- - Map is the value of a map type - parameter. - type: object - additionalProperties: - type: string - name: - description: >- - Name is the name identifying a - parameter. - type: string - string: - description: >- - String_ is the value of a string type - parameter. - type: string - repoURL: - description: >- - RepoURL is the URL to the repository (Git or - Helm) that contains the application manifests - type: string - helm: - description: Helm holds helm specific options - type: object - properties: - valuesObject: - description: >- - ValuesObject specifies Helm values to be - passed to helm template, defined as a map. - This takes precedence over Values. - type: object - x-kubernetes-preserve-unknown-fields: true - values: - description: >- - Values specifies Helm values to be passed - to helm template, typically defined as a - block. ValuesObject takes precedence over - Values, so use one or the other. - type: string - fileParameters: - description: >- - FileParameters are file parameters to the - helm template - type: array - items: - description: >- - HelmFileParameter is a file parameter - that's passed to helm template during - manifest generation - type: object - properties: - name: - description: Name is the name of the Helm parameter - type: string - path: - description: >- - Path is the path to the file containing - the values for the Helm parameter - type: string - valueFiles: - description: >- - ValuesFiles is a list of Helm value files - to use when generating a template - type: array - items: - type: string - parameters: - description: >- - Parameters is a list of Helm parameters - which are passed to the helm template - command upon manifest generation - type: array - items: - description: >- - HelmParameter is a parameter that's - passed to helm template during manifest - generation - type: object - properties: - forceString: - description: >- - ForceString determines whether to tell - Helm to interpret booleans and numbers - as strings - type: boolean - name: - description: Name is the name of the Helm parameter - type: string - value: - description: >- - Value is the value for the Helm - parameter - type: string - passCredentials: - description: >- - PassCredentials pass credentials to all - domains (Helm's --pass-credentials) - type: boolean - releaseName: - description: >- - ReleaseName is the Helm release name to - use. If omitted it will use the - application name - type: string - version: - description: >- - Version is the Helm version to use for - templating ("3") - type: string - ignoreMissingValueFiles: - description: >- - IgnoreMissingValueFiles prevents helm - template from failing when valueFiles do - not exist locally by not appending them to - helm template --values - type: boolean - skipCrds: - description: >- - SkipCrds skips custom resource definition - installation step (Helm's --skip-crds) - type: boolean - chart: - description: >- - Chart is a Helm chart name, and must be - specified for applications sourced from a Helm - repo. - type: string - revision: - description: >- - Revision contains information about the revision the - comparison has been performed to - type: string - revisions: - description: >- - Revisions contains information about the revisions of - multiple sources the comparison has been performed to - type: array - items: - type: string - status: - description: Status is the sync state of the comparison - type: string - health: - description: >- - Health contains information about the application's current - health status - type: object - properties: - message: - description: >- - Message is a human-readable informational message - describing the health status - type: string - status: - description: >- - Status holds the status code of the application or - resource - type: string - sourceTypes: - description: >- - SourceTypes specifies the type of the sources included in - the application - type: array - items: - description: >- - ApplicationSourceType specifies the type of the - application's source - type: string - controllerNamespace: - description: >- - ControllerNamespace indicates the namespace in which the - application controller is located - type: string - subresources: {} - additionalPrinterColumns: - - name: Sync Status - type: string - jsonPath: .status.sync.status - - name: Health Status - type: string - jsonPath: .status.health.status - - name: Revision - type: string - priority: 10 - jsonPath: .status.sync.revision - conversion: - strategy: None -status: - conditions: - - type: NamesAccepted - status: 'True' - lastTransitionTime: '2020-04-03T21:21:51Z' - reason: NoConflicts - message: no conflicts found - - type: Established - status: 'True' - lastTransitionTime: '2020-04-03T21:21:51Z' - reason: InitialNamesAccepted - message: the initial names have been accepted - acceptedNames: - plural: applications - singular: application - shortNames: - - app - - apps - kind: Application - listKind: ApplicationList - storedVersions: - - v1alpha1 -