Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Structured traits configuration serialization #1600

Merged
merged 31 commits into from
Jul 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a20d79f
feat: Structured traits configuration serialization
astefanutti Jul 9, 2020
8e406e4
chore(trait): Migrate the JVM trait to structured serialization
astefanutti Jul 9, 2020
6486bdc
fix: The options parameter from the JVM trait should support value co…
astefanutti Jul 13, 2020
ab9016f
chore(trait): Migrate the Environment trait to structured serialization
astefanutti Jul 13, 2020
bc3778c
chore(trait): Migrate the Knative trait to structured serialization
astefanutti Jul 13, 2020
3a21477
chore(trait): Migrate the Owner trait to structured serialization
astefanutti Jul 13, 2020
5e9e90e
chore(trait): Migrate the Container trait to structured serialization
astefanutti Jul 13, 2020
f98831b
chore(trait): Migrate the Route trait to structured serialization
astefanutti Jul 13, 2020
9548aa1
chore(trait): Migrate the Service trait to structured serialization
astefanutti Jul 13, 2020
a945f15
chore(trait): Migrate the Knative Service trait to structured seriali…
astefanutti Jul 13, 2020
d791af6
chore(trait): Re-introduce Configuration field for backward compatibi…
astefanutti Jul 13, 2020
f999e3b
chore: Rebuild resources
astefanutti Jul 15, 2020
c719149
chore(trait): Migrate the Jolokia trait to structured serialization
astefanutti Jul 15, 2020
0e60282
chore(trait): Migrate the Prometheus trait to structured serialization
astefanutti Jul 15, 2020
1172fce
chore: nodeport -> NodePort in Service trait
astefanutti Jul 15, 2020
64b2835
chore(trait): Migrate the Builder trait to structured serialization
astefanutti Jul 15, 2020
f3f43c9
chore(trait): Migrate the Camel trait to structured serialization
astefanutti Jul 15, 2020
56c8f33
chore(trait): Migrate the Cron trait to structured serialization
astefanutti Jul 15, 2020
92e2970
chore(trait): Migrate the Deployer trait to structured serialization
astefanutti Jul 15, 2020
adedf2f
chore(trait): Migrate the GC trait to structured serialization
astefanutti Jul 15, 2020
e0e8023
chore(trait): Migrate the Ingress trait to structured serialization
astefanutti Jul 15, 2020
9a95492
chore(trait): Migrate the Istio trait to structured serialization
astefanutti Jul 15, 2020
bfe64a0
chore(trait): Migrate the Platform trait to structured serialization
astefanutti Jul 15, 2020
7444a60
chore(trait): Migrate the Pull Secret trait to structured serialization
astefanutti Jul 15, 2020
3c52f73
chore(trait): Migrate the Quarkus trait to structured serialization
astefanutti Jul 15, 2020
5a34520
chore(trait): Migrate the Master trait to structured serialization
astefanutti Jul 15, 2020
1c40da7
chore(trait): Migrate the 3Scale trait to structured serialization
astefanutti Jul 15, 2020
4b902ff
chore(trait): Migrate the Tracing trait to structured serialization
astefanutti Jul 15, 2020
5478929
chore(trait): Migrate the Affinity trait to structured serialization
astefanutti Jul 15, 2020
775ddcc
chore: Update traits documentation
astefanutti Jul 15, 2020
3830f6c
chore: Rebuild resources
astefanutti Jul 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions addons/master/master.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ import (
type masterTrait struct {
trait.BaseTrait `property:",squash"`
// Enables automatic configuration of the trait.
Auto *bool `property:"auto"`
Auto *bool `property:"auto" json:"auto,omitempty"`
// When this flag is active, the operator analyzes the source code to add dependencies required by delegate endpoints.
// E.g. when using `master:lockname:timer`, then `camel:timer` is automatically added to the set of dependencies.
// It's enabled by default.
IncludeDelegateDependencies *bool `property:"include-delegate-dependencies"`
IncludeDelegateDependencies *bool `property:"include-delegate-dependencies" json:"includeDelegateDependencies,omitempty"`
// Name of the configmap that will be used to store the lock. Defaults to "<integration-name>-lock".
Configmap *string `property:"configmap"`
Configmap *string `property:"configmap" json:"configmap,omitempty"`
// Label that will be used to identify all pods contending the lock. Defaults to "camel.apache.org/integration".
LabelKey *string `property:"label-key"`
LabelKey *string `property:"label-key" json:"labelKey,omitempty"`
// Label value that will be used to identify all pods contending the lock. Defaults to the integration name.
LabelValue *string `property:"label-value"`
delegateDependencies []string
LabelValue *string `property:"label-value" json:"labelValue,omitempty"`
delegateDependencies []string `json:"-"`
}

// NewMasterTrait --
Expand Down
10 changes: 5 additions & 5 deletions addons/threescale/3scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ import (
type threeScaleTrait struct {
trait.BaseTrait `property:",squash"`
// Enables automatic configuration of the trait.
Auto *bool `property:"auto"`
Auto *bool `property:"auto" json:"auto,omitempty"`
// The scheme to use to contact the service (default `http`)
Scheme string `property:"scheme"`
Scheme string `property:"scheme" json:"scheme,omitempty"`
// The path where the API is published (default `/`)
Path string `property:"path"`
Path string `property:"path" json:"path,omitempty"`
// The port where the service is exposed (default `80`)
Port int `property:"port"`
Port int `property:"port" json:"port,omitempty"`
// The path where the Open-API specification is published (default `/openapi.json`)
DescriptionPath *string `property:"description-path"`
DescriptionPath *string `property:"description-path" json:"descriptionPath,omitempty"`
}

const (
Expand Down
10 changes: 5 additions & 5 deletions addons/tracing/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ import (
type tracingTrait struct {
trait.BaseTrait `property:",squash"`
// Enables automatic configuration of the trait, including automatic discovery of the tracing endpoint.
Auto *bool `property:"auto"`
Auto *bool `property:"auto" json:"auto,omitempty"`
// The name of the service that publishes tracing data (defaults to the integration name)
ServiceName string `property:"service-name"`
ServiceName string `property:"service-name" json:"serviceName,omitempty"`
// The target endpoint of the OpenTracing service (automatically discovered by default)
Endpoint string `property:"endpoint"`
Endpoint string `property:"endpoint" json:"endpoint,omitempty"`
// The sampler type (default "const")
SamplerType *string `property:"sampler-type"`
SamplerType *string `property:"sampler-type" json:"samplerType,omitempty"`
// The sampler specific param (default "1")
SamplerParam *string `property:"sampler-param"`
SamplerParam *string `property:"sampler-param" json:"samplerParam,omitempty"`
}

const (
Expand Down
6 changes: 0 additions & 6 deletions deploy/crd-integration-kit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ spec:
type: array
traits:
additionalProperties:
description: A TraitSpec contains the configuration of a trait
properties:
configuration:
additionalProperties:
type: string
type: object
type: object
type: object
type: object
Expand Down
12 changes: 0 additions & 12 deletions deploy/crd-integration-platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,6 @@ spec:
type: object
traits:
additionalProperties:
description: A TraitSpec contains the configuration of a trait
properties:
configuration:
additionalProperties:
type: string
type: object
type: object
type: object
type: object
Expand Down Expand Up @@ -355,12 +349,6 @@ spec:
type: object
traits:
additionalProperties:
description: A TraitSpec contains the configuration of a trait
properties:
configuration:
additionalProperties:
type: string
type: object
type: object
type: object
version:
Expand Down
4 changes: 2 additions & 2 deletions deploy/crd-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ spec:
description: A TraitSpec contains the configuration of a trait
properties:
configuration:
additionalProperties:
type: string
type: object
required:
- configuration
type: object
type: object
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ spec:
description: A TraitSpec contains the configuration of a trait
properties:
configuration:
additionalProperties:
type: string
type: object
required:
- configuration
type: object
type: object
type: object
Expand Down
Loading