diff --git a/Makefile b/Makefile index 63a8c38..90398ba 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,10 @@ KIND_CLUSTER_NAME ?= kind E2E_KIND_VERSION ?= kindest/node:v1.31.0 K8S_VERSION = $(E2E_KIND_VERSION:kindest/node:v%=%) +GIT_TAG ?= $(shell git describe --tags --dirty --always) +VERSION_PKG = sigs.k8s.io/kjob/pkg/version +LD_FLAGS += -X '$(VERSION_PKG).GitVersion=$(GIT_TAG)' + ##@ General # The help target prints out all targets with their descriptions organized diff --git a/docs/commands/kjobctl.md b/docs/commands/kjobctl.md index a449321..ae92aac 100644 --- a/docs/commands/kjobctl.md +++ b/docs/commands/kjobctl.md @@ -204,4 +204,5 @@ ML/AI/Batch Jobs Made Easy * [kjobctl describe](kjobctl_describe/_index.md) - Show details of a specific resource or group of resources. * [kjobctl list](kjobctl_list/_index.md) - Display resources * [kjobctl printcrds](kjobctl_printcrds/_index.md) - Print the kjobctl CRDs +* [kjobctl version](kjobctl_version/_index.md) - Prints the client version diff --git a/docs/commands/kjobctl_version/_index.md b/docs/commands/kjobctl_version/_index.md new file mode 100644 index 0000000..37efdd1 --- /dev/null +++ b/docs/commands/kjobctl_version/_index.md @@ -0,0 +1,227 @@ + + +# kjobctl version + + +## Synopsis + + +Prints the client version + +``` +kjobctl version +``` + + +## Examples + +``` + # Prints the client version + kjobctl version +``` + + +## Options + + +
-h, --help | +|
+ |
+ help for version + |
+
--as string | +|
+ |
+ Username to impersonate for the operation. User could be a regular user or a service account in a namespace. + |
+
--as-group strings | +|
+ |
+ Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + |
+
--as-uid string | +|
+ |
+ UID to impersonate for the operation. + |
+
--cache-dir string Default: "$HOME/.kube/cache" | +|
+ |
+ Default cache directory + |
+
--certificate-authority string | +|
+ |
+ Path to a cert file for the certificate authority + |
+
--client-certificate string | +|
+ |
+ Path to a client certificate file for TLS + |
+
--client-key string | +|
+ |
+ Path to a client key file for TLS + |
+
--cluster string | +|
+ |
+ The name of the kubeconfig cluster to use + |
+
--context string | +|
+ |
+ The name of the kubeconfig context to use + |
+
--disable-compression | +|
+ |
+ If true, opt-out of response compression for all requests to the server + |
+
--insecure-skip-tls-verify | +|
+ |
+ If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + |
+
--kubeconfig string | +|
+ |
+ Path to the kubeconfig file to use for CLI requests. + |
+
-n, --namespace string | +|
+ |
+ If present, the namespace scope for this CLI request + |
+
--request-timeout string Default: "0" | +|
+ |
+ The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. + |
+
-s, --server string | +|
+ |
+ The address and port of the Kubernetes API server + |
+
--tls-server-name string | +|
+ |
+ Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used + |
+
--token string | +|
+ |
+ Bearer token for authentication to the API server + |
+
--user string | +|
+ |
+ The name of the kubeconfig user to use + |
+