Move CA version to own package

This commit is contained in:
Thomas Hartland 2019-05-06 11:14:42 +02:00
parent 5ac706fdfa
commit 80aa40bda7
2 changed files with 3 additions and 2 deletions

View File

@ -40,6 +40,7 @@ import (
"k8s.io/autoscaler/cluster-autoscaler/utils/errors" "k8s.io/autoscaler/cluster-autoscaler/utils/errors"
kube_util "k8s.io/autoscaler/cluster-autoscaler/utils/kubernetes" kube_util "k8s.io/autoscaler/cluster-autoscaler/utils/kubernetes"
"k8s.io/autoscaler/cluster-autoscaler/utils/units" "k8s.io/autoscaler/cluster-autoscaler/utils/units"
"k8s.io/autoscaler/cluster-autoscaler/version"
kube_client "k8s.io/client-go/kubernetes" kube_client "k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest" "k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/clientcmd"
@ -342,7 +343,7 @@ func main() {
kube_flag.InitFlags() kube_flag.InitFlags()
healthCheck := metrics.NewHealthCheck(*maxInactivityTimeFlag, *maxFailingTimeFlag) healthCheck := metrics.NewHealthCheck(*maxInactivityTimeFlag, *maxFailingTimeFlag)
klog.V(1).Infof("Cluster Autoscaler %s", ClusterAutoscalerVersion) klog.V(1).Infof("Cluster Autoscaler %s", version.ClusterAutoscalerVersion)
go func() { go func() {
http.Handle("/metrics", prometheus.Handler()) http.Handle("/metrics", prometheus.Handler())

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package main package version
// ClusterAutoscalerVersion contains version of CA. // ClusterAutoscalerVersion contains version of CA.
const ClusterAutoscalerVersion = "1.14.0-beta.2" const ClusterAutoscalerVersion = "1.14.0-beta.2"