Commit Graph

303 Commits

Author SHA1 Message Date
Cody Jackson 27c3ace324 Splitting up agressive drain parameters
We no longer have safe and aggressive nodes we now
have two properties 'force' and 'deleteLocalData'.

rancher/rancher#27111
2020-05-26 13:11:22 -07:00
Cody Jackson 4be1b9c1c8 Make the default scheduledClusterScan.enabled to be a boolean
Enabled was being set to 'false' instead of false but this was being
masked by the execution of initScheduledClusterScan. When the
KDM values werent present initScheduledClusterScan was doing
an early exit and no longer masking the poor 'false' default value.

This will further improve the earlier solution for rancher/rancher#26996.
2020-05-20 14:03:13 -07:00
Cody Jackson 5ab4d108b4 Improving how we handle a failure to get a scanConfig
It appears that sometimes the cisscanconfig schema isn't present (I haven't
been able to consistently reproduce) which causes the UI to prevent the user
from saving changes to their cluster. Though I think this could be fixed
by the backend I'd like to stop the bleeding and have the UI handle this
better.

So there's two things that are here to help out.
1. I added a default value to the initial empty object just in case it never gets set
elsewhere.
2. If an exception is thrown while creating the scanConfig
we now just prevent the schedule from being set since it wouldn't work
anyway.

Either of these should allow saving to proceed.

rancher/rancher#26996
2020-05-20 09:16:12 -07:00
Westly Wright f98e8763ae
change done button to cancel when user can't edit cluster
rancher/rancher#26491
2020-04-15 11:26:27 -07:00
Westly Wright c704e706e3
template error 2020-04-13 10:32:30 -07:00
Westly Wright 8bf48fa308
Add case to handle cluster temp enf on and no clust temp
rancher/rancher#26491
2020-04-13 09:59:17 -07:00
Cody Jackson db586813fc Removed another case of 'true'
rancher/rancher#26245
2020-03-26 09:47:13 -07:00
Cody Jackson b7c75acb4f Correcting disable field for scheduledClusterScan in RKE
I converted the enabled value back to a boolean instead of it being a string
but I forgot to switch the three disabled fields to expect a boolean.

@rancher/rancher#26245
2020-03-25 14:25:26 -07:00
Cody Jackson b231b34a23 Making the CIS scan enabled radio buttons function on edit
When editing a cluster the value of scheduledClusterScan.enabled comes
back as a string rather than a boolean. I just ensure the value will be a
boolean to make sure the value is displayed on the radio buttons as
expected.

rancher/rancher#26245
2020-03-25 09:32:26 -07:00
Cody Jackson a5ee8d6385 Refactor scheduleScan and upgradeStrategy
The refactor was necessary to get the two to work with all aspects of
rke templates.

rancher/rancher#26149
rancher/rancher#26188
rancher/rancher#26187
2020-03-22 23:53:25 -07:00
Cody Jackson 674c242bb0 Add override support for the upgradeStrategy fields in RKE Template
rancher/rancher#26142
2020-03-20 14:06:11 -07:00
Cody Jackson 025c54df60 Ensure upgrade strategy defaults are used on an upgraded rancher
The default rancherKubernetesEngineConfig is only created for new
clusters. This now creates a default upgradeStraegy object when one
doesn't exist in rancherKubernetesEngineConfig.

rancher/rancher#25951
2020-03-16 12:50:48 -07:00
lvuch 044db7b4b0 25984 2020-03-12 14:14:16 -07:00
Cody Jackson d7cebe4ced Use KDM to drive benchmark options and profile default
This will now allow KDM to drive what the benchmark options are and what
the default option is for profile selection given a kubernetes version.

The 'cisConfig' type is what we look up for this information.

rancher/rancher#25888
2020-03-11 16:43:54 -07:00
Cody Jackson 16f4295442 Make several small tweaks to the CIS UI
- Make table sorting work with scheduled scans
- Make the cis table fit on laptop screen
- Add an appropriate placeholder for the scheduled scans cron field

