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

[teraslice] add typescript types to KubernetesV2 backend #3812

Merged
merged 30 commits into from
Nov 12, 2024
Merged

Conversation

busma13
Copy link
Contributor

@busma13 busma13 commented Oct 30, 2024

This PR makes the following changes:

  • Add types to functions and classes in the kubernetesV2 backend
  • Make K8sResource an abstract class and add K8sJobResource, K8sServiceResource, and K8sDeploymentResource classes. This makes creating resources from templates cleaner.
  • Extend K8sResource types as TSResource types with all required fields defined.
  • Add types to tests
  • bump teraslice from 2.6.3 to 2.7.0

@busma13 busma13 marked this pull request as ready for review October 31, 2024 18:38
@busma13 busma13 requested review from godber and jsnoble October 31, 2024 19:17
@godber godber changed the title [teraslice] K8s v2 types [teraslice] add typescript types to KubernetesV2 backend Oct 31, 2024
@@ -2,6 +2,10 @@
// output for nock
// env DEBUG='nock*' make test
Copy link
Member

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

Copy link
Contributor Author

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,
Copy link
Member

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?

@@ -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;
Copy link
Member

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?

@jsnoble jsnoble merged commit ac47251 into master Nov 12, 2024
48 checks passed
@jsnoble jsnoble deleted the k8sV2-types branch November 12, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants