diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-02-01 15:04:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-01 15:04:48 -0500 |
commit | 287282e3a1c36ea2c7bc9eb14e463fd347c7d95a (patch) | |
tree | 7a3875c397479c70106d8fbd8a032620075e17ac /roles/lib_openshift/src/doc/service | |
parent | 4431d38b412470f3e20564333afea7cf99ecb298 (diff) | |
parent | 9ef0eb0e1e25b2f4cf6c3cc72d838edf1cfafdf5 (diff) | |
download | openshift-287282e3a1c36ea2c7bc9eb14e463fd347c7d95a.tar.gz openshift-287282e3a1c36ea2c7bc9eb14e463fd347c7d95a.tar.bz2 openshift-287282e3a1c36ea2c7bc9eb14e463fd347c7d95a.tar.xz openshift-287282e3a1c36ea2c7bc9eb14e463fd347c7d95a.zip |
Merge pull request #3224 from kwoodson/oc_service
Adding oc_service to lib_openshift.
Diffstat (limited to 'roles/lib_openshift/src/doc/service')
-rw-r--r-- | roles/lib_openshift/src/doc/service | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/roles/lib_openshift/src/doc/service b/roles/lib_openshift/src/doc/service new file mode 100644 index 000000000..418f91dc5 --- /dev/null +++ b/roles/lib_openshift/src/doc/service @@ -0,0 +1,122 @@ +# 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: False + 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(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: [] + 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 <kwoodson@redhat.com>" +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 +''' |