rancher/rancher#25937
rancher/rancher#25939
2020-03-11 14:50:04 -07:00
Cody Jackson ebd73129a1 Add profile column to CIS Scans page and modify cron default
rancher/rancher#25890
rancher/rancher#25933
2020-03-10 11:39:23 -07:00
Cody Jackson 850d7a5e65 Ensure drain default is recognized and maxUnavailableWorker is enabled
rancher/rancher#25732
rancher/rancher#25875
2020-03-09 12:13:41 -07:00
Cody Jackson 46112ef9de Disable CIS scheduling for windows clusters
CIS scheduling isn't supported on windows clusters.

rancher/rancher#25864
2020-03-09 10:28:58 -07:00
Westly Wright 9f5430ed9d
Ensure nodelocal shows up in cluster create yaml view for rke
rancher/rancher#25811
2020-03-06 16:47:36 -07:00
Cody Jackson 79c283fd5e Resolve RKE Template issue caused by CIS
The profile helper methods were attached to the cluster model.
Unfortunately, the cluster isn't available when creating a new rke
template.

To resolve this I moved all of the cis helpers out of the cluster model
and utils and moved them into a cisHelpers service so they could be
used without access to the cluster itself.
2020-03-06 15:36:29 -07:00
Cody Jackson f58807bff1 Wired up the scheduling for cis 2020-03-06 12:16:06 -07:00
Cody Jackson 355d592051 Large refectoring of CIS to improve UX
- Added Set Alert button
  - This will set the appropriate options for cis
- Added Set Schedule button
  - This will scroll the settings into view
- Added a modal so profiles can be picked
2020-03-06 12:15:27 -07:00
Cody Jackson 940e0cd668 Add CIS scheduling to rke configuration
We wanted to make CIS scheduling configuration a part of
a cluster's RKE config.

rancher/rancher#25347
2020-03-06 12:15:27 -07:00
Westly Wright 9d4fc7a3d8
Merge pull request #3784 from codyrancher/extra_args
Change the way extra_args are excluded
2020-03-04 09:32:56 -07:00
Cody Jackson d4d03a4239 Change the way extra_args are excluded
The original intent of ecluding extra_args was actually
to exclude the children of extra_args from being
removed when empty according to https://github.com/rancher/rancher/issues/24794#issuecomment-570043854.

This will now properly handle that intent while also
removing empty extra_args properties.

rancher/rancher#25612
2020-03-03 14:06:11 -07:00
Cody Jackson 392a078fc7 Use the drain property instead of inferring
Was previously using the presence of nodeDrainInput to determine
the value of drain. Drain is now a part of the backend so I'm using
that value instead of inferring.

rancher/rancher#25732
2020-03-03 10:15:08 -07:00
Cody Jackson 0e2d3ddabd Prevent default from overwriting the existing value of max_unavailable_controlplane
rancher/rancher#25670
2020-03-02 17:05:35 -07:00
Cody Jackson 53699582dc Ensure rke upgrade strategy defaults are used
Now load the rke upgrade strategy defaults and use them
appropriately after they've been loaded.

rancher/rancher#25501
2020-03-02 14:17:08 -07:00
Cody Jackson aee8a79328 Rename maxUnavailable to maxUnavailableWorker
The backend renamed maxUnavailable so we're doing the same.

rancher/rancher#25670
2020-03-02 13:46:17 -07:00
Westly Wright 56b53d9eff
Merge pull request #3745 from westlywright/cluster.name
Ensure Name in Cluster Create Yaml is Used
2020-02-06 09:17:55 -07:00
Westly Wright a3f1bc996b
Fix bugs that prevent cluster cr8 when editing yaml
Adds an empty name to the cluster model creation so it isn't missing if the user
opens yaml editor and knows they should input it
Removes incorrect next usage
Adds logic to handle overriding the name in name-desc when updateYaml is called
Updates form-name-description model observer to watch the two props it actually
cares about
Fixes bug in removeEmpty util which would remove excludedKeys during filter phase

rancher/rancher#24971
2020-02-05 15:03:13 -07:00
Cody Jackson 143bbe8738 Add zero downtime upgrade options to rke driver
This required refactoring the drain modal into a reusable component
since these fields were going to be used in more than one place.

