From ef2c0920d3596c4587f5ebbdcf9b4da92b0f5dd5 Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Tue, 9 May 2017 11:24:43 -0700 Subject: [PATCH] Add feature state templates (#3680) * Add feature state template * tweak css * change wording * apply wording changes to alpha and beta * tweak dialog css * tweak code highlighting * tweak dialog style * set for_k8s_version default * tweak dialog ul * make init containers 1.5 beta for now * set default dialog width * revert a:visited color * force code style * simplify copy for alpha, beta, stable * tweak code style * fix beta dialog title * fix dialog link a code * remaining tweaks * set a:visited color * Address Steve's feedback * rename dialog.md to feature-dialog.md * remove bold from additional feature state text --- _includes/1-5-beta.md | 1 - _includes/feature-dialog.md | 28 ++++++++++ _includes/feature-state-alpha.md | 13 +++++ _includes/feature-state-beta.md | 14 +++++ _includes/feature-state-stable.md | 10 ++++ _sass/_base.sass | 55 ++++++++++++++++++- .../workloads/pods/init-containers.md | 6 +- 7 files changed, 120 insertions(+), 7 deletions(-) delete mode 100644 _includes/1-5-beta.md create mode 100644 _includes/feature-dialog.md create mode 100644 _includes/feature-state-alpha.md create mode 100644 _includes/feature-state-beta.md create mode 100644 _includes/feature-state-stable.md diff --git a/_includes/1-5-beta.md b/_includes/1-5-beta.md deleted file mode 100644 index abccaa303c..0000000000 --- a/_includes/1-5-beta.md +++ /dev/null @@ -1 +0,0 @@ -***NOTE: This feature is beta in Kubernetes 1.5.*** \ No newline at end of file diff --git a/_includes/feature-dialog.md b/_includes/feature-dialog.md new file mode 100644 index 0000000000..69b1a584ea --- /dev/null +++ b/_includes/feature-dialog.md @@ -0,0 +1,28 @@ +{{ dialog_title }} +
+{{ dialog_content | markdownify }} +
+{% raw %}{% endraw %} diff --git a/_includes/feature-state-alpha.md b/_includes/feature-state-alpha.md new file mode 100644 index 0000000000..6f3d2adbb8 --- /dev/null +++ b/_includes/feature-state-alpha.md @@ -0,0 +1,13 @@ +{% assign dialog_title = "alpha" %} +{% capture dialog_content %} +This feature is currently in a *alpha* state, meaning: + +* The version names contain alpha (e.g. v1alpha1). +* Might be buggy. Enabling the feature may expose bugs. Disabled by default. +* Support for feature may be dropped at any time without notice. +* The API may change in incompatible ways in a later software release without notice. +* Recommended for use only in short-lived testing clusters, due to increased risk of bugs and lack of long-term support. + +{% endcapture %} + +**FEATURE STATE:** `Kubernetes {{ for_k8s_version | default: page.version }}` {% include feature-dialog.md %} \ No newline at end of file diff --git a/_includes/feature-state-beta.md b/_includes/feature-state-beta.md new file mode 100644 index 0000000000..39ff486a8c --- /dev/null +++ b/_includes/feature-state-beta.md @@ -0,0 +1,14 @@ +{% assign dialog_title = "beta" %} +{% capture dialog_content %} +This feature is currently in a *beta* state, meaning: + +* The version names contain beta (e.g. v2beta3). +* Code is well tested. Enabling the feature is considered safe. Enabled by default. +* Support for the overall feature will not be dropped, though details may change. +* The schema and/or semantics of objects may change in incompatible ways in a subsequent beta or stable release. When this happens, we will provide instructions for migrating to the next version. This may require deleting, editing, and re-creating API objects. The editing process may require some thought. This may require downtime for applications that rely on the feature. +* Recommended for only non-business-critical uses because of potential for incompatible changes in subsequent releases. If you have multiple clusters that can be upgraded independently, you may be able to relax this restriction. +* **Please do try our beta features and give feedback on them! After they exit beta, it may not be practical for us to make more changes.** + +{% endcapture %} + +**FEATURE STATE:** `Kubernetes {{ for_k8s_version | default: page.version }}` {% include feature-dialog.md %} \ No newline at end of file diff --git a/_includes/feature-state-stable.md b/_includes/feature-state-stable.md new file mode 100644 index 0000000000..fb05a7ddca --- /dev/null +++ b/_includes/feature-state-stable.md @@ -0,0 +1,10 @@ +{% assign dialog_title = "stable" %} +{% capture dialog_content %} +This feature is *stable*, meaning: + +* The version name is vX where X is an integer. +* Stable versions of features will appear in released software for many subsequent versions. + +{% endcapture %} + +**FEATURE STATE:** `Kubernetes {{ for_k8s_version | default: page.version }}` {% include feature-dialog.md %} \ No newline at end of file diff --git a/_sass/_base.sass b/_sass/_base.sass index 81c7adc2cb..97e0343584 100644 --- a/_sass/_base.sass +++ b/_sass/_base.sass @@ -968,8 +968,8 @@ dd //font-weight: 700 text-decoration: underline - a:visited - color: blueviolet +// a:visited +// color: blueviolet a.button border-radius: 2px @@ -1305,6 +1305,56 @@ $feature-box-div-margin-bottom: 40px width: 100% height: 100% +// Dialog +.ui-icon + display: inline-block !important + +#feature-state-dialog-link + text-decoration: none !important + padding: 6px !important + a:visited + color: #454545 !important + a code + display: inline-block !important + box-sizing: border-box !important + background-color: #f7f7f7 !important + color: #303030 !important + font-family: "Roboto Mono", monospace !important + vertical-align: baseline !important + font-size: 14px !important + font-weight: bold !important + padding: 0px 4px !important + +#feature-state-dialog + background: #fff !important + border: 1px solid #ddd !important + padding: 0.5em 1em !important + + ul, li + list-style: disc !important + margin: 4px 12px !important + + p + margin: 8px 0px !important + + code + display: inline-block !important + box-sizing: border-box !important + background-color: #f7f7f7 !important + color: #303030 !important + font-family: "Roboto Mono", monospace !important + vertical-align: baseline !important + font-size: 14px !important + font-weight: bold !important + padding: 0px 4px !important + +.ui-dialog + background: #f7f7f7 !important + padding: 0.5em + +.ui-dialog-buttonpane + background: #f7f7f7 !important + // Tabs .ui-widget-header background: transparent !important @@ -1321,7 +1371,6 @@ $feature-box-div-margin-bottom: 40px .ui-widget-content border: 0px !important -.ui-widget-content table margin: 0px !important diff --git a/docs/concepts/workloads/pods/init-containers.md b/docs/concepts/workloads/pods/init-containers.md index 84becdca86..fe30ecb0ef 100644 --- a/docs/concepts/workloads/pods/init-containers.md +++ b/docs/concepts/workloads/pods/init-containers.md @@ -17,10 +17,10 @@ scripts not present in an app image. {:toc} -{% include 1-5-beta.md %} +{% assign for_k8s_version="v1.5" %}{% include feature-state-beta.md %} -**Once the feature exits beta, Init Containers will be specified in the PodSpec -alongside the app `containers` array.** +Once the feature exits beta, Init Containers will be specified in the PodSpec +alongside the app `containers` array. {% capture body %} ## Understanding Init Containers