diff --git a/README.md b/README.md index 4d3933f..9c44ea8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# JHTTP +# JHTTP JHTTP is a simple HTTP server written in the Java 8. @@ -29,4 +29,4 @@ It creates a self-contained, executable JAR in the `target` directory. * [Update a test](src/test/java/io/harness/jhttp/server/HeaderListTest.java) * [Update README](README.md) Test3 - +# delete this diff --git a/k8s_manifest/autostoppingrule.yaml b/k8s_manifest/autostoppingrule.yaml new file mode 100644 index 0000000..d7aad72 --- /dev/null +++ b/k8s_manifest/autostoppingrule.yaml @@ -0,0 +1,16 @@ +apiVersion: ccm.harness.io/v1 +kind: AutoStoppingRule +metadata: + name: danf-web-united + namespace: default + annotations: + harness.io/cloud-connector-id: Harness_GCP_Billing +spec: + service: + name: web + port: 80 + ingress: + name: nginx-ingress-no-rewrite + controllerName: nginx + idleTimeMins: 15 + hideProgressPage: false diff --git a/k8s_manifest/jhttp_deployment.yaml b/k8s_manifest/jhttp_deployment.yaml new file mode 100644 index 0000000..e40f842 --- /dev/null +++ b/k8s_manifest/jhttp_deployment.yaml @@ -0,0 +1,50 @@ +{{- if .Values.createNamespace}} +apiVersion: v1 +kind: Namespace +metadata: + name: {{.Values.namespace}} +{{- end}} +# --- +# apiVersion: v1 +# kind: Service +# metadata: +# name: my-jhttp-svc +# labels: +# app: jhttp +# spec: +# type: LoadBalancer +# ports: +# - port: 80 +# selector: +# app: jhttp +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: jhttp + name: jhttp + namespace: {{.Values.namespace}} +spec: + replicas: {{int .Values.replicas}} + selector: + matchLabels: + app: jhttp + template: + metadata: + labels: + app: jhttp + spec: + containers: + - image: {{.Values.image}} + imagePullPolicy: IfNotPresent + name: jhttp-state-hc2cp + ports: + - containerPort: 80 + resources: + limits: + memory: 1024Mi + cpu: 100m + requests: + memory: 1024Mi + cpu: 100m diff --git a/k8s_manifest/service.yaml b/k8s_manifest/service.yaml new file mode 100644 index 0000000..35cb7b9 --- /dev/null +++ b/k8s_manifest/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{.Values.name}}-svc +spec: + type: {{.Values.serviceType}} + ports: + - port: {{.Values.servicePort}} + targetPort: {{.Values.serviceTargetPort}} + protocol: TCP + selector: + app: {{.Values.name}} \ No newline at end of file diff --git a/k8s_manifest/values.yaml b/k8s_manifest/values.yaml new file mode 100644 index 0000000..7378840 --- /dev/null +++ b/k8s_manifest/values.yaml @@ -0,0 +1,30 @@ +name: <+service.name> +replicas: 2 + +image: <+artifact.image> +# dockercfg: <+artifact.imagePullSecret> + +createNamespace: true +namespace: <+infra.namespace> + +# Service Type allow you to specify what kind of service you want. +# Possible values for ServiceType are: +# ClusterIP | NodePort | LoadBalancer | ExternalName +serviceType: LoadBalancer + +# A Service can map an incoming port to any targetPort. +# targetPort is where application is listening on inside the container. +servicePort: 80 +serviceTargetPort: 80 + +# Specify all environment variables to be added to the container. +# The following two maps, config and secrets, are put into a ConfigMap +# and a Secret, respectively. +# Both are added to the container environment in podSpec as envFrom source. + + +# env: +# config: +# key1: value10 +# secrets: +# key2: value2