Skip to content

Instantly share code, notes, and snippets.

@vnugent
Created July 14, 2016 15:01
Show Gist options
  • Save vnugent/604902a878a94c8a6d4d0acea24e25e6 to your computer and use it in GitHub Desktop.
Save vnugent/604902a878a94c8a6d4d0acea24e25e6 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Template
labels:
template: manageiq
metadata:
annotations:
description: A template for creating ManageIQ appliance
iconClass: icon-app-code
tags: instant-app,quickstart,manageiq,miq
name: manageiq
objects:
- apiVersion: v1
kind: Service
metadata:
annotations:
description: Exposes and load balances the application pods
name: ${NAME}
spec:
ports:
- name: http
port: 80
targetPort: 80
- name: https
port: 443
targetPort: 443
selector:
name: ${NAME}
- apiVersion: v1
kind: Route
metadata:
name: ${NAME}
spec:
to:
kind: Service
name: ${NAME}
port:
targetPort: https
tls:
termination: passthrough
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
description: Defines how to deploy the application server
name: ${NAME}
spec:
replicas: 1
selector:
name: ${NAME}
strategy:
type: Rolling
rollingParams:
timeoutSeconds: 960
template:
metadata:
labels:
name: ${NAME}
name: ${NAME}
spec:
containers:
- image: docker.io/manageiq/manageiq
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 600
timeoutSeconds: 3
name: manageiq
ports:
- containerPort: 80
- containerPort: 443
securityContext:
privileged: true
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 600
timeoutSeconds: 3
resources:
limits:
memory: ${MEMORY_LIMIT}
volumeMounts:
- name: psql-data
mountPath: "/var/opt/rh/rh-postgresql94/lib/pgsql/data"
lifecycle:
postStart:
exec:
command:
- chown
- "-R"
- "postgres"
- "/var/opt/rh/rh-postgresql94/lib/pgsql/data"
volumes:
- name: psql-data
emptyDir: {}
parameters:
- description: The name assigned to all of the frontend objects defined in this template.
displayName: Name
name: NAME
required: true
value: manageiq
- description: Maximum amount of memory the container can use.
displayName: Memory Limit
name: MEMORY_LIMIT
value: 4096Mi
- description: The exposed hostname that will route to the ManageIQ service, if left
blank a value will be defaulted.
displayName: Application Hostname
name: APPLICATION_DOMAIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment