From 8237eebd0d24ed8577d8360bea220af70807d073 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Sun, 29 Jan 2017 14:21:29 -0500 Subject: Adding oc_service to lib_openshift. --- roles/lib_openshift/src/doc/service | 121 ++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 roles/lib_openshift/src/doc/service (limited to 'roles/lib_openshift/src/doc/service') diff --git a/roles/lib_openshift/src/doc/service b/roles/lib_openshift/src/doc/service new file mode 100644 index 000000000..adc2ad949 --- /dev/null +++ b/roles/lib_openshift/src/doc/service @@ -0,0 +1,121 @@ +# flake8: noqa +# pylint: skip-file + +DOCUMENTATION = ''' +--- +module: oc_service +short_description: Create, modify, and idempotently manage openshift services. +description: + - Manage openshift service objects programmatically. +options: + state: + description: + - State represents whether to create, modify, delete, or list + required: true + default: present + choices: ["present", "absent", "list"] + aliases: [] + kubeconfig: + description: + - The path for the kubeconfig file to use for authentication + required: false + default: /etc/origin/master/admin.kubeconfig + aliases: [] + debug: + description: + - Turn on debug output. + required: false + default: False + aliases: [] + name: + description: + - Name of the object that is being queried. + required: false + default: None + aliases: [] + namespace: + description: + - The namespace where the object lives. + required: false + default: default + aliases: [] + selector: + description: + - The selector to apply when filtering for services. + required: false + default: None + aliases: [] + labels: + description: + - The labels to apply on the service. + required: false + default: None + aliases: [] + clusterip: + description: + - The cluster ip address to use with this service. + required: false + default: None + aliases: [] + portalip: + description: + - The portal ip address to use with this service. + required: false + default: None + aliases: [] + ports: + description: + - A list of the ports that are used for this service. This includes name, port, protocol, and targetPort. + - See examples. + required: false + default: None + aliases: [] + session_affinity: + description: + - The type of session affinity to use. + required: false + default: 'None' + aliases: [] + service_type: + description: + - The type of service desired. Each option tells the service to behave accordingly. + - https://kubernetes.io/docs/user-guide/services/ + required: false + default: ClusterIP + choices: + - ClusterIP + - NodePort + - LoadBalancer + - ExternalName + aliases: [] +author: +- "Kenny Woodson " +extends_documentation_fragment: [] +''' + +EXAMPLES = ''' +- name: get docker-registry service + run_once: true + oc_service: + namespace: default + name: docker-registry + state: list + register: registry_service_out + +- name: create the docker-registry service + oc_service: + namespace: default + name: docker-registry + ports: + - name: 5000-tcp + port: 5000 + protocol: TCP + targetPort: 5000 + selector: + docker-registry: default + session_affinity: ClientIP + service_type: ClusterIP + register: svc_out + notify: + - restart openshift master services +''' -- cgit v1.2.3 From 9ef0eb0e1e25b2f4cf6c3cc72d838edf1cfafdf5 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Tue, 31 Jan 2017 14:21:34 -0500 Subject: Fixing copy pasta comments. Fixed required in docs. --- roles/lib_openshift/src/doc/service | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'roles/lib_openshift/src/doc/service') diff --git a/roles/lib_openshift/src/doc/service b/roles/lib_openshift/src/doc/service index adc2ad949..418f91dc5 100644 --- a/roles/lib_openshift/src/doc/service +++ b/roles/lib_openshift/src/doc/service @@ -11,7 +11,7 @@ options: state: description: - State represents whether to create, modify, delete, or list - required: true + required: False default: present choices: ["present", "absent", "list"] aliases: [] @@ -59,7 +59,8 @@ options: aliases: [] portalip: description: - - The portal ip address to use with this service. + - The portal ip(virtual ip) address to use with this service. + - "https://docs.openshift.com/enterprise/3.0/architecture/core_concepts/pods_and_services.html#services" required: false default: None aliases: [] -- cgit v1.2.3