fix watch generator uses different name pattern from gen project (#369)

* fix watch generator uses different name pattern from gen project

* run generator to refresh bad files

* fix npe when not x-kind
This commit is contained in:
Boshi Lian
2020-03-17 13:57:26 -07:00
committed by GitHub
parent da3bff5b3e
commit af741302de
4 changed files with 938 additions and 77 deletions

View File

@@ -13,34 +13,38 @@ namespace KubernetesWatchGenerator
{
class Program
{
static readonly Dictionary<string, string> ClassNameMap = new Dictionary<string, string>();
static async Task Main(string[] args)
{
if (args.Length < 2)
{
Console.Error.WriteLine($"usage {args[0]} path/to/csharp.settings");
Console.Error.WriteLine($"usage {args[0]} path/to/generated");
Environment.Exit(1);
}
var (kubernetesBranch, outputDirectory) = LoadSettings(args[1]);
var outputDirectory = args[1];
var specUrl = $"https://raw.githubusercontent.com/kubernetes/kubernetes/{kubernetesBranch}/api/openapi-spec/swagger.json";
var specPath = $"{kubernetesBranch}-swagger.json";
// Read the spec trimmed
// here we cache all name in gen project for later use
var swagger = await SwaggerDocument.FromFileAsync(Path.Combine(args[1], "swagger.json"));
foreach (var (k, v) in swagger.Definitions)
{
if (v.ExtensionData?.TryGetValue("x-kubernetes-group-version-kind", out var _) == true)
{
var groupVersionKindElements = (object[])v.ExtensionData["x-kubernetes-group-version-kind"];
var groupVersionKind = (Dictionary<string, object>)groupVersionKindElements[0];
// Download the Kubernetes spec, and cache it locally. Don't download it if already present in the cache.
if (!File.Exists(specPath))
{
HttpClient client = new HttpClient();
using (var response = await client.GetAsync(specUrl, HttpCompletionOption.ResponseHeadersRead))
using (var stream = await response.Content.ReadAsStreamAsync())
using (var output = File.Open(specPath, FileMode.Create, FileAccess.ReadWrite))
{
await stream.CopyToAsync(output);
var group = (string)groupVersionKind["group"];
var kind = (string)groupVersionKind["kind"];
var version = (string)groupVersionKind["version"];
ClassNameMap[$"{group}_{kind}_{version}"] = ToPascalCase(k.Replace(".", ""));
}
}
// Read the spec
var swagger = await SwaggerDocument.FromFileAsync(specPath);
// gen project removed all watch operations, so here we switch back to unprocessed version
swagger = await SwaggerDocument.FromFileAsync(Path.Combine(args[1], "swagger.json.unprocessed"));
// Register helpers used in the templating.
Helpers.Register(nameof(ToXmlDoc), ToXmlDoc);
@@ -58,17 +62,6 @@ namespace KubernetesWatchGenerator
// That's usually because there are different version of the same object (e.g. for deployments).
var blacklistedOperations = new HashSet<string>()
{
"watchAppsV1beta1NamespacedDeployment",
"watchAppsV1beta2NamespacedDeployment",
"watchExtensionsV1beta1NamespacedDeployment",
"watchExtensionsV1beta1NamespacedNetworkPolicy",
"watchPolicyV1beta1PodSecurityPolicy",
"watchExtensionsV1beta1PodSecurityPolicy",
"watchExtensionsV1beta1NamespacedIngress",
"watchNamespacedIngress",
"watchExtensionsV1beta1NamespacedIngressList",
"watchNetworkingV1beta1NamespacedIngress",
"watchNetworkingV1beta1NamespacedIngressList",
};
var watchOperations = swagger.Operations.Where(
@@ -83,16 +76,7 @@ namespace KubernetesWatchGenerator
// Generate the interface declarations
var skippedTypes = new HashSet<string>()
{
"V1beta1Deployment",
"V1beta1DeploymentList",
"V1beta1DeploymentRollback",
"V1beta1DeploymentRollback",
"V1beta1Scale",
"V1beta1PodSecurityPolicy",
"V1beta1PodSecurityPolicyList",
"V1WatchEvent",
"V1beta1Ingress",
"V1beta1IngressList"
};
var definitions = swagger.Definitions.Values
@@ -101,40 +85,7 @@ namespace KubernetesWatchGenerator
&& d.ExtensionData.ContainsKey("x-kubernetes-group-version-kind")
&& !skippedTypes.Contains(GetClassName(d)));
// Render.
Render.FileToFile("ModelExtensions.cs.template", definitions, $"{outputDirectory}ModelExtensions.cs");
}
private static (string kubernetesBranch, string outputDirectory) LoadSettings(string path)
{
var fileInfo = new FileInfo(path);
if (!fileInfo.Exists)
{
Console.Error.WriteLine("Cannot find csharp.settings");
Environment.Exit(1);
}
using (var s = new StreamReader(fileInfo.OpenRead()))
{
string l;
while ((l = s.ReadLine()) != null)
{
if (l.Contains("KUBERNETES_BRANCH"))
{
var kubernetesBranch = l.Split("=")[1];
var outputDirectory = Path.Combine(fileInfo.DirectoryName, @"src/KubernetesClient/generated/");
Console.WriteLine($"Using branch {kubernetesBranch} output {outputDirectory}");
return (kubernetesBranch, outputDirectory);
}
}
}
Console.Error.WriteLine("Cannot find KUBERNETES_BRANCH in csharp.settings");
Environment.Exit(1);
return (null, null);
Render.FileToFile("ModelExtensions.cs.template", definitions, Path.Combine(outputDirectory, "ModelExtensions.cs"));
}
static void ToXmlDoc(RenderContext context, IList<object> arguments, IDictionary<string, object> options, RenderBlock fn, RenderBlock inverse)
@@ -150,7 +101,7 @@ namespace KubernetesWatchGenerator
{
if (!first)
{
context.Write(Environment.NewLine);
context.Write("\n");
context.Write(" /// ");
}
else
@@ -178,12 +129,16 @@ namespace KubernetesWatchGenerator
static string GetClassName(SwaggerOperation watchOperation)
{
var groupVersionKind = (Dictionary<string, object>)watchOperation.ExtensionData["x-kubernetes-group-version-kind"];
return GetClassName(groupVersionKind);
}
private static string GetClassName(Dictionary<string, object> groupVersionKind)
{
var group = (string)groupVersionKind["group"];
var kind = (string)groupVersionKind["kind"];
var version = (string)groupVersionKind["version"];
var className = $"{ToPascalCase(version)}{kind}";
return className;
return ClassNameMap[$"{group}_{kind}_{version}"];
}
private static string GetClassName(JsonSchema4 definition)
@@ -191,11 +146,7 @@ namespace KubernetesWatchGenerator
var groupVersionKindElements = (object[])definition.ExtensionData["x-kubernetes-group-version-kind"];
var groupVersionKind = (Dictionary<string, object>)groupVersionKindElements[0];
var group = groupVersionKind["group"] as string;
var version = groupVersionKind["version"] as string;
var kind = groupVersionKind["kind"] as string;
return $"{ToPascalCase(version)}{ToPascalCase(kind)}";
return GetClassName(groupVersionKind);
}
static void GetKind(RenderContext context, IList<object> arguments, IDictionary<string, object> options, RenderBlock fn, RenderBlock inverse)
@@ -350,7 +301,7 @@ namespace KubernetesWatchGenerator
{
string pathExpression = operation.Path;
if(pathExpression.StartsWith("/"))
if (pathExpression.StartsWith("/"))
{
pathExpression = pathExpression.Substring(1);
}

View File

@@ -2226,6 +2226,84 @@ namespace k8s
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind Deployment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
/// <param name="name">
/// name of the Deployment
/// </param>
/// <param name="namespace">
/// object name and auth scope, such as for teams and projects
/// </param>
/// <param name="allowWatchBookmarks">
/// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
///
/// This field is beta.
/// </param>
/// <param name="continue">
/// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key".
///
/// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
/// </param>
/// <param name="fieldSelector">
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
/// </param>
/// <param name="labelSelector">
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
/// </param>
/// <param name="limit">
/// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
///
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
/// </param>
/// <param name="pretty">
/// If 'true', then the output is pretty printed.
/// </param>
/// <param name="resourceVersion">
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
/// </param>
/// <param name="timeoutSeconds">
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
/// </param>
/// <param name="watch">
/// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
/// </param>
/// <param name="customHeaders">
/// The headers that will be added to request.
/// </param>
/// <param name="onEvent">
/// The action to invoke when the server sends a new event.
/// </param>
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
/// </returns>
Task<Watcher<Appsv1beta1Deployment>> WatchNamespacedDeploymentAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Appsv1beta1Deployment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind StatefulSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
@@ -2460,6 +2538,84 @@ namespace k8s
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind Deployment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
/// <param name="name">
/// name of the Deployment
/// </param>
/// <param name="namespace">
/// object name and auth scope, such as for teams and projects
/// </param>
/// <param name="allowWatchBookmarks">
/// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
///
/// This field is beta.
/// </param>
/// <param name="continue">
/// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key".
///
/// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
/// </param>
/// <param name="fieldSelector">
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
/// </param>
/// <param name="labelSelector">
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
/// </param>
/// <param name="limit">
/// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
///
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
/// </param>
/// <param name="pretty">
/// If 'true', then the output is pretty printed.
/// </param>
/// <param name="resourceVersion">
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
/// </param>
/// <param name="timeoutSeconds">
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
/// </param>
/// <param name="watch">
/// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
/// </param>
/// <param name="customHeaders">
/// The headers that will be added to request.
/// </param>
/// <param name="onEvent">
/// The action to invoke when the server sends a new event.
/// </param>
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
/// </returns>
Task<Watcher<V1beta2Deployment>> WatchNamespacedDeploymentAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta2Deployment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind ReplicaSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
@@ -3622,6 +3778,240 @@ namespace k8s
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind Deployment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
/// <param name="name">
/// name of the Deployment
/// </param>
/// <param name="namespace">
/// object name and auth scope, such as for teams and projects
/// </param>
/// <param name="allowWatchBookmarks">
/// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
///
/// This field is beta.
/// </param>
/// <param name="continue">
/// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key".
///
/// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
/// </param>
/// <param name="fieldSelector">
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
/// </param>
/// <param name="labelSelector">
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
/// </param>
/// <param name="limit">
/// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
///
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
/// </param>
/// <param name="pretty">
/// If 'true', then the output is pretty printed.
/// </param>
/// <param name="resourceVersion">
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
/// </param>
/// <param name="timeoutSeconds">
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
/// </param>
/// <param name="watch">
/// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
/// </param>
/// <param name="customHeaders">
/// The headers that will be added to request.
/// </param>
/// <param name="onEvent">
/// The action to invoke when the server sends a new event.
/// </param>
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
/// </returns>
Task<Watcher<Extensionsv1beta1Deployment>> WatchNamespacedDeploymentAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Extensionsv1beta1Deployment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind Ingress. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
/// <param name="name">
/// name of the Ingress
/// </param>
/// <param name="namespace">
/// object name and auth scope, such as for teams and projects
/// </param>
/// <param name="allowWatchBookmarks">
/// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
///
/// This field is beta.
/// </param>
/// <param name="continue">
/// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key".
///
/// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
/// </param>
/// <param name="fieldSelector">
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
/// </param>
/// <param name="labelSelector">
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
/// </param>
/// <param name="limit">
/// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
///
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
/// </param>
/// <param name="pretty">
/// If 'true', then the output is pretty printed.
/// </param>
/// <param name="resourceVersion">
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
/// </param>
/// <param name="timeoutSeconds">
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
/// </param>
/// <param name="watch">
/// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
/// </param>
/// <param name="customHeaders">
/// The headers that will be added to request.
/// </param>
/// <param name="onEvent">
/// The action to invoke when the server sends a new event.
/// </param>
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
/// </returns>
Task<Watcher<Extensionsv1beta1Ingress>> WatchNamespacedIngressAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Extensionsv1beta1Ingress> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind NetworkPolicy. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
/// <param name="name">
/// name of the NetworkPolicy
/// </param>
/// <param name="namespace">
/// object name and auth scope, such as for teams and projects
/// </param>
/// <param name="allowWatchBookmarks">
/// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
///
/// This field is beta.
/// </param>
/// <param name="continue">
/// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key".
///
/// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
/// </param>
/// <param name="fieldSelector">
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
/// </param>
/// <param name="labelSelector">
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
/// </param>
/// <param name="limit">
/// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
///
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
/// </param>
/// <param name="pretty">
/// If 'true', then the output is pretty printed.
/// </param>
/// <param name="resourceVersion">
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
/// </param>
/// <param name="timeoutSeconds">
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
/// </param>
/// <param name="watch">
/// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
/// </param>
/// <param name="customHeaders">
/// The headers that will be added to request.
/// </param>
/// <param name="onEvent">
/// The action to invoke when the server sends a new event.
/// </param>
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
/// </returns>
Task<Watcher<V1beta1NetworkPolicy>> WatchNamespacedNetworkPolicyAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1NetworkPolicy> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind ReplicaSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
@@ -3700,6 +4090,80 @@ namespace k8s
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind PodSecurityPolicy. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
/// <param name="name">
/// name of the PodSecurityPolicy
/// </param>
/// <param name="allowWatchBookmarks">
/// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
///
/// This field is beta.
/// </param>
/// <param name="continue">
/// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key".
///
/// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
/// </param>
/// <param name="fieldSelector">
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
/// </param>
/// <param name="labelSelector">
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
/// </param>
/// <param name="limit">
/// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
///
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
/// </param>
/// <param name="pretty">
/// If 'true', then the output is pretty printed.
/// </param>
/// <param name="resourceVersion">
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
/// </param>
/// <param name="timeoutSeconds">
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
/// </param>
/// <param name="watch">
/// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
/// </param>
/// <param name="customHeaders">
/// The headers that will be added to request.
/// </param>
/// <param name="onEvent">
/// The action to invoke when the server sends a new event.
/// </param>
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
/// </returns>
Task<Watcher<Extensionsv1beta1PodSecurityPolicy>> WatchPodSecurityPolicyAsync(
string name,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Extensionsv1beta1PodSecurityPolicy> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind NetworkPolicy. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
@@ -3778,6 +4242,84 @@ namespace k8s
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind Ingress. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
/// <param name="name">
/// name of the Ingress
/// </param>
/// <param name="namespace">
/// object name and auth scope, such as for teams and projects
/// </param>
/// <param name="allowWatchBookmarks">
/// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
///
/// This field is beta.
/// </param>
/// <param name="continue">
/// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key".
///
/// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
/// </param>
/// <param name="fieldSelector">
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
/// </param>
/// <param name="labelSelector">
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
/// </param>
/// <param name="limit">
/// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
///
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
/// </param>
/// <param name="pretty">
/// If 'true', then the output is pretty printed.
/// </param>
/// <param name="resourceVersion">
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
/// </param>
/// <param name="timeoutSeconds">
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
/// </param>
/// <param name="watch">
/// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
/// </param>
/// <param name="customHeaders">
/// The headers that will be added to request.
/// </param>
/// <param name="onEvent">
/// The action to invoke when the server sends a new event.
/// </param>
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
/// </returns>
Task<Watcher<Networkingv1beta1Ingress>> WatchNamespacedIngressAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Networkingv1beta1Ingress> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind RuntimeClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
@@ -4004,6 +4546,80 @@ namespace k8s
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind PodSecurityPolicy. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>
/// <param name="name">
/// name of the PodSecurityPolicy
/// </param>
/// <param name="allowWatchBookmarks">
/// allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.
///
/// This field is beta.
/// </param>
/// <param name="continue">
/// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key".
///
/// This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.
/// </param>
/// <param name="fieldSelector">
/// A selector to restrict the list of returned objects by their fields. Defaults to everything.
/// </param>
/// <param name="labelSelector">
/// A selector to restrict the list of returned objects by their labels. Defaults to everything.
/// </param>
/// <param name="limit">
/// limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.
///
/// The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.
/// </param>
/// <param name="pretty">
/// If 'true', then the output is pretty printed.
/// </param>
/// <param name="resourceVersion">
/// When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.
/// </param>
/// <param name="timeoutSeconds">
/// Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.
/// </param>
/// <param name="watch">
/// Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.
/// </param>
/// <param name="customHeaders">
/// The headers that will be added to request.
/// </param>
/// <param name="onEvent">
/// The action to invoke when the server sends a new event.
/// </param>
/// <param name="onError">
/// The action to invoke when an error occurs.
/// </param>
/// <param name="onClosed">
/// The action to invoke when the server closes the connection.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// A <see cref="Task"/> which represents the asynchronous operation, and returns a new watcher.
/// </returns>
Task<Watcher<Policyv1beta1PodSecurityPolicy>> WatchPodSecurityPolicyAsync(
string name,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Policyv1beta1PodSecurityPolicy> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// watch changes to an object of kind ClusterRoleBinding. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
/// </summary>

View File

@@ -664,6 +664,29 @@ namespace k8s
return WatchObjectAsync<V1beta1ControllerRevision>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<Appsv1beta1Deployment>> WatchNamespacedDeploymentAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Appsv1beta1Deployment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1beta1/watch/namespaces/{@namespace}/deployments/{name}";
return WatchObjectAsync<Appsv1beta1Deployment>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V1beta1StatefulSet>> WatchNamespacedStatefulSetAsync(
string name,
@@ -733,6 +756,29 @@ namespace k8s
return WatchObjectAsync<V1beta2DaemonSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V1beta2Deployment>> WatchNamespacedDeploymentAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta2Deployment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/apps/v1beta2/watch/namespaces/{@namespace}/deployments/{name}";
return WatchObjectAsync<V1beta2Deployment>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V1beta2ReplicaSet>> WatchNamespacedReplicaSetAsync(
string name,
@@ -1076,6 +1122,75 @@ namespace k8s
return WatchObjectAsync<V1beta1DaemonSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<Extensionsv1beta1Deployment>> WatchNamespacedDeploymentAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Extensionsv1beta1Deployment> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/extensions/v1beta1/watch/namespaces/{@namespace}/deployments/{name}";
return WatchObjectAsync<Extensionsv1beta1Deployment>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<Extensionsv1beta1Ingress>> WatchNamespacedIngressAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Extensionsv1beta1Ingress> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/extensions/v1beta1/watch/namespaces/{@namespace}/ingresses/{name}";
return WatchObjectAsync<Extensionsv1beta1Ingress>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V1beta1NetworkPolicy>> WatchNamespacedNetworkPolicyAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, V1beta1NetworkPolicy> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/extensions/v1beta1/watch/namespaces/{@namespace}/networkpolicies/{name}";
return WatchObjectAsync<V1beta1NetworkPolicy>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V1beta1ReplicaSet>> WatchNamespacedReplicaSetAsync(
string name,
@@ -1099,6 +1214,28 @@ namespace k8s
return WatchObjectAsync<V1beta1ReplicaSet>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<Extensionsv1beta1PodSecurityPolicy>> WatchPodSecurityPolicyAsync(
string name,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Extensionsv1beta1PodSecurityPolicy> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/extensions/v1beta1/watch/podsecuritypolicies/{name}";
return WatchObjectAsync<Extensionsv1beta1PodSecurityPolicy>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V1NetworkPolicy>> WatchNamespacedNetworkPolicyAsync(
string name,
@@ -1122,6 +1259,29 @@ namespace k8s
return WatchObjectAsync<V1NetworkPolicy>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<Networkingv1beta1Ingress>> WatchNamespacedIngressAsync(
string name,
string @namespace,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Networkingv1beta1Ingress> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/networking.k8s.io/v1beta1/watch/namespaces/{@namespace}/ingresses/{name}";
return WatchObjectAsync<Networkingv1beta1Ingress>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V1alpha1RuntimeClass>> WatchRuntimeClassAsync(
string name,
@@ -1189,6 +1349,28 @@ namespace k8s
return WatchObjectAsync<V1beta1PodDisruptionBudget>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<Policyv1beta1PodSecurityPolicy>> WatchPodSecurityPolicyAsync(
string name,
bool? allowWatchBookmarks = null,
string @continue = null,
string fieldSelector = null,
string labelSelector = null,
int? limit = null,
bool? pretty = null,
string resourceVersion = null,
int? timeoutSeconds = null,
bool? watch = null,
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, Policyv1beta1PodSecurityPolicy> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"apis/policy/v1beta1/watch/podsecuritypolicies/{name}";
return WatchObjectAsync<Policyv1beta1PodSecurityPolicy>(path: path, @continue: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
/// <inheritdoc>
public Task<Watcher<V1ClusterRoleBinding>> WatchClusterRoleBindingAsync(
string name,

View File

@@ -140,6 +140,34 @@ namespace k8s.Models
public const string KubeGroup = "apps";
}
public partial class Appsv1beta1Deployment : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "Deployment";
public const string KubeGroup = "apps";
}
public partial class Appsv1beta1DeploymentList : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "DeploymentList";
public const string KubeGroup = "apps";
}
public partial class Appsv1beta1DeploymentRollback : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "DeploymentRollback";
public const string KubeGroup = "apps";
}
public partial class Appsv1beta1Scale : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "Scale";
public const string KubeGroup = "apps";
}
public partial class V1beta1StatefulSet : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
@@ -728,6 +756,41 @@ namespace k8s.Models
public const string KubeGroup = "extensions";
}
public partial class Extensionsv1beta1Deployment : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "Deployment";
public const string KubeGroup = "extensions";
}
public partial class Extensionsv1beta1DeploymentList : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "DeploymentList";
public const string KubeGroup = "extensions";
}
public partial class Extensionsv1beta1DeploymentRollback : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "DeploymentRollback";
public const string KubeGroup = "extensions";
}
public partial class Extensionsv1beta1Ingress : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "Ingress";
public const string KubeGroup = "extensions";
}
public partial class Extensionsv1beta1IngressList : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "IngressList";
public const string KubeGroup = "extensions";
}
public partial class V1beta1NetworkPolicy : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
@@ -742,6 +805,20 @@ namespace k8s.Models
public const string KubeGroup = "extensions";
}
public partial class Extensionsv1beta1PodSecurityPolicy : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "PodSecurityPolicy";
public const string KubeGroup = "extensions";
}
public partial class Extensionsv1beta1PodSecurityPolicyList : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "PodSecurityPolicyList";
public const string KubeGroup = "extensions";
}
public partial class V1beta1ReplicaSet : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
@@ -756,6 +833,13 @@ namespace k8s.Models
public const string KubeGroup = "extensions";
}
public partial class Extensionsv1beta1Scale : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "Scale";
public const string KubeGroup = "extensions";
}
public partial class V1NetworkPolicy : IKubernetesObject
{
public const string KubeApiVersion = "v1";
@@ -770,6 +854,20 @@ namespace k8s.Models
public const string KubeGroup = "networking.k8s.io";
}
public partial class Networkingv1beta1Ingress : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "Ingress";
public const string KubeGroup = "networking.k8s.io";
}
public partial class Networkingv1beta1IngressList : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "IngressList";
public const string KubeGroup = "networking.k8s.io";
}
public partial class V1alpha1RuntimeClass : IKubernetesObject
{
public const string KubeApiVersion = "v1alpha1";
@@ -819,6 +917,20 @@ namespace k8s.Models
public const string KubeGroup = "policy";
}
public partial class Policyv1beta1PodSecurityPolicy : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "PodSecurityPolicy";
public const string KubeGroup = "policy";
}
public partial class Policyv1beta1PodSecurityPolicyList : IKubernetesObject
{
public const string KubeApiVersion = "v1beta1";
public const string KubeKind = "PodSecurityPolicyList";
public const string KubeGroup = "policy";
}
public partial class V1ClusterRole : IKubernetesObject
{
public const string KubeApiVersion = "v1";