rancher/rancher#24110
2020-02-05 12:58:54 -07:00
Westly Wright 0519376220
drop cluster validation into next block
This ensures that all changes to the cofig via yaml are applied before
validating the cluster params.

rancher/rancher#24971
2020-01-22 14:59:55 -07:00
Westly Wright 5d589a5bb9
Merge pull request #3705 from shanewxy/yaml-create
Fixed edit as yaml in cluster options stuck on "saving"
2020-01-14 09:18:39 -07:00
Westly Wright 0579c01111
expose kube version upgrade warning on apply cluster template.
rancher/rancher#24829
2020-01-13 13:30:07 -07:00
shanewxy dac4aabf43 Fixed edit as yaml in cluster options hang saving 2020-01-06 14:35:12 +08:00
Cody Jackson a2c2fde89f Making awsCloudProvider a special case
I originally tried to fix rancher/rancher#24704 without completely
special casing. Unfortunately that lead to other issues:
rancher/rancher#24745
rancher/rancher#24794
rancher/rancher#24814

I decided to revert all of the related changes and to just special
case this one instance. Ultimately I think the removeEmpty is the
culprit but it requires backend changes in order to properly fix
and those changes are not happening right now.
2020-01-02 13:46:15 -07:00
Cody Jackson 9c30e3ac15 The great reversion of awsCloudProvider changes 2020-01-02 10:21:08 -07:00
Westly Wright 181c21a2a4
Refactor node options advanced section for custom cluster
remove unnecessary labels
refactor markup for advanced section of node options
fix indentation
changed wording on some labels

rancher/rancher#24640
2019-12-31 15:56:51 -07:00
Westly Wright a1657e0c2a
Merge pull request #3684 from westlywright/cloud.config.bug
Edit As Yaml Cloud Config Bug
2019-12-31 08:46:59 -07:00
Westly Wright 51dea873b8
add extra conditional for cloud config edit as yaml
rancher/rancher#24745
2019-12-30 16:18:40 -07:00
Westly Wright 9837f9b67b
remove display of 'edit yaml' button on step > 1 for custom cluster
rancher/rancher#24749
2019-12-30 10:50:35 -07:00
Westly Wright 1d934e0cac On create cpConfig is empty so we need to check that
rancher/rancher#24749
2019-12-27 10:45:52 -08:00
Cody Jackson fd4f567d09 Remove cloud_provider if it's not intended
We were erroneously adding cloud_provider.awsCloudProvider on
digital ocean etc due to rancher/rancher#24515.

This change assumes that the presence of
onfig.rancher_kubernetes_engine_config.cloud_provider.name
implies that the cloud_provider should be present. If that
nested field isn't present we remove cloud_provider.

rancher/rancher#24745
2019-12-23 15:51:02 -07:00
Cody Jackson 2bbe8035b0 Ensure awsCloudProvider presense for custom clusterawsCloudProvider was being removed from custom clusters when editingthe YAML. This change ensures that the field is still present. It alsorequired modifying the removeEmpty method as it was removing fields thatwere in the excludedKeys argument.rancher/rancher#24515 2019-12-12 16:21:52 -07:00
Westly Wright 77e1df7060
remove translation as we had localizedPrompt set true 2019-10-30 12:14:43 -07:00
Cody Jackson 0fe6c33eb5 Improve kube version inspection on cluster edit
While editing a cluster properly support .x kube version comparisons when
filtering out cluster template revisions.

Coercing a .x version converts it to a .0 which made the revision look like
it was a kube downgrade. By making use of .satisfies when the revision
kube version ends with a '.x' we're now better able to check if the
kube version is a downgrade and filter appropriately.

rancher/rancher#23489
2019-10-21 12:21:09 -07:00
Westly Wright d711b8b8bb
disp k8s ver correctly when editing cluster or clone rev
the check-override-allowed component did not know how to deal with the k8s
version question because of its tri state and how we deal with the patch version
that is an override but not really an override. I added a check to verify the
mode is view and we have the param then display param so we don't initialize the
form-version component which has logic to inject the current version into its
versions dropdown but only if we're new, editing, or cloning.

