From e4fc755bd3b6bd086398cc57b90335774650cd1b Mon Sep 17 00:00:00 2001 From: Lucas Marcolongo Date: Thu, 6 Jun 2024 03:43:42 -0700 Subject: [PATCH] feat(kluctl): add `kluctl` template controller CRDs (#327) --- .../githubcomment_v1alpha1.json | 204 +++++++ .../gitlabcomment_v1alpha1.json | 211 +++++++ .../gitprojector_v1alpha1.json | 218 +++++++ .../listgithubpullrequests_v1alpha1.json | 159 +++++ .../listgitlabmergerequests_v1alpha1.json | 167 +++++ .../objecthandler_v1alpha1.json | 569 ++++++++++++++++++ .../objecttemplate_v1alpha1.json | 238 ++++++++ .../texttemplate_v1alpha1.json | 176 ++++++ 8 files changed, 1942 insertions(+) create mode 100644 templates.kluctl.io/githubcomment_v1alpha1.json create mode 100644 templates.kluctl.io/gitlabcomment_v1alpha1.json create mode 100644 templates.kluctl.io/gitprojector_v1alpha1.json create mode 100644 templates.kluctl.io/listgithubpullrequests_v1alpha1.json create mode 100644 templates.kluctl.io/listgitlabmergerequests_v1alpha1.json create mode 100644 templates.kluctl.io/objecthandler_v1alpha1.json create mode 100644 templates.kluctl.io/objecttemplate_v1alpha1.json create mode 100644 templates.kluctl.io/texttemplate_v1alpha1.json diff --git a/templates.kluctl.io/githubcomment_v1alpha1.json b/templates.kluctl.io/githubcomment_v1alpha1.json new file mode 100644 index 00000000..ff04487a --- /dev/null +++ b/templates.kluctl.io/githubcomment_v1alpha1.json @@ -0,0 +1,204 @@ +{ + "description": "GithubComment is the Schema for the githubcomments API", + "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": "GithubCommentSpec defines the desired state of GithubComment", + "properties": { + "comment": { + "properties": { + "id": { + "description": "Id specifies the identifier to be used by the controller when it needs to find the actual comment when it does not know the internal id. This Id is written into the comment inside a comment, so that a simple text search can reveal the comment", + "type": "string" + }, + "source": { + "description": "Source specifies the source content for the comment. Different source types are supported: Text, ConfigMap and TextTemplate", + "properties": { + "configMap": { + "description": "ConfigMap specifies a ConfigMap and a key to load the source content from", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "key", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "text": { + "description": "Text specifies a raw text comment.", + "type": "string" + }, + "textTemplate": { + "description": "TextTemplate specifies a TextTemplate to load the source content from", + "properties": { + "name": { + "description": "Name of the referent.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "source" + ], + "type": "object", + "additionalProperties": false + }, + "github": { + "properties": { + "owner": { + "description": "Owner specifies the GitHub user or organisation that owns the repository", + "type": "string" + }, + "pullRequestId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "PullRequestId specifies the pull request ID.", + "x-kubernetes-int-or-string": true + }, + "repo": { + "description": "Repo specifies the repository name.", + "type": "string" + }, + "tokenRef": { + "description": "TokenRef specifies a secret and key to load the GitHub API token from", + "properties": { + "key": { + "type": "string" + }, + "secretName": { + "type": "string" + } + }, + "required": [ + "key", + "secretName" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "owner", + "pullRequestId", + "repo" + ], + "type": "object", + "additionalProperties": false + }, + "suspend": { + "default": false, + "description": "Suspend can be used to suspend the reconciliation of this object", + "type": "boolean" + } + }, + "required": [ + "comment", + "github" + ], + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "GithubCommentStatus defines the observed state of GithubComment", + "properties": { + "commentId": { + "type": "string" + }, + "conditions": { + "items": { + "description": "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }", + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "format": "date-time", + "type": "string" + }, + "message": { + "description": "message is a human readable message indicating details about the transition. This may be an empty string.", + "maxLength": 32768, + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + "format": "int64", + "minimum": 0, + "type": "integer" + }, + "reason": { + "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "enum": [ + "True", + "False", + "Unknown" + ], + "type": "string" + }, + "type": { + "description": "type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)", + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", + "type": "string" + } + }, + "required": [ + "lastTransitionTime", + "message", + "reason", + "status", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "lastPostedBodyHash": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +} diff --git a/templates.kluctl.io/gitlabcomment_v1alpha1.json b/templates.kluctl.io/gitlabcomment_v1alpha1.json new file mode 100644 index 00000000..42423afe --- /dev/null +++ b/templates.kluctl.io/gitlabcomment_v1alpha1.json @@ -0,0 +1,211 @@ +{ + "description": "GitlabComment is the Schema for the gitlabcomments API", + "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": "GitlabCommentSpec defines the desired state of GitlabComment", + "properties": { + "comment": { + "properties": { + "id": { + "description": "Id specifies the identifier to be used by the controller when it needs to find the actual comment when it does not know the internal id. This Id is written into the comment inside a comment, so that a simple text search can reveal the comment", + "type": "string" + }, + "source": { + "description": "Source specifies the source content for the comment. Different source types are supported: Text, ConfigMap and TextTemplate", + "properties": { + "configMap": { + "description": "ConfigMap specifies a ConfigMap and a key to load the source content from", + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "key", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "text": { + "description": "Text specifies a raw text comment.", + "type": "string" + }, + "textTemplate": { + "description": "TextTemplate specifies a TextTemplate to load the source content from", + "properties": { + "name": { + "description": "Name of the referent.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "source" + ], + "type": "object", + "additionalProperties": false + }, + "gitlab": { + "properties": { + "api": { + "description": "API specifies the GitLab API URL to talk to. If blank, uses https://gitlab.com/.", + "type": "string" + }, + "mergeRequestId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "MergeRequestId specifies the Gitlab merge request internal ID", + "x-kubernetes-int-or-string": true + }, + "project": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "Project specifies the Gitlab group and project (separated by slash) to use, or the numeric project id", + "x-kubernetes-int-or-string": true + }, + "tokenRef": { + "description": "TokenRef specifies a secret and key to load the Gitlab API token from", + "properties": { + "key": { + "type": "string" + }, + "secretName": { + "type": "string" + } + }, + "required": [ + "key", + "secretName" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "mergeRequestId", + "project" + ], + "type": "object", + "additionalProperties": false + }, + "suspend": { + "default": false, + "description": "Suspend can be used to suspend the reconciliation of this object", + "type": "boolean" + } + }, + "required": [ + "comment", + "gitlab" + ], + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "GitlabCommentStatus defines the observed state of GitlabComment", + "properties": { + "conditions": { + "items": { + "description": "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }", + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "format": "date-time", + "type": "string" + }, + "message": { + "description": "message is a human readable message indicating details about the transition. This may be an empty string.", + "maxLength": 32768, + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + "format": "int64", + "minimum": 0, + "type": "integer" + }, + "reason": { + "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "enum": [ + "True", + "False", + "Unknown" + ], + "type": "string" + }, + "type": { + "description": "type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)", + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", + "type": "string" + } + }, + "required": [ + "lastTransitionTime", + "message", + "reason", + "status", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "lastPostedBodyHash": { + "type": "string" + }, + "noteId": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +} diff --git a/templates.kluctl.io/gitprojector_v1alpha1.json b/templates.kluctl.io/gitprojector_v1alpha1.json new file mode 100644 index 00000000..f7fbecdf --- /dev/null +++ b/templates.kluctl.io/gitprojector_v1alpha1.json @@ -0,0 +1,218 @@ +{ + "description": "GitProjector is the Schema for the gitprojectors API", + "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": "GitProjectorSpec defines the desired state of GitProjector", + "properties": { + "files": { + "description": "Files specifies the list of files to include in the projection", + "items": { + "properties": { + "glob": { + "description": "Glob specifies a glob to use for filename matching.", + "type": "string" + }, + "parseYaml": { + "default": false, + "description": "ParseYaml enables YAML parsing of matching files. The result is then available as `parsed` in the result for the corresponding result file", + "type": "boolean" + } + }, + "required": [ + "glob" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "interval": { + "default": "5m", + "description": "Interval is the interval at which to scan the Git repository Defaults to 5m.", + "pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$", + "type": "string" + }, + "ref": { + "description": "Reference specifies the Git branch, tag or commit to scan. Branches and tags can contain regular expressions", + "properties": { + "branch": { + "description": "Branch to filter for. Can also be a regex.", + "type": "string" + }, + "commit": { + "description": "Commit SHA to check out, takes precedence over all reference fields.", + "type": "string" + }, + "tag": { + "description": "Tag to filter for. Can also be a regex.", + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "secretRef": { + "description": "SecretRefs specifies a Secret use for Git authentication. The contents of the secret must conform to: https://kluctl.io/docs/flux/spec/v1alpha1/kluctldeployment/#git-authentication", + "properties": { + "name": { + "description": "Name of the referent.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "suspend": { + "default": false, + "description": "Suspend can be used to suspend the reconciliation of this object", + "type": "boolean" + }, + "url": { + "description": "URL specifies the Git url to scan and project", + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "GitProjectorStatus defines the observed state of GitProjector", + "properties": { + "allRefsHash": { + "type": "string" + }, + "conditions": { + "items": { + "description": "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }", + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "format": "date-time", + "type": "string" + }, + "message": { + "description": "message is a human readable message indicating details about the transition. This may be an empty string.", + "maxLength": 32768, + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + "format": "int64", + "minimum": 0, + "type": "integer" + }, + "reason": { + "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "enum": [ + "True", + "False", + "Unknown" + ], + "type": "string" + }, + "type": { + "description": "type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)", + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", + "type": "string" + } + }, + "required": [ + "lastTransitionTime", + "message", + "reason", + "status", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "result": { + "items": { + "properties": { + "files": { + "items": { + "properties": { + "parsed": { + "items": { + "type": "object" + }, + "type": "array", + "x-kubernetes-preserve-unknown-fields": true + }, + "path": { + "type": "string" + }, + "raw": { + "type": "string" + } + }, + "required": [ + "path" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "ref": { + "properties": { + "branch": { + "description": "Branch to filter for. Can also be a regex.", + "type": "string" + }, + "commit": { + "description": "Commit SHA to check out, takes precedence over all reference fields.", + "type": "string" + }, + "tag": { + "description": "Tag to filter for. Can also be a regex.", + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "files", + "ref" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +} diff --git a/templates.kluctl.io/listgithubpullrequests_v1alpha1.json b/templates.kluctl.io/listgithubpullrequests_v1alpha1.json new file mode 100644 index 00000000..e0e675cd --- /dev/null +++ b/templates.kluctl.io/listgithubpullrequests_v1alpha1.json @@ -0,0 +1,159 @@ +{ + "description": "ListGithubPullRequests is the Schema for the listgithubpullrequests API", + "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": "ListGithubPullRequestsSpec defines the desired state of ListGithubPullRequests", + "properties": { + "base": { + "description": "Base specifies the base to filter for", + "type": "string" + }, + "head": { + "description": "Head specifies the head to filter for", + "type": "string" + }, + "interval": { + "default": "5m", + "description": "Interval is the interval at which to query the Gitlab API. Defaults to 5m.", + "pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$", + "type": "string" + }, + "labels": { + "description": "Labels is used to filter the PRs that you want to target", + "items": { + "type": "string" + }, + "type": "array" + }, + "limit": { + "default": 100, + "description": "Limit limits the maximum number of pull requests to fetch. Defaults to 100", + "type": "integer" + }, + "owner": { + "description": "Owner specifies the GitHub user or organisation that owns the repository", + "type": "string" + }, + "repo": { + "description": "Repo specifies the repository name.", + "type": "string" + }, + "state": { + "default": "all", + "description": "State is an additional PR filter to get only those with a certain state. Default: \"all\"", + "enum": [ + "all", + "open", + "closed" + ], + "type": "string" + }, + "tokenRef": { + "description": "TokenRef specifies a secret and key to load the GitHub API token from", + "properties": { + "key": { + "type": "string" + }, + "secretName": { + "type": "string" + } + }, + "required": [ + "key", + "secretName" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "limit", + "owner", + "repo" + ], + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "ListGithubPullRequestsStatus defines the observed state of ListGithubPullRequests", + "properties": { + "conditions": { + "items": { + "description": "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }", + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "format": "date-time", + "type": "string" + }, + "message": { + "description": "message is a human readable message indicating details about the transition. This may be an empty string.", + "maxLength": 32768, + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + "format": "int64", + "minimum": 0, + "type": "integer" + }, + "reason": { + "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "enum": [ + "True", + "False", + "Unknown" + ], + "type": "string" + }, + "type": { + "description": "type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)", + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", + "type": "string" + } + }, + "required": [ + "lastTransitionTime", + "message", + "reason", + "status", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "pullRequests": { + "items": { + "type": "object" + }, + "type": "array", + "x-kubernetes-preserve-unknown-fields": true + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +} diff --git a/templates.kluctl.io/listgitlabmergerequests_v1alpha1.json b/templates.kluctl.io/listgitlabmergerequests_v1alpha1.json new file mode 100644 index 00000000..ba021e13 --- /dev/null +++ b/templates.kluctl.io/listgitlabmergerequests_v1alpha1.json @@ -0,0 +1,167 @@ +{ + "description": "ListGitlabMergeRequests is the Schema for the listgitlabmergerequests API", + "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": "ListGitlabMergeRequestsSpec defines the desired state of ListGitlabMergeRequests", + "properties": { + "api": { + "description": "API specifies the GitLab API URL to talk to. If blank, uses https://gitlab.com/.", + "type": "string" + }, + "interval": { + "default": "5m", + "description": "Interval is the interval at which to query the Gitlab API. Defaults to 5m.", + "pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$", + "type": "string" + }, + "labels": { + "description": "Labels is used to filter the MRs that you want to target", + "items": { + "type": "string" + }, + "type": "array" + }, + "limit": { + "default": 100, + "description": "Limit limits the maximum number of merge requests to fetch. Defaults to 100", + "type": "integer" + }, + "project": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "Project specifies the Gitlab group and project (separated by slash) to use, or the numeric project id", + "x-kubernetes-int-or-string": true + }, + "sourceBranch": { + "type": "string" + }, + "state": { + "default": "all", + "description": "State is an additional MRs filter to get only those with a certain state. Default: \"all\"", + "enum": [ + "all", + "opened", + "closed", + "locked", + "merged" + ], + "type": "string" + }, + "targetBranch": { + "description": "TargetBranch specifies the target branch to filter for", + "type": "string" + }, + "tokenRef": { + "description": "TokenRef specifies a secret and key to load the Gitlab API token from", + "properties": { + "key": { + "type": "string" + }, + "secretName": { + "type": "string" + } + }, + "required": [ + "key", + "secretName" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "limit", + "project" + ], + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "ListGitlabMergeRequestsStatus defines the observed state of ListGitlabMergeRequests", + "properties": { + "conditions": { + "items": { + "description": "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }", + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "format": "date-time", + "type": "string" + }, + "message": { + "description": "message is a human readable message indicating details about the transition. This may be an empty string.", + "maxLength": 32768, + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + "format": "int64", + "minimum": 0, + "type": "integer" + }, + "reason": { + "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "enum": [ + "True", + "False", + "Unknown" + ], + "type": "string" + }, + "type": { + "description": "type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)", + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", + "type": "string" + } + }, + "required": [ + "lastTransitionTime", + "message", + "reason", + "status", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "mergeRequests": { + "items": { + "type": "object" + }, + "type": "array", + "x-kubernetes-preserve-unknown-fields": true + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +} diff --git a/templates.kluctl.io/objecthandler_v1alpha1.json b/templates.kluctl.io/objecthandler_v1alpha1.json new file mode 100644 index 00000000..32cf77db --- /dev/null +++ b/templates.kluctl.io/objecthandler_v1alpha1.json @@ -0,0 +1,569 @@ +{ + "description": "ObjectHandler is the Schema for the objecthandlers API", + "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": "ObjectHandlerSpec defines the desired state of ObjectHandler", + "properties": { + "forObject": { + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + "required": [ + "apiVersion", + "kind", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "handlers": { + "items": { + "properties": { + "pullRequestApprove": { + "properties": { + "github": { + "properties": { + "owner": { + "description": "Owner specifies the GitHub user or organisation that owns the repository", + "type": "string" + }, + "pullRequestId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "PullRequestId specifies the pull request ID.", + "x-kubernetes-int-or-string": true + }, + "repo": { + "description": "Repo specifies the repository name.", + "type": "string" + }, + "tokenRef": { + "description": "TokenRef specifies a secret and key to load the GitHub API token from", + "properties": { + "key": { + "type": "string" + }, + "secretName": { + "type": "string" + } + }, + "required": [ + "key", + "secretName" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "owner", + "pullRequestId", + "repo" + ], + "type": "object", + "additionalProperties": false + }, + "gitlab": { + "properties": { + "api": { + "description": "API specifies the GitLab API URL to talk to. If blank, uses https://gitlab.com/.", + "type": "string" + }, + "mergeRequestId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "MergeRequestId specifies the Gitlab merge request internal ID", + "x-kubernetes-int-or-string": true + }, + "project": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "Project specifies the Gitlab group and project (separated by slash) to use, or the numeric project id", + "x-kubernetes-int-or-string": true + }, + "tokenRef": { + "description": "TokenRef specifies a secret and key to load the Gitlab API token from", + "properties": { + "key": { + "type": "string" + }, + "secretName": { + "type": "string" + } + }, + "required": [ + "key", + "secretName" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "mergeRequestId", + "project" + ], + "type": "object", + "additionalProperties": false + }, + "missingReadyConditionIsError": { + "default": false, + "type": "boolean" + } + }, + "type": "object", + "additionalProperties": false + }, + "pullRequestCommand": { + "properties": { + "commands": { + "items": { + "properties": { + "actions": { + "items": { + "properties": { + "annotate": { + "properties": { + "annotation": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "annotation", + "value" + ], + "type": "object", + "additionalProperties": false + }, + "jsonPatch": { + "items": { + "type": "object" + }, + "type": "array", + "x-kubernetes-preserve-unknown-fields": true + } + }, + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "actions", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "github": { + "properties": { + "owner": { + "description": "Owner specifies the GitHub user or organisation that owns the repository", + "type": "string" + }, + "pullRequestId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "PullRequestId specifies the pull request ID.", + "x-kubernetes-int-or-string": true + }, + "repo": { + "description": "Repo specifies the repository name.", + "type": "string" + }, + "tokenRef": { + "description": "TokenRef specifies a secret and key to load the GitHub API token from", + "properties": { + "key": { + "type": "string" + }, + "secretName": { + "type": "string" + } + }, + "required": [ + "key", + "secretName" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "owner", + "pullRequestId", + "repo" + ], + "type": "object", + "additionalProperties": false + }, + "gitlab": { + "properties": { + "api": { + "description": "API specifies the GitLab API URL to talk to. If blank, uses https://gitlab.com/.", + "type": "string" + }, + "mergeRequestId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "MergeRequestId specifies the Gitlab merge request internal ID", + "x-kubernetes-int-or-string": true + }, + "project": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "Project specifies the Gitlab group and project (separated by slash) to use, or the numeric project id", + "x-kubernetes-int-or-string": true + }, + "tokenRef": { + "description": "TokenRef specifies a secret and key to load the Gitlab API token from", + "properties": { + "key": { + "type": "string" + }, + "secretName": { + "type": "string" + } + }, + "required": [ + "key", + "secretName" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "mergeRequestId", + "project" + ], + "type": "object", + "additionalProperties": false + }, + "postHelpComment": { + "type": "boolean" + } + }, + "required": [ + "commands" + ], + "type": "object", + "additionalProperties": false + }, + "pullRequestComment": { + "properties": { + "github": { + "properties": { + "owner": { + "description": "Owner specifies the GitHub user or organisation that owns the repository", + "type": "string" + }, + "pullRequestId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "PullRequestId specifies the pull request ID.", + "x-kubernetes-int-or-string": true + }, + "repo": { + "description": "Repo specifies the repository name.", + "type": "string" + }, + "tokenRef": { + "description": "TokenRef specifies a secret and key to load the GitHub API token from", + "properties": { + "key": { + "type": "string" + }, + "secretName": { + "type": "string" + } + }, + "required": [ + "key", + "secretName" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "owner", + "pullRequestId", + "repo" + ], + "type": "object", + "additionalProperties": false + }, + "gitlab": { + "properties": { + "api": { + "description": "API specifies the GitLab API URL to talk to. If blank, uses https://gitlab.com/.", + "type": "string" + }, + "mergeRequestId": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "MergeRequestId specifies the Gitlab merge request internal ID", + "x-kubernetes-int-or-string": true + }, + "project": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "description": "Project specifies the Gitlab group and project (separated by slash) to use, or the numeric project id", + "x-kubernetes-int-or-string": true + }, + "tokenRef": { + "description": "TokenRef specifies a secret and key to load the Gitlab API token from", + "properties": { + "key": { + "type": "string" + }, + "secretName": { + "type": "string" + } + }, + "required": [ + "key", + "secretName" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "mergeRequestId", + "project" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "interval": { + "default": "1m", + "type": "string" + } + }, + "required": [ + "forObject", + "handlers", + "interval" + ], + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "ObjectHandlerStatus defines the observed state of ObjectHandler", + "properties": { + "conditions": { + "items": { + "description": "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }", + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "format": "date-time", + "type": "string" + }, + "message": { + "description": "message is a human readable message indicating details about the transition. This may be an empty string.", + "maxLength": 32768, + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + "format": "int64", + "minimum": 0, + "type": "integer" + }, + "reason": { + "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "enum": [ + "True", + "False", + "Unknown" + ], + "type": "string" + }, + "type": { + "description": "type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)", + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", + "type": "string" + } + }, + "required": [ + "lastTransitionTime", + "message", + "reason", + "status", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "handlerStatus": { + "items": { + "properties": { + "error": { + "type": "string" + }, + "key": { + "type": "string" + }, + "pullRequestApprove": { + "properties": { + "approved": { + "type": "boolean" + } + }, + "type": "object", + "additionalProperties": false + }, + "pullRequestCommand": { + "properties": { + "helpNoteBodyHash": { + "type": "string" + }, + "helpNoteId": { + "type": "string" + }, + "lastProcessedCommentTime": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "pullRequestComment": { + "properties": { + "lastPostedStatusHash": { + "type": "string" + }, + "noteId": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "key" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +} diff --git a/templates.kluctl.io/objecttemplate_v1alpha1.json b/templates.kluctl.io/objecttemplate_v1alpha1.json new file mode 100644 index 00000000..8093eb9e --- /dev/null +++ b/templates.kluctl.io/objecttemplate_v1alpha1.json @@ -0,0 +1,238 @@ +{ + "description": "ObjectTemplate is the Schema for the objecttemplates API", + "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": "ObjectTemplateSpec defines the desired state of ObjectTemplate", + "properties": { + "interval": { + "default": "30s", + "pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$", + "type": "string" + }, + "matrix": { + "description": "Matrix specifies the input matrix", + "items": { + "properties": { + "list": { + "description": "List specifies a list of plain YAML values which are made available while rendering templates. The list can be accessed through the name specified above", + "items": { + "type": "object" + }, + "type": "array", + "x-kubernetes-preserve-unknown-fields": true + }, + "name": { + "description": "Name specifies the name this matrix input is available while rendering templates", + "type": "string" + }, + "object": { + "description": "Object specifies an object to load and make available while rendering templates. The object can be accessed through the name specified above. The service account used by the ObjectTemplate must have proper permissions to get this object", + "properties": { + "expandLists": { + "description": "ExpandLists enables optional expanding of list. Expanding means, that each list entry is interpreted as individual matrix input instead of interpreting the whole list as one matrix input. This feature is only useful when used in combination with `jsonPath`", + "type": "boolean" + }, + "jsonPath": { + "description": "JsonPath optionally specifies a sub-field to load. When specified, the sub-field (and not the whole object) is made available while rendering templates", + "type": "string" + }, + "ref": { + "description": "Ref specifies the apiVersion, kind, namespace and name of the object to load. The service account used by the ObjectTemplate must have proper permissions to get this object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + "required": [ + "apiVersion", + "kind", + "name" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "ref" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "prune": { + "default": false, + "description": "Prune enables pruning of previously created objects when these disappear from the list of rendered objects", + "type": "boolean" + }, + "serviceAccountName": { + "description": "ServiceAccountName specifies the name of the Kubernetes service account to impersonate when reconciling this ObjectTemplate. If omitted, the \"default\" service account is used", + "type": "string" + }, + "suspend": { + "default": false, + "description": "Suspend can be used to suspend the reconciliation of this object", + "type": "boolean" + }, + "templates": { + "description": "Templates specifies a list of templates to render and deploy", + "items": { + "properties": { + "object": { + "description": "Object specifies a structured object in YAML form. Each field value is rendered independently.", + "type": "object", + "x-kubernetes-preserve-unknown-fields": true + }, + "raw": { + "description": "Raw specifies a raw string to be interpreted/parsed as YAML. The whole string is rendered in one go, allowing to use advanced Jinja2 control structures. Raw object might also be required when a templated value must not be interpreted as a string (which would be done in Object).", + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "type": "array" + } + }, + "required": [ + "interval", + "matrix", + "templates" + ], + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "ObjectTemplateStatus defines the observed state of ObjectTemplate", + "properties": { + "appliedResources": { + "items": { + "properties": { + "error": { + "type": "string" + }, + "ref": { + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + "required": [ + "apiVersion", + "kind", + "name" + ], + "type": "object", + "additionalProperties": false + }, + "success": { + "type": "boolean" + } + }, + "required": [ + "ref", + "success" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "conditions": { + "items": { + "description": "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }", + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "format": "date-time", + "type": "string" + }, + "message": { + "description": "message is a human readable message indicating details about the transition. This may be an empty string.", + "maxLength": 32768, + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + "format": "int64", + "minimum": 0, + "type": "integer" + }, + "reason": { + "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "enum": [ + "True", + "False", + "Unknown" + ], + "type": "string" + }, + "type": { + "description": "type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)", + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", + "type": "string" + } + }, + "required": [ + "lastTransitionTime", + "message", + "reason", + "status", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +} diff --git a/templates.kluctl.io/texttemplate_v1alpha1.json b/templates.kluctl.io/texttemplate_v1alpha1.json new file mode 100644 index 00000000..7bb675a7 --- /dev/null +++ b/templates.kluctl.io/texttemplate_v1alpha1.json @@ -0,0 +1,176 @@ +{ + "description": "TextTemplate is the Schema for the texttemplates API", + "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": "TextTemplateSpec defines the desired state of TextTemplate", + "properties": { + "inputs": { + "items": { + "properties": { + "name": { + "type": "string" + }, + "object": { + "properties": { + "jsonPath": { + "type": "string" + }, + "ref": { + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + "required": [ + "apiVersion", + "kind", + "name" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "ref" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "serviceAccountName": { + "description": "The name of the Kubernetes service account to impersonate when reconciling this TextTemplate. If omitted, the \"default\" service account is used.", + "type": "string" + }, + "suspend": { + "default": false, + "description": "Suspend can be used to suspend the reconciliation of this object.", + "type": "boolean" + }, + "template": { + "type": "string" + }, + "templateRef": { + "properties": { + "configMap": { + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + "required": [ + "key", + "name" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "TextTemplateStatus defines the observed state of TextTemplate", + "properties": { + "conditions": { + "items": { + "description": "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }", + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "format": "date-time", + "type": "string" + }, + "message": { + "description": "message is a human readable message indicating details about the transition. This may be an empty string.", + "maxLength": 32768, + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + "format": "int64", + "minimum": 0, + "type": "integer" + }, + "reason": { + "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "enum": [ + "True", + "False", + "Unknown" + ], + "type": "string" + }, + "type": { + "description": "type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)", + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", + "type": "string" + } + }, + "required": [ + "lastTransitionTime", + "message", + "reason", + "status", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "result": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +}