Skip to content

Commit

Permalink
Rename hello-helmfile and hello-sops
Browse files Browse the repository at this point in the history
  • Loading branch information
bitfield committed Sep 16, 2018
1 parent ac298cc commit 39fac9a
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helmfile/helmfile.yaml → hello-helmfile/helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ repositories:
releases:
- name: demo
namespace: demo
chart: ../03-hello-helm/k8s/demo
chart: ../hello-helm/k8s/demo
values:
- "../03-hello-helm/k8s/demo/production-values.yaml"
- "../hello-helm/k8s/demo/production-values.yaml"

- name: kube-state-metrics
namespace: kube-state-metrics
Expand Down
9 changes: 9 additions & 0 deletions hello-pod/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM golang:1.11-alpine AS build

WORKDIR /src/
COPY main.go go.* /src/
RUN CGO_ENABLED=0 go build -o /bin/demo

FROM scratch
COPY --from=build /bin/demo /bin/demo
ENTRYPOINT ["/bin/demo"]
1 change: 1 addition & 0 deletions hello-pod/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module github.com/cloudnativedevops/demo/hello-pod
19 changes: 19 additions & 0 deletions hello-pod/k8s/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: demo
spec:
replicas: 3
selector:
matchLabels:
app: demo
template:
metadata:
labels:
app: demo
spec:
containers:
- name: demo
image: cloudnatived/demo:hello-pod
ports:
- containerPort: 8888
14 changes: 14 additions & 0 deletions hello-pod/k8s/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: demo
labels:
app: demo
spec:
ports:
- port: 8888
protocol: TCP
targetPort: 8888
selector:
app: demo
type: LoadBalancer
18 changes: 18 additions & 0 deletions hello-pod/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package main

import (
"fmt"
"log"
"net/http"
"os"
)

func handler(w http.ResponseWriter, r *http.Request) {
pod := os.Getenv("HOSTNAME")
fmt.Fprintf(w, "This is pod %s\n", pod)
}

func main() {
http.HandleFunc("/", handler)
log.Fatal(http.ListenAndServe(":8888", nil))
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 39fac9a

Please sign in to comment.