Created
May 7, 2021 14:23
-
-
Save dmc5179/e4a6e58e90d199f0db81417d85be481c to your computer and use it in GitHub Desktop.
https_server_deployment_is
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
kind: ImageStream | |
apiVersion: image.openshift.io/v1 | |
metadata: | |
name: httpd | |
namespace: httpd-test | |
spec: {} | |
#--- | |
#apiVersion: v1 | |
#kind: PersistentVolumeClaim | |
#metadata: | |
# name: httpd-pv-claim | |
# labels: | |
# app: httpd-frontend | |
#spec: | |
# accessModes: | |
# - ReadWriteOnce | |
# resources: | |
# requests: | |
# storage: 10Gi | |
--- | |
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: httpd-frontend | |
labels: | |
app: httpd-frontend | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: httpd-frontend | |
strategy: | |
type: Recreate | |
triggers: | |
- type: ConfigChange | |
- type: ImageChange | |
imageChangeParams: | |
automatic: true | |
containerNames: | |
- httpd-rhel8 | |
from: | |
kind: ImageStreamTag | |
namespace: httpd-test | |
name: 'httpd:latest' | |
template: | |
metadata: | |
labels: | |
app: httpd-frontend | |
spec: | |
containers: | |
- image: registry.redhat.io/rhel8/httpd-24 | |
imagePullPolicy: Always | |
name: httpd-rhel8 | |
ports: | |
- containerPort: 8080 | |
name: http-port | |
- containerPort: 8443 | |
name: https-port | |
# volumeMounts: | |
# - name: httpd-persistent-storage | |
# mountPath: /home/httpd-server | |
# volumes: | |
# - name: httpd-persistent-storage | |
# persistentVolumeClaim: | |
# claimName: httpd-pv-claim | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: http-port | |
labels: | |
app: httpd-frontend | |
spec: | |
ports: | |
- port: 8080 | |
name: http-port | |
protocol: TCP | |
targetPort: 8080 | |
selector: | |
app: httpd-frontend | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: https-port | |
labels: | |
app: httpd-frontend | |
spec: | |
ports: | |
- port: 8443 | |
name: https-port | |
protocol: TCP | |
targetPort: 8443 | |
selector: | |
app: httpd-frontend | |
--- | |
apiVersion: route.openshift.io/v1 | |
kind: Route | |
metadata: | |
labels: | |
app: httpd-frontend | |
managedFields: | |
name: http-port | |
spec: | |
port: | |
targetPort: http-port | |
to: | |
kind: Service | |
name: http-port | |
weight: 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment