Skip to content

Commit

Permalink
fix: add validator in kubelet data dir (#182)
Browse files Browse the repository at this point in the history
Signed-off-by: liuying <liu.ying@99cloud.net>

Signed-off-by: liuying <liu.ying@99cloud.net>
  • Loading branch information
lysign authored Sep 29, 2022
1 parent 8f84bdd commit 4697cad
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/pages/cluster/containers/Cluster/actions/Create/Cluster.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import BaseForm from 'components/Form';
import { toJS } from 'mobx';
import { rootStore } from 'stores';
import { message } from 'antd';
import { fqdn, subdomain } from 'utils/regex';
import { fqdn, subdomain, path } from 'utils/regex';
import {
isIPv4,
isIpv6,
Expand Down Expand Up @@ -574,13 +574,27 @@ export default class Cluster extends BaseForm {
maxLength: 256,
placeholder: t('Please input {name} data dir', { name: 'ETCD' }),
tip: t('{name} Data Dir', { name: 'ETCD' }),
rules: [
{
pattern: path,
message: t('Please input correct path'),
required: true,
},
],
},
{
name: 'kubeletDataDir',
label: t('{name} Data Dir', { name: 'kubelet' }),
type: 'input',
maxLength: 256,
placeholder: t('Please input {name} data dir', { name: 'kubelet' }),
rules: [
{
pattern: path,
message: t('Please input correct path'),
required: true,
},
],
},
// certSANs 数组string, 填 ip 和域名
{
Expand Down

0 comments on commit 4697cad

Please sign in to comment.