[virttools-web PATCH 3/3] Remove obsolete openshift hosting configuration

Daniel P. Berrangé berrange at redhat.com
Tue Mar 31 10:21:45 UTC 2020


Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 openshift/templates/.gitignore             |   2 -
 openshift/templates/update-tls.sh          |  16 --
 openshift/templates/virttools-web-tls.json |  82 -------
 openshift/templates/virttools-web.json     | 272 ---------------------
 4 files changed, 372 deletions(-)
 delete mode 100644 openshift/templates/.gitignore
 delete mode 100755 openshift/templates/update-tls.sh
 delete mode 100644 openshift/templates/virttools-web-tls.json
 delete mode 100644 openshift/templates/virttools-web.json

diff --git a/openshift/templates/.gitignore b/openshift/templates/.gitignore
deleted file mode 100644
index 199c6e6..0000000
--- a/openshift/templates/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-tls-cert.pem
-tls-key.pem
diff --git a/openshift/templates/update-tls.sh b/openshift/templates/update-tls.sh
deleted file mode 100755
index 9b62697..0000000
--- a/openshift/templates/update-tls.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-function die() {
-    echo $*
-    exit 1
-}
-
-test -f "tls-cert.pem" || die "Missing tls-cert.pem"
-test -f "tls-key.pem" || die "Missing tls-key.pem"
-
-TLS_CERT=`cat tls-cert.pem`
-TLS_KEY=`cat tls-key.pem`
-
-oc process -f virttools-web-tls.json | oc delete -f -
-oc process -p TLS_CERT="$TLS_CERT" -p TLS_KEY="$TLS_KEY" -f virttools-web-tls.json | oc create -f -
-
diff --git a/openshift/templates/virttools-web-tls.json b/openshift/templates/virttools-web-tls.json
deleted file mode 100644
index b7d1d33..0000000
--- a/openshift/templates/virttools-web-tls.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
-    "apiVersion": "v1",
-    "kind": "Template",
-    "labels": {
-        "app": "virttools-web",
-        "template": "virttools-web"
-    },
-    "message": "The following service(s) have been created in your project: ${NAME}.\n",
-    "metadata": {
-        "name": "virtttools-web",
-        "annotations": {
-            "openshift.io/display-name": "Virt Tools",
-            "description": "Static web for virt-tools.org",
-            "tags": "quickstart,httpd",
-            "iconClass": "icon-apache",
-            "openshift.io/long-description": "Template for virttools.org static web content",
-            "openshift.io/provider-display-name": "Libvirt",
-            "template.openshift.io/bindable": "false"
-        }
-    },
-    "objects": [
-        {
-            "kind": "Route",
-            "apiVersion": "v1",
-            "metadata": {
-                "name": "www.virt-tools.org"
-            },
-            "spec": {
-                "host": "www.virt-tools.org",
-                "to": {
-                    "kind": "Service",
-                    "name": "${NAME}"
-                },
-		"tls": {
-		    "termination": "edge",
-		    "insecureEdgeTerminationPolicy": "Redirect",
-		    "key": "${TLS_KEY}",
-		    "certificate":  "${TLS_CERT}"
-		}
-            }
-        },
-        {
-            "kind": "Route",
-            "apiVersion": "v1",
-            "metadata": {
-                "name": "www.virttools.org"
-            },
-            "spec": {
-                "host": "www.virttools.org",
-                "to": {
-                    "kind": "Service",
-                    "name": "${NAME}"
-                },
-		"tls": {
-		    "termination": "edge",
-		    "insecureEdgeTerminationPolicy": "Redirect",
-		    "key": "${TLS_KEY}",
-		    "certificate":  "${TLS_CERT}"
-		}
-            }
-        }
-    ],
-    "parameters": [
-        {
-            "name": "NAME",
-            "displayName": "Name",
-            "description": "The name assigned to all of the frontend objects defined in this template.",
-            "required": true,
-            "value": "virttools-web"
-        },
-        {
-            "name": "TLS_KEY",
-            "displayName": "TLS key for public routes",
-            "description": "TLS key for public routes"
-        },
-        {
-            "name": "TLS_CERT",
-            "displayName": "TLS cert for public routes",
-            "description": "TLS cert for public routes"
-        }
-    ]
-}
diff --git a/openshift/templates/virttools-web.json b/openshift/templates/virttools-web.json
deleted file mode 100644
index 0e60a44..0000000
--- a/openshift/templates/virttools-web.json
+++ /dev/null
@@ -1,272 +0,0 @@
-{
-    "apiVersion": "v1",
-    "kind": "Template",
-    "labels": {
-        "app": "virttools-web",
-        "template": "virttools-web"
-    },
-    "message": "The following service(s) have been created in your project: ${NAME}.\n",
-    "metadata": {
-        "name": "virtttools-web",
-        "annotations": {
-            "openshift.io/display-name": "Virt Tools",
-            "description": "Static web for virt-tools.org",
-            "tags": "quickstart,httpd",
-            "iconClass": "icon-apache",
-            "openshift.io/long-description": "Template for virttools.org static web content",
-            "openshift.io/provider-display-name": "Libvirt",
-            "template.openshift.io/bindable": "false"
-        }
-    },
-    "objects": [
-        {
-            "kind": "Service",
-            "apiVersion": "v1",
-            "metadata": {
-                "name": "${NAME}",
-                "annotations": {
-                    "description": "Exposes and load balances the application pods"
-                }
-            },
-            "spec": {
-                "ports": [
-                    {
-                        "name": "web",
-                        "port": 8080,
-                        "targetPort": 8080
-                    }
-                ],
-                "selector": {
-                    "name": "${NAME}"
-                }
-            }
-        },
-        {
-            "kind": "Route",
-            "apiVersion": "v1",
-            "metadata": {
-                "name": "${NAME}"
-            },
-            "spec": {
-                "host": "${APPLICATION_DOMAIN}",
-                "to": {
-                    "kind": "Service",
-                    "name": "${NAME}"
-                },
-		"tls": {
-		    "termination": "edge",
-		    "insecureEdgeTerminationPolicy": "Allow"
-                }
-            }
-        },
-        {
-            "kind": "ImageStream",
-            "apiVersion": "v1",
-            "metadata": {
-                "name": "${NAME}",
-                "annotations": {
-                    "description": "Keeps track of changes in the application image"
-                }
-            }
-        },
-        {
-            "kind": "BuildConfig",
-            "apiVersion": "v1",
-            "metadata": {
-                "name": "${NAME}",
-                "annotations": {
-                    "description": "Defines how to build the application",
-                    "template.alpha.openshift.io/wait-for-ready": "true"
-                }
-            },
-            "spec": {
-                "source": {
-                    "type": "Git",
-                    "git": {
-                        "uri": "${SOURCE_REPOSITORY_URL}",
-                        "ref": "${SOURCE_REPOSITORY_REF}"
-                    },
-                    "contextDir": "${CONTEXT_DIR}"
-                },
-                "strategy": {
-                    "type": "Source",
-                    "sourceStrategy": {
-                        "from": {
-                            "kind": "DockerImage",
-                            "name": "centos/httpd-24-centos7:latest"
-                        }
-                    }
-                },
-                "output": {
-                    "to": {
-                        "kind": "ImageStreamTag",
-                        "name": "${NAME}:latest"
-                    }
-                },
-                "triggers": [
-                    {
-                        "type": "ImageChange"
-                    },
-                    {
-                        "type": "ConfigChange"
-                    },
-                    {
-                        "type": "GitHub",
-                        "github": {
-                            "secret": "${GITHUB_WEBHOOK_SECRET}"
-                        }
-                    },
-                    {
-                        "type": "Generic",
-                        "generic": {
-                            "secret": "${GENERIC_WEBHOOK_SECRET}"
-                        }
-                    }
-                ]
-            }
-        },
-        {
-            "kind": "DeploymentConfig",
-            "apiVersion": "v1",
-            "metadata": {
-                "name": "${NAME}",
-                "annotations": {
-                    "description": "Defines how to deploy the application server",
-                    "template.alpha.openshift.io/wait-for-ready": "true"
-                }
-            },
-            "spec": {
-                "strategy": {
-                    "type": "Rolling"
-                },
-                "triggers": [
-                    {
-                        "type": "ImageChange",
-                        "imageChangeParams": {
-                            "automatic": true,
-                            "containerNames": [
-                                "virttools-web"
-                            ],
-                            "from": {
-                                "kind": "ImageStreamTag",
-                                "name": "${NAME}:latest"
-                            }
-                        }
-                    },
-                    {
-                        "type": "ConfigChange"
-                    }
-                ],
-                "replicas": 1,
-                "selector": {
-                    "name": "${NAME}"
-                },
-                "template": {
-                    "metadata": {
-                        "name": "${NAME}",
-                        "labels": {
-                            "name": "${NAME}"
-                        }
-                    },
-                    "spec": {
-                        "containers": [
-                            {
-                                "name": "virttools-web",
-                                "image": " ",
-                                "ports": [
-                                    {
-                                        "containerPort": 8080
-                                    }
-                                ],
-                                "readinessProbe": {
-                                    "timeoutSeconds": 3,
-                                    "initialDelaySeconds": 3,
-                                    "httpGet": {
-                                        "path": "/",
-                                        "port": 8080
-                                    }
-                                },
-                                "livenessProbe": {
-                                    "timeoutSeconds": 3,
-                                    "initialDelaySeconds": 30,
-                                    "httpGet": {
-                                        "path": "/",
-                                        "port": 8080
-                                    }
-                                },
-                                "resources": {
-                                    "limits": {
-                                        "memory": "${MEMORY_LIMIT}"
-                                    }
-                                },
-                                "env": [
-                                ]
-                            }
-                        ]
-                    }
-                }
-            }
-        }
-    ],
-    "parameters": [
-        {
-            "name": "NAME",
-            "displayName": "Name",
-            "description": "The name assigned to all of the frontend objects defined in this template.",
-            "required": true,
-            "value": "virttools-web"
-        },
-        {
-            "name": "NAMESPACE",
-            "displayName": "Namespace",
-            "description": "The OpenShift Namespace where the ImageStream resides.",
-            "required": true,
-            "value": "openshift"
-        },
-        {
-            "name": "MEMORY_LIMIT",
-            "displayName": "Memory Limit",
-            "description": "Maximum amount of memory the container can use.",
-            "required": true,
-            "value": "512Mi"
-        },
-        {
-            "name": "SOURCE_REPOSITORY_URL",
-            "displayName": "Git Repository URL",
-            "description": "The URL of the repository with your application source code.",
-            "required": true,
-            "value": "git://libvirt.org/virttools-web.git"
-        },
-        {
-            "name": "SOURCE_REPOSITORY_REF",
-            "displayName": "Git Reference",
-            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch."
-        },
-        {
-            "name": "CONTEXT_DIR",
-            "displayName": "Context Directory",
-            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
-            "value": "web"
-        },
-        {
-            "name": "APPLICATION_DOMAIN",
-            "displayName": "Application Hostname",
-            "description": "The exposed hostname that will route to the httpd service, if left blank a value will be defaulted.",
-            "value": ""
-        },
-        {
-            "name": "GITHUB_WEBHOOK_SECRET",
-            "displayName": "GitHub Webhook Secret",
-            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
-            "generate": "expression",
-            "from": "[a-zA-Z0-9]{40}"
-        },
-        {
-            "name": "GENERIC_WEBHOOK_SECRET",
-            "displayName": "Generic Webhook Secret",
-            "description": "A secret string used to configure the Generic webhook.",
-            "generate": "expression",
-            "from": "[a-zA-Z0-9]{40}"
-        }
-    ]
-}
-- 
2.24.1




More information about the libvir-list mailing list