Commit f5da916b authored by Sandro Mathys's avatar Sandro Mathys
Browse files

add example deployment as remote backend

parent 867b52fb
......@@ -26,7 +26,10 @@ frontend:
apache:
enableSSL: true
remoteURL: "https://os.zhdk.cloud.switch.ch/swift/v1/shibboleth-sp-helm-chart-demo-page/"
# example SWITCHengines S3 bucket hosting a static website:
# remoteURL: "https://os.zhdk.cloud.switch.ch/swift/v1/shibboleth-sp-helm-chart-demo-page/"
# example apache deployment in the same namespace:
remoteURL: "http://shibboleth-sp-helm-chart-example-webserver"
accessRules: |
Require shib-attr homeOrganization switch.ch
---
apiVersion: v1
kind: ConfigMap
metadata:
name: shibboleth-sp-helm-chart-example-webserver
data:
httpd.conf: |
DefaultRuntimeDir /dev/shm
PidFile /dev/shm/apache2.pid
Listen 8080
ServerName _
ServerRoot "/usr/local/apache2"
ServerAdmin you@example.com
# the bare minimum of required modules
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule unixd_module modules/mod_unixd.so
# required for LogFormat / CustomLog
LoadModule log_config_module modules/mod_log_config.so
# required for DirectoryIndex
LoadModule dir_module modules/mod_dir.so
LogLevel warn
ErrorLog /proc/self/fd/2
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /proc/self/fd/1 combined
HostnameLookups Off
DocumentRoot "/usr/local/apache2/htdocs"
DirectoryIndex index.html
index.html: |
<html>
<head>
<title>
hello world
</title>
</head>
<body>
<h1>
hello world
</h1>
</body>
</html>
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: shibboleth-sp-helm-chart-example-webserver
name: shibboleth-sp-helm-chart-example-webserver
spec:
replicas: 1
selector:
matchLabels:
app: shibboleth-sp-helm-chart-example-webserver
template:
metadata:
labels:
app: shibboleth-sp-helm-chart-example-webserver
spec:
containers:
- image: cr.gitlab-int.switch.ch/maps/upstream-images/httpd:2.4-alpine
name: apache
ports:
- containerPort: 8080
resources:
requests:
cpu: 10m
memory: 1Mi
limits:
cpu: 10m
# apache will refuse to start with less
memory: 4Mi
volumeMounts:
- name: apache
subPath: httpd.conf
mountPath: /usr/local/apache2/conf/httpd.conf
readOnly: true
- name: apache
subPath: index.html
mountPath: /usr/local/apache2/htdocs/index.html
readOnly: true
volumes:
- name: apache
configMap:
name: shibboleth-sp-helm-chart-example-webserver
---
apiVersion: v1
kind: Service
metadata:
labels:
app: shibboleth-sp-helm-chart-example-webserver
name: shibboleth-sp-helm-chart-example-webserver
spec:
ports:
- port: 80
protocol: TCP
targetPort: 8080
selector:
app: shibboleth-sp-helm-chart-example-webserver
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment