-
Notifications
You must be signed in to change notification settings - Fork 13
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
[teraslice] add typescript types to KubernetesV2 backend #3812
Conversation
packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/k8s.ts
Outdated
Show resolved
Hide resolved
packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/index.ts
Outdated
Show resolved
Hide resolved
packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/k8sResource.ts
Outdated
Show resolved
Hide resolved
packages/teraslice/test/lib/cluster/services/cluster/backends/kubernetes/v2/k8s-v2-spec.ts
Outdated
Show resolved
Hide resolved
...es/teraslice/test/lib/cluster/services/cluster/backends/kubernetes/v2/k8sResource-v2-spec.ts
Outdated
Show resolved
Hide resolved
packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/k8s.ts
Outdated
Show resolved
Hide resolved
packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/utils.ts
Outdated
Show resolved
Hide resolved
packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/utils.ts
Outdated
Show resolved
Hide resolved
@@ -2,6 +2,10 @@ | |||
// output for nock | |||
// env DEBUG='nock*' make test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not be left in here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That got copied over from kubernetes v1. I'll get rid of it.
@@ -174,6 +174,7 @@ export class TestContext implements i.Context { | |||
analytics: 'yearly', | |||
state: 'montly', | |||
}, | |||
kubernetes_api_poll_delay: 1000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only kubernetes config or are there other ones as well?
packages/types/src/teraslice.ts
Outdated
@@ -480,7 +480,7 @@ export interface Config { | |||
execution_controller_targets?: ExecutionControllerTargets[]; | |||
hostname: string; | |||
index_rollover_frequency: IndexRolloverFrequency; | |||
kubernetes_api_poll_delay?: number | 1000; | |||
kubernetes_api_poll_delay: number | 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so there seems to be a mistake, there should be no numbers at all in interface Config
, also, the other kubernetes config values, are they really optional? Or do they have a real default setting that should be manifested in the types?
bump: (minor) @terascope/[email protected], @terascope/[email protected] bump: (minor) [email protected], [email protected] bump: (minor) [email protected], [email protected] bump: (minor) [email protected], @terascope/[email protected] bump: (minor) @terascope/[email protected], @terascope/[email protected]
This PR makes the following changes:
kubernetesV2
backendK8sResource
an abstract class and addK8sJobResource
,K8sServiceResource
, andK8sDeploymentResource
classes. This makes creating resources from templates cleaner.K8sResource
types asTSResource
types with all required fields defined.