rancher/rancher#23478
rancher/rancher#23465
2019-10-17 10:48:37 -07:00
Cody Jackson ef63c2a9c6 Ensure the current Kubernetes version can display
The current kubernetes version wasn't being shown if it was no
longer a part of the supported versions when in view mode. Instead
the latest version was being displayed even if that wasn't what was
deployed. To resolve this we include the current version as one of
the choices if it's not present.

rancher/rancher#23465
2019-10-15 17:56:14 -07:00
Westly Wright bc00ac6a72
Change windows docker version for custom clusters
rancher/rancher#23219
2019-10-03 16:46:38 -07:00
Westly Wright 521ed6ca09
wireup ovveride row value to form value when cloning rke template
When cloning a RKE template revision with overrides the values of the override
in the form were not reflected in the overrides section at the bottom of the
page because the alias on the question was never created.

rancher/rancher#23056
2019-09-25 13:11:51 -07:00
Westly Wright 59f7c37aca
Hide 'Custom Cluster Overrides' section when launching cluster
`Custom Cluster Overrides` was originally designed when we allowed users to
create custom overrides for items not in the UI but since that was removed the
template consumer will only ever see overrides for sections we have built in
and when launching we never display the overrides for ones with UI components.

rancher/rancher#23069
2019-09-25 10:17:42 -07:00
Westly Wright 63aef3fa30
change other occurrences of model.cluster.clusterTemplateRevisionId 2019-09-23 14:45:28 -07:00
Westly Wright 290a1f51f6
Attach correct value to be modified to cluster template id select
When consuming a cluster template selection of the template id from the drop
down didn't change the cluster template revision becuase the UI component was
using the readOnly value. Attached the selection to the correct value so the
action floats up (DDAU).

rancher/rancher#22977
2019-09-23 14:19:01 -07:00
Cody Jackson 3370aa9ca0 Making the cluster template revisionId saveable.
When editing a cluster that was created with cluster template
the cluster template revision couldn't be saved.

The revisionId was stored as a component member variable instead
of as a part of the model. It needed to be stored as part of the
model in order for the NewOrEdit to see the changes and save
them. I went ahead and referenced the model directly everywhere
in the component and removed the component member variable.

