/// <summary> /// Initializes a new instance of the V1NetworkPolicyPort class. /// </summary> /// <param name="endPort">If set, indicates that the range of ports /// from port to endPort, inclusive, should be allowed by the policy. /// This field cannot be defined if the port field is not defined or if /// the port field is defined as a named (string) port. The endPort /// must be equal or greater than port. This feature is in Alpha state /// and should be enabled using the Feature Gate /// "NetworkPolicyEndPort".</param> /// <param name="port">The port on the given protocol. This can either /// be a numerical or named port on a pod. If this field is not /// provided, this matches all port names and numbers. If present, only /// traffic on the specified protocol AND port will be matched.</param> /// <param name="protocol">The protocol (TCP, UDP, or SCTP) which /// traffic must match. If not specified, this field defaults to /// TCP.</param> public V1NetworkPolicyPort(int?endPort = default(int?), IntstrIntOrString port = default(IntstrIntOrString), string protocol = default(string)) { EndPort = endPort; Port = port; Protocol = protocol; CustomInit(); }
/// <summary> /// Initializes a new instance of the Extensionsv1beta1IngressBackend /// class. /// </summary> /// <param name="resource">Resource is an ObjectRef to another /// Kubernetes resource in the namespace of the Ingress object. If /// resource is specified, serviceName and servicePort must not be /// specified.</param> /// <param name="serviceName">Specifies the name of the referenced /// service.</param> /// <param name="servicePort">Specifies the port of the referenced /// service.</param> public Extensionsv1beta1IngressBackend(V1TypedLocalObjectReference resource = default(V1TypedLocalObjectReference), string serviceName = default(string), IntstrIntOrString servicePort = default(IntstrIntOrString)) { Resource = resource; ServiceName = serviceName; ServicePort = servicePort; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta1PodDisruptionBudgetSpec /// class. /// </summary> /// <param name="maxUnavailable">An eviction is allowed if at most /// "maxUnavailable" pods selected by "selector" are unavailable after /// the eviction, i.e. even in absence of the evicted pod. For example, /// one can prevent all voluntary evictions by specifying 0. This is a /// mutually exclusive setting with "minAvailable".</param> /// <param name="minAvailable">An eviction is allowed if at least /// "minAvailable" pods selected by "selector" will still be available /// after the eviction, i.e. even in the absence of the evicted pod. /// So for example you can prevent all voluntary evictions by /// specifying "100%".</param> /// <param name="selector">Label query over pods whose evictions are /// managed by the disruption budget.</param> public V1beta1PodDisruptionBudgetSpec(IntstrIntOrString maxUnavailable = default(IntstrIntOrString), IntstrIntOrString minAvailable = default(IntstrIntOrString), V1LabelSelector selector = default(V1LabelSelector)) { MaxUnavailable = maxUnavailable; MinAvailable = minAvailable; Selector = selector; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta1FrontendRule class. /// </summary> /// <param name="port">Port indicates the frontend port where HAProxy /// is listening for connection</param> /// <param name="rules">Serialized rules</param> public V1beta1FrontendRule(V1beta1AuthOption auth = default(V1beta1AuthOption), k8s.Models.IntstrIntOrString port = default(k8s.Models.IntstrIntOrString), IList <string> rules = default(IList <string>)) { Auth = auth; Port = port; Rules = rules; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1ServicePort class. /// </summary> /// <param name="port">The port that will be exposed by this /// service.</param> /// <param name="name">The name of this port within the service. This /// must be a DNS_LABEL. All ports within a ServiceSpec must have /// unique names. This maps to the 'Name' field in EndpointPort /// objects. Optional if only one ServicePort is defined on this /// service.</param> /// <param name="nodePort">The port on each node on which this service /// is exposed when type=NodePort or LoadBalancer. Usually assigned by /// the system. If specified, it will be allocated to the service if /// unused or else creation of the service will fail. Default is to /// auto-allocate a port if the ServiceType of this Service requires /// one. More info: /// https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport</param> /// <param name="protocol">The IP protocol for this port. Supports /// "TCP", "UDP", and "SCTP". Default is TCP.</param> /// <param name="targetPort">Number or name of the port to access on /// the pods targeted by the service. Number must be in the range 1 to /// 65535. Name must be an IANA_SVC_NAME. If this is a string, it will /// be looked up as a named port in the target Pod's container ports. /// If this is not specified, the value of the 'port' field is used (an /// identity map). This field is ignored for services with /// clusterIP=None, and should be omitted or set equal to the 'port' /// field. More info: /// https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service</param> public V1ServicePort(int port, string name = default(string), int?nodePort = default(int?), string protocol = default(string), IntstrIntOrString targetPort = default(IntstrIntOrString)) { Name = name; NodePort = nodePort; Port = port; Protocol = protocol; TargetPort = targetPort; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1HTTPGetAction class. /// </summary> /// <param name="port">Name or number of the port to access on the /// container. Number must be in the range 1 to 65535. Name must be an /// IANA_SVC_NAME.</param> /// <param name="host">Host name to connect to, defaults to the pod IP. /// You probably want to set "Host" in httpHeaders instead.</param> /// <param name="httpHeaders">Custom headers to set in the request. /// HTTP allows repeated headers.</param> /// <param name="path">Path to access on the HTTP server.</param> /// <param name="scheme">Scheme to use for connecting to the host. /// Defaults to HTTP.</param> public V1HTTPGetAction(IntstrIntOrString port, string host = default(string), IList <V1HTTPHeader> httpHeaders = default(IList <V1HTTPHeader>), string path = default(string), string scheme = default(string)) { Host = host; HttpHeaders = httpHeaders; Path = path; Port = port; Scheme = scheme; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta1HTTPIngressRuleValue /// class. /// </summary> /// <param name="paths">A collection of paths that map requests to /// backends.</param> /// <param name="address">The network address to listen HTTP(s) /// connections on.</param> /// <param name="noTLS">Set noTLS = true to force plain text. Else, /// auto detect like present</param> /// <param name="nodePort">Specifies the node port of the referenced /// service.</param> /// <param name="port">port to listen http(s) connections.</param> public V1beta1HTTPIngressRuleValue(IList <V1beta1HTTPIngressPath> paths, string address = default(string), bool?noTLS = default(bool?), k8s.Models.IntstrIntOrString nodePort = default(k8s.Models.IntstrIntOrString), k8s.Models.IntstrIntOrString port = default(k8s.Models.IntstrIntOrString)) { Address = address; NoTLS = noTLS; NodePort = nodePort; Paths = paths; Port = port; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta1IngressBackend class. /// </summary> /// <param name="backendRules">Serialized HAProxy rules to apply on /// server backend including request, response or header rewrite. acls /// also can be used. /// https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#1</param> /// <param name="hostNames">Host names to forward traffic to. If empty /// traffic will be forwarded to all subsets instance. If set only /// matched hosts will get the traffic. This is an handy way to send /// traffic to Specific StatefulSet pod. IE. Setting [web-0] will send /// traffic to only web-0 host for this StatefulSet, /// https://kubernetes.io/docs/tasks/stateful-application/basic-stateful-set/#creating-a-statefulset</param> /// <param name="name">User can specify backend name for using it with /// custom acl Otherwise it will be generated</param> /// <param name="serviceName">Specifies the name of the referenced /// service.</param> /// <param name="servicePort">Specifies the port of the referenced /// service.</param> public V1beta1IngressBackend(IList <string> backendRules = default(IList <string>), IList <string> hostNames = default(IList <string>), string name = default(string), string serviceName = default(string), k8s.Models.IntstrIntOrString servicePort = default(k8s.Models.IntstrIntOrString)) { BackendRules = backendRules; HostNames = hostNames; Name = name; ServiceName = serviceName; ServicePort = servicePort; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta1TCPIngressRuleValue class. /// </summary> /// <param name="address">The network address to listen TCP connections /// on.</param> /// <param name="alpn">Application-Layer Protocol Negotiation (ALPN) is /// a Transport Layer Security (TLS) extension for application layer /// protocol negotiation. ALPN allows the application layer to /// negotiate which protocol should be performed over a secure /// connection in a manner which avoids additional round trips and /// which is independent of the application layer protocols. It is used /// by HTTP/2. If provided a list of alpn will be added to port as alpn /// option1,option2,... If SecretName is Provided this secret will be /// used to terminate SSL with alpn options. If Secret name is not /// provided backend server is responsible for handling SSL.</param> /// <param name="backend">Backend to forward the requests.</param> /// <param name="noTLS">Set noTLS = true to force plain text. Else, /// auto detect like present</param> /// <param name="nodePort">Specifies the node port of the referenced /// service.</param> /// <param name="port">port to listen tcp connections.</param> public V1beta1TCPIngressRuleValue(string address = default(string), IList <string> alpn = default(IList <string>), V1beta1IngressBackend backend = default(V1beta1IngressBackend), bool?noTLS = default(bool?), k8s.Models.IntstrIntOrString nodePort = default(k8s.Models.IntstrIntOrString), k8s.Models.IntstrIntOrString port = default(k8s.Models.IntstrIntOrString)) { Address = address; Alpn = alpn; Backend = backend; NoTLS = noTLS; NodePort = nodePort; Port = port; CustomInit(); }
/// <summary> /// Initializes a new instance of the /// Appsv1beta1RollingUpdateDeployment class. /// </summary> /// <param name="maxSurge">The maximum number of pods that can be /// scheduled above the desired number of pods. Value can be an /// absolute number (ex: 5) or a percentage of desired pods (ex: 10%). /// This can not be 0 if MaxUnavailable is 0. Absolute number is /// calculated from percentage by rounding up. Defaults to 25%. /// Example: when this is set to 30%, the new ReplicaSet can be scaled /// up immediately when the rolling update starts, such that the total /// number of old and new pods do not exceed 130% of desired pods. Once /// old pods have been killed, new ReplicaSet can be scaled up further, /// ensuring that total number of pods running at any time during the /// update is at most 130% of desired pods.</param> /// <param name="maxUnavailable">The maximum number of pods that can be /// unavailable during the update. Value can be an absolute number (ex: /// 5) or a percentage of desired pods (ex: 10%). Absolute number is /// calculated from percentage by rounding down. This can not be 0 if /// MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, /// the old ReplicaSet can be scaled down to 70% of desired pods /// immediately when the rolling update starts. Once new pods are /// ready, old ReplicaSet can be scaled down further, followed by /// scaling up the new ReplicaSet, ensuring that the total number of /// pods available at all times during the update is at least 70% of /// desired pods.</param> public Appsv1beta1RollingUpdateDeployment(IntstrIntOrString maxSurge = default(IntstrIntOrString), IntstrIntOrString maxUnavailable = default(IntstrIntOrString)) { MaxSurge = maxSurge; MaxUnavailable = maxUnavailable; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1TCPSocketAction class. /// </summary> /// <param name="port">Number or name of the port to access on the /// container. Number must be in the range 1 to 65535. Name must be an /// IANA_SVC_NAME.</param> /// <param name="host">Optional: Host name to connect to, defaults to /// the pod IP.</param> public V1TCPSocketAction(IntstrIntOrString port, string host = default(string)) { Host = host; Port = port; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta2RollingUpdateDaemonSet /// class. /// </summary> /// <param name="maxUnavailable">The maximum number of DaemonSet pods /// that can be unavailable during the update. Value can be an absolute /// number (ex: 5) or a percentage of total number of DaemonSet pods at /// the start of the update (ex: 10%). Absolute number is calculated /// from percentage by rounding up. This cannot be 0. Default value is /// 1. Example: when this is set to 30%, at most 30% of the total /// number of nodes that should be running the daemon pod (i.e. /// status.desiredNumberScheduled) can have their pods stopped for an /// update at any given time. The update starts by stopping at most 30% /// of those DaemonSet pods and then brings up new DaemonSet pods in /// their place. Once the new pods are available, it then proceeds onto /// other DaemonSet pods, thus ensuring that at least 70% of original /// number of DaemonSet pods are available at all times during the /// update.</param> public V1beta2RollingUpdateDaemonSet(IntstrIntOrString maxUnavailable = default(IntstrIntOrString)) { MaxUnavailable = maxUnavailable; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta1NetworkPolicyPort class. /// </summary> /// <param name="port">If specified, the port on the given protocol. /// This can either be a numerical or named port on a pod. If this /// field is not provided, this matches all port names and numbers. If /// present, only traffic on the specified protocol AND port will be /// matched.</param> /// <param name="protocol">Optional. The protocol (TCP or UDP) which /// traffic must match. If not specified, this field defaults to /// TCP.</param> public V1beta1NetworkPolicyPort(IntstrIntOrString port = default(IntstrIntOrString), string protocol = default(string)) { Port = port; Protocol = protocol; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta1IngressBackend class. /// </summary> /// <param name="serviceName">Specifies the name of the referenced /// service.</param> /// <param name="servicePort">Specifies the port of the referenced /// service.</param> public V1beta1IngressBackend(string serviceName, IntstrIntOrString servicePort) { ServiceName = serviceName; ServicePort = servicePort; CustomInit(); }
protected bool Equals(IntstrIntOrString other) { return(string.Equals(Value, other.Value)); }