mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 05:17:36 -02:30
Dont require credential for Container Groups
Might want to follow up and make this only apply to Tower on Kubernetes
This commit is contained in:
@@ -37,7 +37,7 @@ function ContainerGroupEdit({ instanceGroup }) {
|
|||||||
try {
|
try {
|
||||||
await InstanceGroupsAPI.update(instanceGroup.id, {
|
await InstanceGroupsAPI.update(instanceGroup.id, {
|
||||||
name: values.name,
|
name: values.name,
|
||||||
credential: values.credential.id,
|
credential: values.credential ? values.credential.id : null,
|
||||||
pod_spec_override: values.override ? values.pod_spec_override : null,
|
pod_spec_override: values.override ? values.pod_spec_override : null,
|
||||||
});
|
});
|
||||||
history.push(detailsIUrl);
|
history.push(detailsIUrl);
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ function ContainerGroupFormFields({ i18n, instanceGroup }) {
|
|||||||
const { setFieldValue } = useFormikContext();
|
const { setFieldValue } = useFormikContext();
|
||||||
const [credentialField, credentialMeta, credentialHelpers] = useField({
|
const [credentialField, credentialMeta, credentialHelpers] = useField({
|
||||||
name: 'credential',
|
name: 'credential',
|
||||||
validate: required(i18n._(t`Select a value for this field`), i18n),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const [overrideField] = useField('override');
|
const [overrideField] = useField('override');
|
||||||
@@ -55,9 +54,8 @@ function ContainerGroupFormFields({ i18n, instanceGroup }) {
|
|||||||
onBlur={() => credentialHelpers.setTouched()}
|
onBlur={() => credentialHelpers.setTouched()}
|
||||||
onChange={onCredentialChange}
|
onChange={onCredentialChange}
|
||||||
value={credentialField.value}
|
value={credentialField.value}
|
||||||
required
|
|
||||||
tooltip={i18n._(
|
tooltip={i18n._(
|
||||||
t`Credential to authenticate with Kubernetes or OpenShift. Must be of type "Kubernetes/OpenShift API Bearer Token”.`
|
t`Credential to authenticate with Kubernetes or OpenShift. Must be of type "Kubernetes/OpenShift API Bearer Token". If left blank, the underlying Pod's service account will be used.`
|
||||||
)}
|
)}
|
||||||
autoPopulate={!instanceGroup?.id}
|
autoPopulate={!instanceGroup?.id}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user