rancher/rancher#22920
2019-09-19 11:47:48 -07:00
Vincent Fiduccia 9621b09fb0
Don't overwrite cluster config with answers on edit (rancher/rancher#22085) 2019-09-11 01:55:41 -07:00
Vincent Fiduccia 01b07bdd9a
Fix azure required fields, rke templates option location 2019-08-30 17:49:20 -07:00
lvuch 59d3ffb8d4 cluster template to rke template 2019-08-29 21:31:20 -07:00
loganhz 86096ee6bc Windows 2019-08-27 18:21:40 +08:00
n313893254 ef6ac0189a Fix [Windows] Unable to set windows node advanced options
https://github.com/rancher/rancher/issues/22059
2019-08-22 13:45:31 +08:00
Vincent Fiduccia cf1195575b
Clear errors on click (rancher/rancher#22228) 2019-08-19 12:14:16 -07:00
Vincent Fiduccia b209d16efc
Unsupported vs not allowed 2019-08-16 13:48:42 -07:00
Vincent Fiduccia b14c6501a6
Don't submit if there are errors 2019-08-15 17:24:39 -07:00
Vincent Fiduccia 440c9d1627
Missing RKE config error 2019-08-14 00:03:30 -07:00
Vincent Fiduccia d39b00ee22
Cluster template bugs 2019-08-13 17:28:17 -07:00
loganhz a215d70a71 Windows cluster template
https://github.com/rancher/rancher/issues/21557
2019-08-13 15:38:39 +08:00
Westly Wright 8001f80119
lint 2019-08-09 16:12:04 -07:00
Westly Wright 989be5923e
Add check for rke config in yaml editor and error if it nil
rancher/rancher#22076
2019-08-09 16:03:00 -07:00
Westly Wright b9e44dbd39
Disable cluster template selection change on edit cluster
rancher/rancher#22043
2019-08-09 10:36:57 -07:00
Westly Wright 9c81011e0b
fix edit bug when saving from yaml 2019-08-09 09:12:07 -07:00
Westly Wright 636aee8d1a
add back yaml view but make readOnly if view 2019-08-09 09:12:07 -07:00
Westly Wright 107e86ad12
Cluster template revision detail page
rancher/rancher#23734
2019-08-09 09:11:53 -07:00
Westly Wright 705a863c58
Fix private registry display and default issues
rancher/rancher#21567
2019-08-07 14:48:06 -07:00
Westly Wright 2bc2981321
Fix .x version being pushed into list on edit cluster
rancher/rancher#22021
2019-08-07 12:07:53 -07:00
Westly Wright 8449a6f5b1
Prevent selecting ct with lower kube version than current cluster
rancher/rancher#21756
rancher/rancher#22018
2019-08-07 10:57:51 -07:00
Westly Wright 814a04bdce
allow k8s version to check if editing only when using cluster templ 2019-08-07 09:29:43 -07:00
Westly Wright c44e9ca6e6
Add date created & default label to the cluster temp revision select 2019-08-07 09:29:43 -07:00
Westly Wright 62e7865568
mark cloud provider fields that are required as required in override
which can't be unchecked because the config will require an entry

rancher/rancher#21616
2019-08-07 09:29:43 -07:00
Westly Wright 80fc4b6efb
Fix issue when edit cluster and no access to cluster template
rancher/rancher#21473
2019-08-07 09:29:43 -07:00
Westly Wright 464acc4648
refactor new required error check into own function 2019-08-02 14:41:34 -07:00
Westly Wright 4b9fa17425
split cluster template/revisions into sep dropdowns cluster create
rancher/rancher#21891
2019-08-02 13:48:14 -07:00
Westly Wright c4392a5ef9
allow users to create cluster template with azure fields empty
rancher/rancher#21759
2019-08-02 11:53:52 -07:00
Westly Wright 461700a2a9
fix cluster/cluster template validation
rancher/rancher#21616
2019-08-02 11:53:52 -07:00
loganhz 73336b817f Use windowsPreferedCluster for windows cluster 2019-08-02 06:20:26 +08:00
Westly Wright d688b427ff
hide edit yaml when a cluster template revision is selected 2019-07-31 15:11:58 -07:00
Westly Wright 5f73492b33
edit as yaml on cluster edit
rancher/rancher#21866
rancher/rancher#23576
2019-07-31 15:11:58 -07:00
Westly Wright 53a31f7a3d
fix bug applying default values of cluster template kube version
rancher/rancher#21721
2019-07-31 15:11:58 -07:00
Westly Wright 9fa2f1d116
backup strategy default values when applying cluster template
rancher/rancher#21724
2019-07-31 09:42:00 -07:00
Westly Wright cba95c6470
cluster template revision enabled/disabled error handler
rancher/rancher#21699
2019-07-31 09:42:00 -07:00
Westly Wright e6a80707b4
fix bug in template enforcement and standard user template selct
rancher/rancher#21747
2019-07-31 09:41:59 -07:00
Westly Wright ce42f8c0c2
Fix bug where uiOverride questions were showing up on new revision
rancher/rancher#21758
2019-07-30 09:26:21 -07:00
Westly Wright e99ddbe731
hide cluster template radio select on step 2 of custom create 2019-07-30 09:26:21 -07:00
Westly Wright a412a835be
Hide yaml editor on custom cluster past step 1
rancher/rancher#18879
2019-07-30 09:26:21 -07:00
Westly Wright 654d125b17
fix incorrect version selection bug with patch version selection
rancher/rancher#21715
rancher/rancher#21721
2019-07-30 09:26:21 -07:00
Westly Wright 507a5b21fb
Remove patched kube version display on cluster create
rancher/rancher#21615
2019-07-30 09:26:21 -07:00
Westly Wright 72153bda97
lint 2019-07-29 09:58:13 -07:00
Westly Wright 97992bbc36
edit yaml working 2019-07-29 09:49:02 -07:00
Westly Wright 04a0eaf783
more refactoring to get switch between yml/form 2019-07-29 09:49:02 -07:00
Westly Wright bb2c2af9c2
First itteration of cluster template yaml
rancher/rancher#21579
2019-07-29 09:49:02 -07:00
loganhz 5be5abfded Support taints 2019-07-26 19:49:31 +08:00