Skip to content

Commit a68334c

Browse files
authored
Merge pull request #666 from ansible/TamiTakamiya/allow-write-operations-parameter
allow_write_operations parameter support
2 parents 6eb0e97 + 647f30f commit a68334c

File tree

7 files changed

+11
-0
lines changed

7 files changed

+11
-0
lines changed

config/crd/bases/mcpserver.ansible.com_ansiblemcpservers.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,10 @@ spec:
481481
public_base_url:
482482
description: The URL of your Ansible Automation Platform
483483
type: string
484+
allow_write_operations:
485+
description: Enable tools that support modification and data changes (using POST, DELETE, and PATCH methods).
486+
type: boolean
487+
default: false
484488
extra_settings:
485489
description: Environment variables to configure the application-level settings
486490
items:

config/samples/mcpserver_v1alpha1_ansiblemcpserver.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ spec:
1313
service_type: ClusterIP
1414
ingress_type: Route
1515
public_base_url: https://your_aap_public_base_url_here
16+
allow_write_operations: false

docs/running-on-openshift-cluster.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ spec:
199199
service_type: ClusterIP
200200
ingress_type: Route
201201
public_base_url: https://your-aap-public-base-url.example.com
202+
allow_write_operations: false
202203
image_pull_secrets:
203204
- redhat-operators-pull-secret
204205
```
@@ -220,6 +221,7 @@ oc get route -n <target-namespace> my-mcpserver
220221
Key configuration options for the `AnsibleMCPServer` include:
221222

222223
- `public_base_url`: **Required.** The URL of your Ansible Automation Platform
224+
- `allow_write_operations` : Enable tools that support modification and data changes (using POST, DELETE, and PATCH methods). (default: `false`)
223225
- `service_type`: Service type (default: `ClusterIP`). Options: `ClusterIP`, `NodePort`, `LoadBalancer`
224226
- `ingress_type`: Ingress type (default: `Route`). Use `Route` for OpenShift or `Ingress` for standard Kubernetes
225227
- `image_pull_secrets`: List of secrets for pulling container images from private registries

molecule/default/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ provisioner:
4242
operator_pull_policy: ${OPERATOR_PULL_POLICY:-"Never"}
4343
kustomize: ${KUSTOMIZE_PATH:-kustomize}
4444
public_base_url: ${BASE_URL:-"http://localhost"}
45+
allow_write_operations: ${ALLOW_WRITE_OPERATIONS:-false}
4546
env:
4647
K8S_AUTH_KUBECONFIG: ${KUBECONFIG:-"~/.kube/config"}
4748
verifier:

molecule/default/templates/create_mcpserver_instance.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ metadata:
1010
name: ansiblemcpserver-sample
1111
spec:
1212
public_base_url: {{ public_base_url }}
13+
allow_write_operations: {{ allow_write_operations }}
1314
no_log: false
1415
ingress_type: Ingress
1516
ingress_path: /mcp

molecule/kind/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ provisioner:
4646
kubeconfig: "{{ lookup('env', 'KUBECONFIG') }}"
4747
kustomize: ${KUSTOMIZE_PATH:-kustomize}
4848
public_base_url: ${BASE_URL:-"http://localhost"}
49+
allow_write_operations: ${ALLOW_WRITE_OPERATIONS:-false}
4950
env:
5051
K8S_AUTH_KUBECONFIG: ${MOLECULE_EPHEMERAL_DIRECTORY}/kubeconfig
5152
KUBECONFIG: ${MOLECULE_EPHEMERAL_DIRECTORY}/kubeconfig

roles/mcpserver/templates/mcpserver.configmap.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ metadata:
99
{{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }}
1010
data:
1111
BASE_URL: "{{ public_base_url }}"
12+
ALLOW_WRITE_OPERATIONS: "{{ allow_write_operations }}"
1213
# Custom user variables
1314
{% for item in extra_settings | default([]) %}
1415
{{ item.setting | upper }}: "{{ item.value }}"

0 commit comments

Comments
 (0)