OpenShift Service Operations: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * OpenShift Operations =Create a Service= Use a template similar to: apiVersion: v1 kind: Template metadata: name: nov...") |
|||
Line 11: | Line 11: | ||
metadata: | metadata: | ||
name: novaordis-service-template | name: novaordis-service-template | ||
parameters: | |||
- name: APPLICATION_NAME | |||
value: my-app-name | |||
required: true | |||
objects: | objects: | ||
- apiVersion: v1 | - apiVersion: v1 | ||
Line 16: | Line 20: | ||
metadata: | metadata: | ||
annotations: | annotations: | ||
openshift.io/generated-by: novaordis-service-template | |||
openshift.io/generated-by: | |||
labels: | labels: | ||
app: | app: ${APPLICATION_NAME} | ||
application: | application: ${APPLICATION_NAME} | ||
template: | template: novaordis-service-template | ||
name: ${APPLICATION_NAME} | |||
name: | |||
spec: | spec: | ||
ports: | ports: | ||
Line 30: | Line 32: | ||
targetPort: 8080 | targetPort: 8080 | ||
selector: | selector: | ||
deploymentConfig: | deploymentConfig: ${APPLICATION_NAME} | ||
sessionAffinity: None | sessionAffinity: None | ||
type: ClusterIP | type: ClusterIP | ||
status: | status: |
Revision as of 09:03, 7 December 2017
Internal
Create a Service
Use a template similar to:
apiVersion: v1 kind: Template metadata: name: novaordis-service-template parameters: - name: APPLICATION_NAME value: my-app-name required: true objects: - apiVersion: v1 kind: Service metadata: annotations: openshift.io/generated-by: novaordis-service-template labels: app: ${APPLICATION_NAME} application: ${APPLICATION_NAME} template: novaordis-service-template name: ${APPLICATION_NAME} spec: ports: - port: 8080 protocol: TCP targetPort: 8080 selector: deploymentConfig: ${APPLICATION_NAME} sessionAffinity: None type: ClusterIP status: