-
Notifications
You must be signed in to change notification settings - Fork 50
✨ Add schema CRD and platform CRs. #450
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d752b9e
:sparkles: Add schema CRD and platform CRs.
jortel 5f62334
checkpoint
jortel fe31f05
checkpoint
jortel 9bf4d8b
checkpoint
jortel 82d7304
checkpoint
jortel 8b4e735
checkpoint
jortel 182a296
checkpoint
jortel a1cf9ac
checkpoint
jortel 3e78024
checkpoint
jortel e00278d
checkpoint
jortel 14facdb
checkpoint
jortel a2c28ff
bundle built.
jortel aecda36
update rbac.
jortel b294230
checkpoint
jortel 9684444
checkpoint
jortel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| --- | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| annotations: | ||
| controller-gen.kubebuilder.io/version: v0.10.0 | ||
| creationTimestamp: null | ||
| name: schemas.tackle.konveyor.io | ||
| spec: | ||
| group: tackle.konveyor.io | ||
| names: | ||
| kind: Schema | ||
| listKind: SchemaList | ||
| plural: schemas | ||
| singular: schema | ||
| scope: Namespaced | ||
| versions: | ||
| - name: v1alpha1 | ||
| schema: | ||
| openAPIV3Schema: | ||
| description: Schema defines json document schemas. | ||
| 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 | ||
| spec: | ||
| description: SchemaSpec defines the desired state of the resource. | ||
| properties: | ||
| domain: | ||
| description: Domain | ||
| type: string | ||
| subject: | ||
| description: Subject | ||
| type: string | ||
| variant: | ||
| description: Variant | ||
| type: string | ||
| versions: | ||
| description: Versions | ||
| items: | ||
| description: SchemaVersion defines each version of a schema. | ||
| properties: | ||
| definition: | ||
| description: Definition is the (jsd) json-schema definition. | ||
| type: object | ||
| x-kubernetes-preserve-unknown-fields: true | ||
| migration: | ||
| description: Migration defines a yq query to migrate the document. | ||
| type: string | ||
| required: | ||
| - definition | ||
| type: object | ||
| type: array | ||
| required: | ||
| - domain | ||
| - subject | ||
| - variant | ||
| - versions | ||
| type: object | ||
| status: | ||
| description: SchemaStatus defines the observed state of the resource. | ||
| properties: | ||
| observedGeneration: | ||
| description: The most recent generation observed by the controller. | ||
| format: int64 | ||
| type: integer | ||
| type: object | ||
| required: | ||
| - spec | ||
| type: object | ||
| served: true | ||
| storage: true | ||
| subresources: | ||
| status: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
roles/tackle/templates/customresource-addon-platform.yml.j2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| --- | ||
| kind: Addon | ||
| apiVersion: tackle.konveyor.io/v1alpha1 | ||
| metadata: | ||
| name: {{ platform_manifest }} | ||
| namespace: {{ app_namespace }} | ||
| labels: | ||
| app.kubernetes.io/name: {{ platform_service_name }} | ||
| app.kubernetes.io/component: {{ platform_component_name }} | ||
| app.kubernetes.io/part-of: {{ app_name }} | ||
| spec: | ||
| task: {{ platform_manifest }} | ||
| container: | ||
| name: {{ platform_component_name }} | ||
| image: {{ platform_fqin }} | ||
| imagePullPolicy: {{ image_pull_policy }} | ||
| resources: | ||
| limits: | ||
| cpu: {{ platform_container_limits_cpu }} | ||
| memory: {{ platform_container_limits_memory }} | ||
| requests: | ||
| cpu: {{ platform_container_requests_cpu }} | ||
| memory: {{ platform_container_requests_memory }} | ||
| --- | ||
| kind: Addon | ||
| apiVersion: tackle.konveyor.io/v1alpha1 | ||
| metadata: | ||
| name: {{ platform_importer }} | ||
| namespace: {{ app_namespace }} | ||
| labels: | ||
| app.kubernetes.io/name: {{ platform_service_name }} | ||
| app.kubernetes.io/component: {{ platform_component_name }} | ||
| app.kubernetes.io/part-of: {{ app_name }} | ||
| spec: | ||
| task: {{ platform_importer }} | ||
| container: | ||
| name: {{ platform_component_name }} | ||
| image: {{ platform_fqin }} | ||
| imagePullPolicy: {{ image_pull_policy }} | ||
| resources: | ||
| limits: | ||
| cpu: {{ platform_container_limits_cpu }} | ||
| memory: {{ platform_container_limits_memory }} | ||
| requests: | ||
| cpu: {{ platform_container_requests_cpu }} | ||
| memory: {{ platform_container_requests_memory }} | ||
| --- | ||
| kind: Addon | ||
| apiVersion: tackle.konveyor.io/v1alpha1 | ||
| metadata: | ||
| name: {{ platform_generator }} | ||
| namespace: {{ app_namespace }} | ||
| labels: | ||
| app.kubernetes.io/name: {{ platform_service_name }} | ||
| app.kubernetes.io/component: {{ platform_component_name }} | ||
| app.kubernetes.io/part-of: {{ app_name }} | ||
| spec: | ||
| task: {{ platform_generator }} | ||
| container: | ||
| name: {{ platform_component_name }} | ||
| image: {{ platform_fqin }} | ||
| imagePullPolicy: {{ image_pull_policy }} | ||
| resources: | ||
| limits: | ||
| cpu: {{ platform_container_limits_cpu }} | ||
| memory: {{ platform_container_limits_memory }} | ||
| requests: | ||
| cpu: {{ platform_container_requests_cpu }} | ||
| memory: {{ platform_container_requests_memory }} | ||
|
|
||
| --- | ||
| kind: Task | ||
| apiVersion: tackle.konveyor.io/v1alpha1 | ||
| metadata: | ||
| namespace: {{ app_namespace }} | ||
| name: {{ platform_manifest }} | ||
| spec: | ||
| action: fetch | ||
| --- | ||
| kind: Task | ||
| apiVersion: tackle.konveyor.io/v1alpha1 | ||
| metadata: | ||
| namespace: {{ app_namespace }} | ||
| name: {{ platform_importer }} | ||
| spec: | ||
| action: import | ||
| --- | ||
| kind: Task | ||
| apiVersion: tackle.konveyor.io/v1alpha1 | ||
| metadata: | ||
| namespace: {{ app_namespace }} | ||
| name: {{ platform_generator }} | ||
| spec: | ||
| action: generate | ||
64 changes: 64 additions & 0 deletions
64
roles/tackle/templates/customresource-schema-cloudfoundry.yml.j2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| kind: Schema | ||
| apiVersion: tackle.konveyor.io/v1alpha1 | ||
| metadata: | ||
| name: cloudfoundry-coordinates | ||
| namespace: {{ app_namespace }} | ||
| labels: | ||
| app.kubernetes.io/part-of: {{ app_name }} | ||
| spec: | ||
| domain: platform | ||
| variant: cloudfoundry | ||
| subject: coordinates | ||
| versions: | ||
| - definition: | ||
| '$schema': https://json-schema.org/draft/2020-12/schema | ||
| properties: | ||
| name: | ||
| description: Application name. | ||
| minLength: 1 | ||
| type: string | ||
| space: | ||
| description: Space name. | ||
| minLength: 1 | ||
| type: string | ||
|
jortel marked this conversation as resolved.
|
||
| required: | ||
| - space | ||
| - name | ||
| title: Coordinates | ||
| type: object | ||
| --- | ||
| kind: Schema | ||
| apiVersion: tackle.konveyor.io/v1alpha1 | ||
| metadata: | ||
| name: cloudfoundry-filter | ||
| namespace: {{ app_namespace }} | ||
| labels: | ||
| app.kubernetes.io/part-of: {{ app_name }} | ||
| spec: | ||
| domain: platform | ||
| variant: cloudfoundry | ||
| subject: filter | ||
| versions: | ||
| - definition: | ||
| $schema: https://json-schema.org/draft/2020-12/schema | ||
| title: Coordinates | ||
| type: object | ||
| properties: | ||
| names: | ||
| description: Application names. Each may be a glob expression. | ||
| type: array | ||
| items: | ||
| type: string | ||
| minLength: 1 | ||
| minItems: 0 | ||
| spaces: | ||
| description: Space names. | ||
| type: array | ||
| items: | ||
| type: string | ||
| minLength: 1 | ||
| minItems: 1 | ||
| required: | ||
| - spaces | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.