Skip to content

Commit

Permalink
chore(trait): user can't disable platform traits
Browse files Browse the repository at this point in the history
Closes #1328
  • Loading branch information
squakez committed Oct 16, 2023
1 parent 583a95b commit 0deede0
Show file tree
Hide file tree
Showing 70 changed files with 463 additions and 747 deletions.
2 changes: 1 addition & 1 deletion cmd/util/doc-gen/generators/traitdocgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func writeDescription(t *types.Type, traitID string, content *[]string) {
profiles := strings.Join(determineProfiles(traitID), ", ")
res = append(res, "", fmt.Sprintf("This trait is available in the following profiles: **%s**.", profiles))
if isPlatformTrait(traitID) {
res = append(res, "", fmt.Sprintf("WARNING: The %s trait is a *platform trait*: disabling it may compromise the platform functionality.", traitID))
res = append(res, "", fmt.Sprintf("NOTE: The %s trait is a *platform trait* and cannot be disabled by the user.", traitID))
}
res = append(res, "", adocDescriptionMarkerEnd)
res = append(res, post...)
Expand Down
9 changes: 3 additions & 6 deletions config/crd/bases/camel.apache.org_integrationkits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
incrementalImageBuild:
description: Use the incremental image build option, to reuse
Expand Down Expand Up @@ -297,8 +296,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
properties:
description: A list of properties to be provided to the Integration
Expand Down Expand Up @@ -336,8 +334,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
nativeBaseImage:
description: The base image to use when running a native build
Expand Down
84 changes: 28 additions & 56 deletions config/crd/bases/camel.apache.org_integrationplatforms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
incrementalImageBuild:
description: Use the incremental image build option, to reuse
Expand Down Expand Up @@ -600,8 +599,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
properties:
description: A list of properties to be provided to the Integration
Expand All @@ -627,8 +625,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
expose:
description: Can be used to enable/disable exposure via kubernetes
Expand Down Expand Up @@ -758,8 +755,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
type: object
deployer:
Expand All @@ -771,8 +767,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
kind:
description: Allows to explicitly select the desired deployment
Expand All @@ -799,8 +794,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
progressDeadlineSeconds:
description: The maximum time in seconds for the deployment
Expand Down Expand Up @@ -844,8 +838,7 @@ spec:
environment variables (default `true`)
type: boolean
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
httpProxy:
description: Propagates the `HTTP_PROXY`, `HTTPS_PROXY` and
Expand All @@ -869,8 +862,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
ref:
description: The error handler ref name provided or found
Expand Down Expand Up @@ -1165,8 +1157,7 @@ spec:
main class is loaded
type: boolean
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
options:
description: A list of JVM options
Expand All @@ -1191,8 +1182,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
list:
description: Comma separated list of Kamelet names to load
Expand Down Expand Up @@ -1425,8 +1415,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
hotReload:
description: Enable "hot reload" when a secret/configmap mounted
Expand Down Expand Up @@ -1465,8 +1454,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
type: object
owner:
Expand Down Expand Up @@ -1536,8 +1524,7 @@ spec:
platform is missing.
type: boolean
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
global:
description: Indicates if the platform should be created globally
Expand Down Expand Up @@ -1629,8 +1616,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
nativeBaseImage:
description: The base image to use when running a native build
Expand Down Expand Up @@ -2329,8 +2315,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
incrementalImageBuild:
description: Use the incremental image build option, to reuse
Expand Down Expand Up @@ -2426,8 +2411,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
properties:
description: A list of properties to be provided to the Integration
Expand All @@ -2453,8 +2437,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
expose:
description: Can be used to enable/disable exposure via kubernetes
Expand Down Expand Up @@ -2584,8 +2567,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
type: object
deployer:
Expand All @@ -2597,8 +2579,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
kind:
description: Allows to explicitly select the desired deployment
Expand All @@ -2625,8 +2606,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
progressDeadlineSeconds:
description: The maximum time in seconds for the deployment
Expand Down Expand Up @@ -2670,8 +2650,7 @@ spec:
environment variables (default `true`)
type: boolean
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
httpProxy:
description: Propagates the `HTTP_PROXY`, `HTTPS_PROXY` and
Expand All @@ -2695,8 +2674,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
ref:
description: The error handler ref name provided or found
Expand Down Expand Up @@ -2991,8 +2969,7 @@ spec:
main class is loaded
type: boolean
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
options:
description: A list of JVM options
Expand All @@ -3017,8 +2994,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
list:
description: Comma separated list of Kamelet names to load
Expand Down Expand Up @@ -3251,8 +3227,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
hotReload:
description: Enable "hot reload" when a secret/configmap mounted
Expand Down Expand Up @@ -3291,8 +3266,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
type: object
owner:
Expand Down Expand Up @@ -3362,8 +3336,7 @@ spec:
platform is missing.
type: boolean
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
global:
description: Indicates if the platform should be created globally
Expand Down Expand Up @@ -3455,8 +3428,7 @@ spec:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
description: Can be used to enable or disable a trait. All
traits share this common property.
description: 'Deprecated: no longer in use.'
type: boolean
nativeBaseImage:
description: The base image to use when running a native build
Expand Down
Loading

0 comments on commit 0deede0

Please sign in to comment.