Skip to content

Commit

Permalink
Deprecate disregard-status-with-annotation-selector and disregard-sta…
Browse files Browse the repository at this point in the history
…tus-with-label-selector
  • Loading branch information
wzshiming committed Mar 18, 2024
1 parent 643b90e commit 129e247
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 27 deletions.
2 changes: 0 additions & 2 deletions kustomize/kwok/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ spec:
- --manage-nodes-with-annotation-selector=kwok.x-k8s.io/node=fake
- --manage-nodes-with-label-selector=
- --manage-single-node=
- --disregard-status-with-annotation-selector=kwok.x-k8s.io/status=custom
- --disregard-status-with-label-selector=
- --node-ip=$(POD_IP)
- --node-port=10247
- --cidr=10.0.0.1/24
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/config/v1alpha1/kwok_configuration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ type KwokConfigurationOptions struct {

// If a Node/Pod is on a managed Node and has this annotation status will not be modified
// is the default value for flag --disregard-status-with-annotation-selector
// Deprecated: use Stage API instead
DisregardStatusWithAnnotationSelector string `json:"disregardStatusWithAnnotationSelector,omitempty"`

// If a Node/Pod is on a managed Node and has this label status will not be modified
// is the default value for flag --disregard-status-with-label-selector
// Deprecated: use Stage API instead
DisregardStatusWithLabelSelector string `json:"disregardStatusWithLabelSelector,omitempty"`

// ServerAddress is server address of the Kwok.
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/internalversion/kwok_configuration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ type KwokConfigurationOptions struct {
ManageNodesWithLabelSelector string

// If a Node/Pod is on a managed Node and has this annotation status will not be modified
// Deprecated: use Stage API instead
DisregardStatusWithAnnotationSelector string

// If a Node/Pod is on a managed Node and has this label status will not be modified
// Deprecated: use Stage API instead
DisregardStatusWithLabelSelector string

// ServerAddress is server address of the Kwok.
Expand Down
2 changes: 2 additions & 0 deletions pkg/kwok/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ func NewCommand(ctx context.Context) *cobra.Command {
cmd.Flags().StringVar(&flags.Options.ManageNodesWithAnnotationSelector, "manage-nodes-with-annotation-selector", flags.Options.ManageNodesWithAnnotationSelector, "Nodes that match the annotation selector will be watched and managed. It's conflicted with manage-all-nodes and manage-single-node.")
cmd.Flags().StringVar(&flags.Options.ManageNodesWithLabelSelector, "manage-nodes-with-label-selector", flags.Options.ManageNodesWithLabelSelector, "Nodes that match the label selector will be watched and managed. It's conflicted with manage-all-nodes and manage-single-node.")
cmd.Flags().StringVar(&flags.Options.DisregardStatusWithAnnotationSelector, "disregard-status-with-annotation-selector", flags.Options.DisregardStatusWithAnnotationSelector, "All node/pod status excluding the ones that match the annotation selector will be watched and managed.")
_ = cmd.Flags().MarkDeprecated("disregard-status-with-annotation-selector", "Please use Stage API instead")
cmd.Flags().StringVar(&flags.Options.DisregardStatusWithLabelSelector, "disregard-status-with-label-selector", flags.Options.DisregardStatusWithLabelSelector, "All node/pod status excluding the ones that match the label selector will be watched and managed.")
_ = cmd.Flags().MarkDeprecated("disregard-status-with-label-selector", "Please use Stage API instead")
cmd.Flags().StringVar(&flags.Kubeconfig, "kubeconfig", flags.Kubeconfig, "Path to the kubeconfig file to use")
cmd.Flags().StringVar(&flags.Master, "master", flags.Master, "The address of the Kubernetes API server (overrides any value in kubeconfig).")
cmd.Flags().StringVar(&flags.Options.ServerAddress, "server-address", flags.Options.ServerAddress, "Address to expose the server on")
Expand Down
6 changes: 4 additions & 2 deletions site/content/en/docs/generated/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -2488,7 +2488,8 @@ string
</td>
<td>
<p>If a Node/Pod is on a managed Node and has this annotation status will not be modified
is the default value for flag &ndash;disregard-status-with-annotation-selector</p>
is the default value for flag &ndash;disregard-status-with-annotation-selector
Deprecated: use Stage API instead</p>
</td>
</tr>
<tr>
Expand All @@ -2500,7 +2501,8 @@ string
</td>
<td>
<p>If a Node/Pod is on a managed Node and has this label status will not be modified
is the default value for flag &ndash;disregard-status-with-label-selector</p>
is the default value for flag &ndash;disregard-status-with-label-selector
Deprecated: use Stage API instead</p>
</td>
</tr>
<tr>
Expand Down
40 changes: 19 additions & 21 deletions site/content/en/docs/generated/kwok.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,24 @@ kwok [flags]
### Options

```
--cidr string CIDR of the pod ip (default "10.0.0.1/24")
-c, --config strings config path (default [~/.kwok/kwok.yaml])
--disregard-status-with-annotation-selector string All node/pod status excluding the ones that match the annotation selector will be watched and managed.
--disregard-status-with-label-selector string All node/pod status excluding the ones that match the label selector will be watched and managed.
--enable-crds strings List of CRDs to enable
--experimental-enable-cni Experimental support for getting pod ip from CNI, for CNI-related components, Only works with Linux
-h, --help help for kwok
--kubeconfig string Path to the kubeconfig file to use (default "~/.kube/config")
--manage-all-nodes All nodes will be watched and managed. It's conflicted with manage-nodes-with-annotation-selector, manage-nodes-with-label-selector and manage-single-node.
--manage-nodes-with-annotation-selector string Nodes that match the annotation selector will be watched and managed. It's conflicted with manage-all-nodes and manage-single-node.
--manage-nodes-with-label-selector string Nodes that match the label selector will be watched and managed. It's conflicted with manage-all-nodes and manage-single-node.
--manage-single-node string Node that matches the name will be watched and managed. It's conflicted with manage-nodes-with-annotation-selector, manage-nodes-with-label-selector and manage-all-nodes.
--master string The address of the Kubernetes API server (overrides any value in kubeconfig).
--node-ip string IP of the node
--node-lease-duration-seconds uint Duration of node lease seconds
--node-name string Name of the node
--node-port int Port of the node
--server-address string Address to expose the server on
--tls-cert-file string File containing the default x509 Certificate for HTTPS
--tls-private-key-file string File containing the default x509 private key matching --tls-cert-file
-v, --v log-level number for the log level verbosity (DEBUG, INFO, WARN, ERROR) or (-4, 0, 4, 8) (default INFO)
--cidr string CIDR of the pod ip (default "10.0.0.1/24")
-c, --config strings config path (default [~/.kwok/kwok.yaml])
--enable-crds strings List of CRDs to enable
--experimental-enable-cni Experimental support for getting pod ip from CNI, for CNI-related components, Only works with Linux
-h, --help help for kwok
--kubeconfig string Path to the kubeconfig file to use (default "~/.kube/config")
--manage-all-nodes All nodes will be watched and managed. It's conflicted with manage-nodes-with-annotation-selector, manage-nodes-with-label-selector and manage-single-node.
--manage-nodes-with-annotation-selector string Nodes that match the annotation selector will be watched and managed. It's conflicted with manage-all-nodes and manage-single-node.
--manage-nodes-with-label-selector string Nodes that match the label selector will be watched and managed. It's conflicted with manage-all-nodes and manage-single-node.
--manage-single-node string Node that matches the name will be watched and managed. It's conflicted with manage-nodes-with-annotation-selector, manage-nodes-with-label-selector and manage-all-nodes.
--master string The address of the Kubernetes API server (overrides any value in kubeconfig).
--node-ip string IP of the node
--node-lease-duration-seconds uint Duration of node lease seconds
--node-name string Name of the node
--node-port int Port of the node
--server-address string Address to expose the server on
--tls-cert-file string File containing the default x509 Certificate for HTTPS
--tls-private-key-file string File containing the default x509 private key matching --tls-cert-file
-v, --v log-level number for the log level verbosity (DEBUG, INFO, WARN, ERROR) or (-4, 0, 4, 8) (default INFO)
```

2 changes: 0 additions & 2 deletions site/content/en/docs/user/kwok-out-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ kwok \
--manage-nodes-with-annotation-selector=kwok.x-k8s.io/node=fake \
--manage-nodes-with-label-selector= \
--manage-single-node= \
--disregard-status-with-annotation-selector=kwok.x-k8s.io/status=custom \
--disregard-status-with-label-selector= \
--cidr=10.0.0.1/24 \
--node-ip=10.0.0.1 \
--node-lease-duration-seconds=40
Expand Down

0 comments on commit 129e247

Please sign in to comment.