-
Notifications
You must be signed in to change notification settings - Fork 115
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
Support CustomTimeouts in Kubernetes #672
Comments
Alternatively, it might make more sense to piggyback on top of the existing annotation, and simply set it based on I think the semantics are slightly different; the existing |
Let's focus on making sure |
Chatted with @stack72 about implementing this, and sounds like it should be pretty straightforward. Here are some links that should be useful for the implementation: Read the annotation:
Use the optional override (used in each resource awaiter in pulumi-kubernetes/pkg/await/core_pod.go Line 146 in 0a762c7
Provider implementation that talks to the engine: |
Fixes: #672 This will allow the user to continue to use the timeout annotation or to pass the CustomTimeouts parameters as part of ResourceOptions The order of operations will be: 1. Use CustomTimeouts passes in ResourceOpts 2. Use the annotations (which will be deprecated later) 3. Use the defaults specified in code This means this code will allow us to have a timeout on app creation of 10s ``` const appName = "my-app"; const appLabels = { appClass: appName }; const deployment = new k8s.apps.v1.Deployment(`${appName}-dep`, { metadata: { labels: appLabels }, spec: { replicas: 2, selector: { matchLabels: appLabels }, template: { metadata: { labels: appLabels }, spec: { containers: [{ name: appName, image: "nginx", ports: [{ name: "http", containerPort: 80 }] }], } } }, }, { provider: cluster.provider, customTimeouts: { create: "10s", } }); ``` this allows to get an error as
Fixes: #672 This will allow the user to continue to use the timeout annotation or to pass the CustomTimeouts parameters as part of ResourceOptions The order of operations will be: 1. Use CustomTimeouts passes in ResourceOpts 2. Use the annotations (which will be deprecated later) 3. Use the defaults specified in code This means this code will allow us to have a timeout on app creation of 10s ``` const appName = "my-app"; const appLabels = { appClass: appName }; const deployment = new k8s.apps.v1.Deployment(`${appName}-dep`, { metadata: { labels: appLabels }, spec: { replicas: 2, selector: { matchLabels: appLabels }, template: { metadata: { labels: appLabels }, spec: { containers: [{ name: appName, image: "nginx", ports: [{ name: "http", containerPort: 80 }] }], } } }, }, { provider: cluster.provider, customTimeouts: { create: "10s", } }); ``` this allows to get an error as
Fixes: #672 This will allow the user to continue to use the timeout annotation or to pass the CustomTimeouts parameters as part of ResourceOptions The order of operations will be: 1. Use CustomTimeouts passes in ResourceOpts 2. Use the annotations (which will be deprecated later) 3. Use the defaults specified in code This means this code will allow us to have a timeout on app creation of 10s ``` const appName = "my-app"; const appLabels = { appClass: appName }; const deployment = new k8s.apps.v1.Deployment(`${appName}-dep`, { metadata: { labels: appLabels }, spec: { replicas: 2, selector: { matchLabels: appLabels }, template: { metadata: { labels: appLabels }, spec: { containers: [{ name: appName, image: "nginx", ports: [{ name: "http", containerPort: 80 }] }], } } }, }, { provider: cluster.provider, customTimeouts: { create: "10s", } }); ``` this allows to get an error as
Fixes: #672 This will allow the user to continue to use the timeout annotation or to pass the CustomTimeouts parameters as part of ResourceOptions The order of operations will be: 1. Use CustomTimeouts passes in ResourceOpts 2. Use the annotations (which will be deprecated later) 3. Use the defaults specified in code This means this code will allow us to have a timeout on app creation of 10s ``` const appName = "my-app"; const appLabels = { appClass: appName }; const deployment = new k8s.apps.v1.Deployment(`${appName}-dep`, { metadata: { labels: appLabels }, spec: { replicas: 2, selector: { matchLabels: appLabels }, template: { metadata: { labels: appLabels }, spec: { containers: [{ name: appName, image: "nginx", ports: [{ name: "http", containerPort: 80 }] }], } } }, }, { provider: cluster.provider, customTimeouts: { create: "10s", } }); ``` this allows to get an error as
Fixes: #672 This will allow the user to continue to use the timeout annotation or to pass the CustomTimeouts parameters as part of ResourceOptions The order of operations will be: 1. Use CustomTimeouts passes in ResourceOpts 2. Use the annotations (which will be deprecated later) 3. Use the defaults specified in code This means this code will allow us to have a timeout on app creation of 10s ``` const appName = "my-app"; const appLabels = { appClass: appName }; const deployment = new k8s.apps.v1.Deployment(`${appName}-dep`, { metadata: { labels: appLabels }, spec: { replicas: 2, selector: { matchLabels: appLabels }, template: { metadata: { labels: appLabels }, spec: { containers: [{ name: appName, image: "nginx", ports: [{ name: "http", containerPort: 80 }] }], } } }, }, { provider: cluster.provider, customTimeouts: { create: "10s", } }); ``` this allows to get an error as
Fixes: #672 This will allow the user to continue to use the timeout annotation or to pass the CustomTimeouts parameters as part of ResourceOptions The order of operations will be: 1. Use CustomTimeouts passes in ResourceOpts 2. Use the annotations (which will be deprecated later) 3. Use the defaults specified in code This means this code will allow us to have a timeout on app creation of 10s ``` const appName = "my-app"; const appLabels = { appClass: appName }; const deployment = new k8s.apps.v1.Deployment(`${appName}-dep`, { metadata: { labels: appLabels }, spec: { replicas: 2, selector: { matchLabels: appLabels }, template: { metadata: { labels: appLabels }, spec: { containers: [{ name: appName, image: "nginx", ports: [{ name: "http", containerPort: 80 }] }], } } }, }, { provider: cluster.provider, customTimeouts: { create: "10s", } }); ``` this allows to get an error as
* Allow ResourceOptions customTimeouts options to be respected Fixes: #672 This will allow the user to continue to use the timeout annotation or to pass the CustomTimeouts parameters as part of ResourceOptions The order of operations will be: 1. Use CustomTimeouts passes in ResourceOpts 2. Use the annotations (which will be deprecated later) 3. Use the defaults specified in code This means this code will allow us to have a timeout on app creation of 10s ``` const appName = "my-app"; const appLabels = { appClass: appName }; const deployment = new k8s.apps.v1.Deployment(`${appName}-dep`, { metadata: { labels: appLabels }, spec: { replicas: 2, selector: { matchLabels: appLabels }, template: { metadata: { labels: appLabels }, spec: { containers: [{ name: appName, image: "nginx", ports: [{ name: "http", containerPort: 80 }] }], } } }, }, { provider: cluster.provider, customTimeouts: { create: "10s", } }); ``` this allows to get an error as * Update comment on overriding resource timeouts
pulumi/pulumi#2885 added an option to set timeouts that is common across all providers. Deprecate the k8s provider
timeoutSeconds
annotation in favor if the new option, and plumb the changes through the provider.The text was updated successfully, but these errors were encountered: