Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Conversation

@hao1939
Copy link
Contributor

@hao1939 hao1939 commented Apr 10, 2019

resolve #2498 .

Implementation. Store the ‘version info’ as raw string in the files:
/PAI_CODE_ROOT/
/version
PAI.VERSION
K8S.VERSION

The format would be ‘v0.12.0’ and ‘V0.12.0-1.9.9’.

There are 4 places where would need ‘version info’:

  1. [TODO] It will in another PR. Webportal. It will need to display the ‘version info’ on the page, generate from the ‘version info’ during the image building process.
  2. Quick-start. It will need to generate the ‘image tag’, reading the ‘version info’ on the fly.
  3. Dev-box, reading the ‘version info’ on the fly. When dev-box version is not the same as the cluster, would print a warning message.
  4. Build. NOTICE, not using the ‘version info’ , it will read from user config.

@hao1939 hao1939 requested a review from ydye April 10, 2019 08:51
@coveralls
Copy link

coveralls commented Apr 10, 2019

Coverage Status

Coverage remained the same at 52.932% when pulling ef577a6 on hao/add-cluster-info into 07e4e5f on master.

@hao1939 hao1939 requested a review from Gerhut April 10, 2019 09:00
fi

if kubectl get configmap | grep -q "k8s-version"; then
kubectl delete configmap k8s-version || exit $?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kubernetes-configuration.yaml has this information.

Copy link
Contributor Author

@hao1939 hao1939 Apr 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is slight difference: the k8s version is our 'customized k8s' version.
For example: v0.11.0-1.9.9 may different from v0.12.0-1.9.9, although they both base on the k8s 1.9.9.

What's your suggestion about the version string schema?

@@ -0,0 +1 @@
v0.11.0-1.9.9 No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove K8S version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My consideration is to make it different from PAI version, they would be decoupled later.

@hao1939 hao1939 merged commit 48a5bad into master Apr 11, 2019
@hao1939 hao1939 deleted the hao/add-cluster-info branch April 11, 2019 06:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add cluster version info

4 participants