Commit e4ae50ad authored by Manuel Kieweg's avatar Manuel Kieweg 🤷
Browse files

Merge branch 'containerlab-ci' into 'master'

Containerlab ci

See merge request !185
parents ac2bbb70 c0f3929e
variables: variables:
SECURE_ANALYZERS_PREFIX: registry.gitlab.com/gitlab-org/security-products/analyzers SECURE_ANALYZERS_PREFIX: registry.gitlab.com/gitlab-org/security-products/analyzers
DOCKER_IMAGE_SHA: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA DOCKER_IMAGE_SHA: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != "develop" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH'
when: never
- if: '$CI_COMMIT_BRANCH'
stages: stages:
- .pre - .pre
- test
- build - build
- test
- apply - apply
- integration-test - integration-test
- deploy - deploy
...@@ -20,5 +28,7 @@ include: ...@@ -20,5 +28,7 @@ include:
- local: '/build/ci/.security-and-compliance-ci.yml' - local: '/build/ci/.security-and-compliance-ci.yml'
- local: '/build/ci/.build-container.yml' - local: '/build/ci/.build-container.yml'
- local: '/build/ci/.test.yml' - local: '/build/ci/.test.yml'
- local: '/build/ci/.terraform-ci.yml' - local: '/build/ci/.containerlab-ci.yml'
- local: '/build/ci/.deploy-k8s.yml' - local: '/build/ci/.uml-autogen-ci.yml'
\ No newline at end of file - local: '/build/ci/.deploy-k8s.yml'
FROM golang:1.16-buster AS builder FROM golang:1.16-buster AS installer
ARG GITLAB_USER ARG GITLAB_USER
ARG GITLAB_TOKEN ARG GITLAB_TOKEN
ARG BUILDARGS ARG BUILDARGS
WORKDIR /src/gosdn
COPY . .
RUN apt-get update && apt-get install -y git RUN apt-get update && apt-get install -y git
RUN git config --global url."https://$GITLAB_USER:$GITLAB_TOKEN@code.fbi.h-da.de".insteadOf "https://code.fbi.h-da.de" RUN git config --global url."https://$GITLAB_USER:$GITLAB_TOKEN@code.fbi.h-da.de".insteadOf "https://code.fbi.h-da.de"
RUN go env -w GOPRIVATE=code.fbi.h-da.de/*
WORKDIR /src/gosdn
COPY go.* ./
RUN go mod download
FROM installer as builder
COPY ./api ./api
COPY ./build ./build
COPY ./cmd ./cmd
COPY ./cli ./cli
COPY ./configs ./configs
COPY ./database ./database
COPY ./forks ./forks
COPY ./mocks ./mocks
COPY ./nucleus ./nucleus
COPY ./test ./test
RUN GOOS=linux go build $BUILDARGS ./cmd/gosdn RUN GOOS=linux go build $BUILDARGS ./cmd/gosdn
FROM debian:latest FROM debian:latest
EXPOSE 8080 EXPOSE 8080
EXPOSE 55055 EXPOSE 55055
COPY --from=builder /src/gosdn/gosdn . COPY --from=builder /src/gosdn/gosdn .
COPY --from=builder /src/gosdn/configs ./configs COPY ./configs ./configs
ENTRYPOINT [ "./gosdn" ] ENTRYPOINT [ "./gosdn" ]
CMD [""] CMD [""]
# goSDN [![coverage report](https://code.fbi.h-da.de/cocsn/gosdn/badges/master/coverage.svg)](https://code.fbi.h-da.de/cocsn/gosdn/-/commits/master) [![pipeline status](https://code.fbi.h-da.de/cocsn/gosdn/badges/master/pipeline.svg)](https://code.fbi.h-da.de/cocsn/gosdn/-/commits/master) # goSDN [![coverage report](https://code.fbi.h-da.de/danet/gosdn/badges/master/coverage.svg)](https://code.fbi.h-da.de/danet/gosdn/-/commits/master) [![pipeline status](https://code.fbi.h-da.de/danet/gosdn/badges/master/pipeline.svg)](https://code.fbi.h-da.de/danet/gosdn/-/commits/master)
`goSDN` is a prototypical approach to build a model driven multi-vendor SDN controller. `goSDN` is a prototypical approach to build a model driven multi-vendor SDN controller.
...@@ -42,7 +42,7 @@ You can install the latest release of `goSDN` locally using the `go get` command ...@@ -42,7 +42,7 @@ You can install the latest release of `goSDN` locally using the `go get` command
```sh ```sh
> git config --global url."git@code.fbi.h-da.de:".insteadOf "https://code.fbi.h-da.de" > git config --global url."git@code.fbi.h-da.de:".insteadOf "https://code.fbi.h-da.de"
> go env -w GOPRIVATE=code.fbi.h-da.de/cocsn/* > go env -w GOPRIVATE=code.fbi.h-da.de/cocsn/*
> go get code.fbi.h-da.de/cocsn/gosdn/cmd/gosdn > go get code.fbi.h-da.de/danet/gosdn/cmd/gosdn
``` ```
To install the development version you need to clone the repo and use `go install` to build and install the binary: To install the development version you need to clone the repo and use `go install` to build and install the binary:
...@@ -54,7 +54,7 @@ To install the development version you need to clone the repo and use `go instal ...@@ -54,7 +54,7 @@ To install the development version you need to clone the repo and use `go instal
> git clone git@code.fbi.h-da.de:cocsn/gosdn.git > git clone git@code.fbi.h-da.de:cocsn/gosdn.git
# checkout the develop branch (or any other branch) # checkout the develop branch (or any other branch)
> cd $GOPATH/src/code.fbi.h-da.de/cocsn/gosdn > cd $GOPATH/src/code.fbi.h-da.de/danet/gosdn
> git checkout develop > git checkout develop
> go install ./cmd/gosdn > go install ./cmd/gosdn
``` ```
...@@ -64,7 +64,7 @@ Now you can start `goSDN` locally using the `gosdn` command or [use the CLI](#us ...@@ -64,7 +64,7 @@ Now you can start `goSDN` locally using the `gosdn` command or [use the CLI](#us
# Getting Started # Getting Started
## k8s ## k8s
We have an instance of `goSDN` for each the latest master and current develop branch running on the department's k8s cluster. These endpoints can be accessed using the `gosdn cli` command. If anything breaks please file an [issue](https://code.fbi.h-da.de/cocsn/gosdn/-/issues/new). We have an instance of `goSDN` for each the latest master and current develop branch running on the department's k8s cluster. These endpoints can be accessed using the `gosdn cli` command. If anything breaks please file an [issue](https://code.fbi.h-da.de/danet/gosdn/-/issues/new).
## Using the CLI ## Using the CLI
...@@ -78,5 +78,5 @@ The `gosdn cli` command allows you to interact with a running `goSDN` controller ...@@ -78,5 +78,5 @@ The `gosdn cli` command allows you to interact with a running `goSDN` controller
| Master | Develop | | Master | Develop |
| ------ | ------ | | ------ | ------ |
| [![coverage report](https://code.fbi.h-da.de/cocsn/gosdn/badges/master/coverage.svg)](https://code.fbi.h-da.de/cocsn/gosdn/-/commits/master) | [![coverage report](https://code.fbi.h-da.de/cocsn/gosdn/badges/develop/coverage.svg)](https://code.fbi.h-da.de/cocsn/gosdn/-/commits/develop) | | [![coverage report](https://code.fbi.h-da.de/danet/gosdn/badges/master/coverage.svg)](https://code.fbi.h-da.de/danet/gosdn/-/commits/master) | [![coverage report](https://code.fbi.h-da.de/danet/gosdn/badges/develop/coverage.svg)](https://code.fbi.h-da.de/danet/gosdn/-/commits/develop) |
| [![pipeline status](https://code.fbi.h-da.de/cocsn/gosdn/badges/master/pipeline.svg)](https://code.fbi.h-da.de/cocsn/gosdn/-/commits/master) | [![pipeline status](https://code.fbi.h-da.de/cocsn/gosdn/badges/develop/pipeline.svg)](https://code.fbi.h-da.de/cocsn/gosdn/-/commits/develop) | | [![pipeline status](https://code.fbi.h-da.de/danet/gosdn/badges/master/pipeline.svg)](https://code.fbi.h-da.de/danet/gosdn/-/commits/master) | [![pipeline status](https://code.fbi.h-da.de/danet/gosdn/badges/develop/pipeline.svg)](https://code.fbi.h-da.de/danet/gosdn/-/commits/develop) |
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
syntax = "proto3"; syntax = "proto3";
package openconfig.enums; package openconfig.enums;
option go_package = "code.fbi.h-da.de/cocsn/gosdn"; option go_package = "code.fbi.h-da.de/danet/gosdn";
import "github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto"; import "github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto";
import "github.com/openconfig/ygot/proto/yext/yext.proto"; import "github.com/openconfig/ygot/proto/yext/yext.proto";
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
package openconfig package openconfig
import ( import (
openconfig_interfaces "code.fbi.h-da.de/cocsn/gosdn/api/proto/openconfig/openconfig_interfaces" openconfig_interfaces "code.fbi.h-da.de/danet/gosdn/api/proto/openconfig/openconfig_interfaces"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
_ "github.com/openconfig/ygot/proto/yext" _ "github.com/openconfig/ygot/proto/yext"
_ "github.com/openconfig/ygot/proto/ywrapper" _ "github.com/openconfig/ygot/proto/ywrapper"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
syntax = "proto3"; syntax = "proto3";
package openconfig; package openconfig;
option go_package = "code.fbi.h-da.de/cocsn/gosdn"; option go_package = "code.fbi.h-da.de/danet/gosdn";
import "github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto"; import "github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto";
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
package openconfig_openconfig_interfaces package openconfig_openconfig_interfaces
import ( import (
enums "code.fbi.h-da.de/cocsn/gosdn/api/proto/openconfig/enums" enums "code.fbi.h-da.de/danet/gosdn/api/proto/openconfig/enums"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
_ "github.com/openconfig/ygot/proto/yext" _ "github.com/openconfig/ygot/proto/yext"
ywrapper "github.com/openconfig/ygot/proto/ywrapper" ywrapper "github.com/openconfig/ygot/proto/ywrapper"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
syntax = "proto3"; syntax = "proto3";
package openconfig.openconfig_interfaces; package openconfig.openconfig_interfaces;
option go_package = "code.fbi.h-da.de/cocsn/gosdn"; option go_package = "code.fbi.h-da.de/danet/gosdn";
import "github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto"; import "github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto";
import "github.com/openconfig/ygot/proto/yext/yext.proto"; import "github.com/openconfig/ygot/proto/yext/yext.proto";
......
...@@ -3,12 +3,13 @@ package main ...@@ -3,12 +3,13 @@ package main
import ( import (
"context" "context"
"os" "os"
"strconv"
"code.fbi.h-da.de/cocsn/gosdn/nucleus" "code.fbi.h-da.de/danet/gosdn/nucleus"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
appv1 "k8s.io/api/apps/v1" appv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
netv1 "k8s.io/api/networking/v1beta1"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/intstr"
...@@ -16,6 +17,16 @@ import ( ...@@ -16,6 +17,16 @@ import (
"k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/clientcmd"
) )
// GRPC defines the grpc port used by the deployment
const GRPC = 55055
// HTTP defines the http port used by the deployment
const HTTP = 8080
var service *corev1.Service
var deployment *appv1.Deployment
var config *corev1.ConfigMap
func main() { func main() {
log.SetFormatter(&log.JSONFormatter{}) log.SetFormatter(&log.JSONFormatter{})
kubeconfig, err := clientcmd.BuildConfigFromFlags("https://api.ocp.fbi.h-da.de:6443", "") kubeconfig, err := clientcmd.BuildConfigFromFlags("https://api.ocp.fbi.h-da.de:6443", "")
...@@ -37,15 +48,6 @@ func main() { ...@@ -37,15 +48,6 @@ func main() {
tag = os.Getenv("CI_COMMIT_SHA") tag = os.Getenv("CI_COMMIT_SHA")
} }
switch os.Getenv("CI_NIGHTLY") {
case "mainline":
tag = "nightly"
case "develop":
tag = "nightly-develop"
default:
tag = os.Getenv("CI_COMMIT_SHA")
}
switch os.Getenv("K8S_OP") { switch os.Getenv("K8S_OP") {
case "create": case "create":
if err := create(clientset, tag); err != nil { if err := create(clientset, tag); err != nil {
...@@ -55,27 +57,56 @@ func main() { ...@@ -55,27 +57,56 @@ func main() {
if err := remove(clientset, tag); err != nil { if err := remove(clientset, tag); err != nil {
log.Fatal(err) log.Fatal(err)
} }
case "getenv":
if err := getenv(clientset, tag); err != nil {
log.Fatal(err)
}
default: default:
log.Fatal("invalid option") log.Fatal("invalid option")
} }
} }
func getenv(clientset *kubernetes.Clientset, tag string) error {
env := "gosdn-" + tag
opts := metav1.GetOptions{}
ctx := context.Background()
service, err := clientset.CoreV1().Services("cocsn").Get(ctx, env, opts)
if err != nil {
return err
}
var ip string
for _, ingress := range service.Status.LoadBalancer.Ingress {
ip = ingress.IP
}
var port string
for _, p := range service.Spec.Ports {
if p.Name == "grpc" {
port = strconv.Itoa(int(p.NodePort))
}
}
log.WithFields(log.Fields{
"ip": ip,
"port": port,
}).Info(env)
viper.Set("GOSDN_TEST_API_ENDPOINT", ip+":"+port)
return viper.SafeWriteConfigAs(".k8s.toml")
}
// nolint // nolint
func create(clientset *kubernetes.Clientset, tag string) error { func create(clientset *kubernetes.Clientset, tag string) error {
env := "gosdn-" + tag env := "gosdn-" + tag
service := createService(env) deployment = createDeployment(env, tag)
ingress := createIngress(env)
config := createConfigMap(env)
deployment := createDeployment(env, tag)
opts := metav1.CreateOptions{} opts := metav1.CreateOptions{}
ctx := context.Background() ctx := context.Background()
_, err := clientset.CoreV1().Services("cocsn").Create(ctx, service, opts)
_, err := clientset.AppsV1().Deployments("cocsn").Create(ctx, deployment, opts)
if err != nil { if err != nil {
switch err.(type) { switch err.(type) {
case *errors.StatusError: case *errors.StatusError:
if err.(*errors.StatusError).ErrStatus.Code == 409 { if err.(*errors.StatusError).ErrStatus.Code == 409 {
if err := update(clientset, service, env); err != nil { if err := update(clientset, deployment, env); err != nil {
return err log.Error(err)
} }
} else { } else {
log.Error(err) log.Error(err)
...@@ -84,25 +115,14 @@ func create(clientset *kubernetes.Clientset, tag string) error { ...@@ -84,25 +115,14 @@ func create(clientset *kubernetes.Clientset, tag string) error {
log.Error(err) log.Error(err)
} }
} else { } else {
log.Printf("service %v created", service.Name) log.Printf("deployment %v created", deployment.Name)
} }
_, err = clientset.NetworkingV1beta1().Ingresses("cocsn").Create(ctx, ingress, opts) deployment, err = clientset.AppsV1().Deployments("cocsn").Get(ctx, env, metav1.GetOptions{})
if err != nil { if err != nil {
switch err.(type) { log.Error(err)
case *errors.StatusError:
if err.(*errors.StatusError).ErrStatus.Code == 409 {
if err := update(clientset, ingress, env); err != nil {
log.Error(err)
}
} else {
log.Error(err)
}
default:
log.Error(err)
}
} else {
log.Printf("ingress %v created", ingress.Name)
} }
config = createConfigMap(env)
_, err = clientset.CoreV1().ConfigMaps("cocsn").Create(ctx, config, opts) _, err = clientset.CoreV1().ConfigMaps("cocsn").Create(ctx, config, opts)
if err != nil { if err != nil {
switch err.(type) { switch err.(type) {
...@@ -120,13 +140,15 @@ func create(clientset *kubernetes.Clientset, tag string) error { ...@@ -120,13 +140,15 @@ func create(clientset *kubernetes.Clientset, tag string) error {
} else { } else {
log.Printf("configMap %v created", config.Name) log.Printf("configMap %v created", config.Name)
} }
_, err = clientset.AppsV1().Deployments("cocsn").Create(ctx, deployment, opts)
service = createService(env)
_, err = clientset.CoreV1().Services("cocsn").Create(ctx, service, opts)
if err != nil { if err != nil {
switch err.(type) { switch err.(type) {
case *errors.StatusError: case *errors.StatusError:
if err.(*errors.StatusError).ErrStatus.Code == 409 { if err.(*errors.StatusError).ErrStatus.Code == 409 {
if err := update(clientset, deployment, env); err != nil { if err := update(clientset, service, env); err != nil {
log.Error(err) return err
} }
} else { } else {
log.Error(err) log.Error(err)
...@@ -135,7 +157,7 @@ func create(clientset *kubernetes.Clientset, tag string) error { ...@@ -135,7 +157,7 @@ func create(clientset *kubernetes.Clientset, tag string) error {
log.Error(err) log.Error(err)
} }
} else { } else {
log.Printf("deployment %v created", deployment.Name) log.Printf("service %v created", service.Name)
} }
return nil return nil
} }
...@@ -144,9 +166,9 @@ func update(clientset *kubernetes.Clientset, resource metav1.Common, env string) ...@@ -144,9 +166,9 @@ func update(clientset *kubernetes.Clientset, resource metav1.Common, env string)
opts := metav1.UpdateOptions{} opts := metav1.UpdateOptions{}
getOpts := metav1.GetOptions{} getOpts := metav1.GetOptions{}
ctx := context.Background() ctx := context.Background()
switch resource.(type) { switch resource := resource.(type) {
case *corev1.Service: case *corev1.Service:
service := resource.(*corev1.Service) service := resource
s, err := clientset.CoreV1().Services("cocsn").Get(ctx, env, getOpts) s, err := clientset.CoreV1().Services("cocsn").Get(ctx, env, getOpts)
if err != nil { if err != nil {
return err return err
...@@ -157,20 +179,8 @@ func update(clientset *kubernetes.Clientset, resource metav1.Common, env string) ...@@ -157,20 +179,8 @@ func update(clientset *kubernetes.Clientset, resource metav1.Common, env string)
return err return err
} }
log.Printf("service %v updated", service.Name) log.Printf("service %v updated", service.Name)
case *netv1.Ingress:
ingress := resource.(*netv1.Ingress)
i, err := clientset.NetworkingV1beta1().Ingresses("cocsn").Get(ctx, env, getOpts)
if err != nil {
return err
}
i.DeepCopyInto(ingress)
_, err = clientset.NetworkingV1beta1().Ingresses("cocsn").Update(ctx, ingress, opts)
if err != nil {
return err
}
log.Printf("ingress %v updated", ingress.Name)
case *corev1.ConfigMap: case *corev1.ConfigMap:
config := resource.(*corev1.ConfigMap) config := resource
c, err := clientset.CoreV1().ConfigMaps("cocsn").Get(ctx, env+"-config", getOpts) c, err := clientset.CoreV1().ConfigMaps("cocsn").Get(ctx, env+"-config", getOpts)
if err != nil { if err != nil {
return err return err
...@@ -182,7 +192,7 @@ func update(clientset *kubernetes.Clientset, resource metav1.Common, env string) ...@@ -182,7 +192,7 @@ func update(clientset *kubernetes.Clientset, resource metav1.Common, env string)
} }
log.Printf("configMap %v updated", config.Name) log.Printf("configMap %v updated", config.Name)
case *appv1.Deployment: case *appv1.Deployment:
deployment := resource.(*appv1.Deployment) deployment := resource
d, err := clientset.AppsV1().Deployments("cocsn").Get(ctx, env, getOpts) d, err := clientset.AppsV1().Deployments("cocsn").Get(ctx, env, getOpts)
if err != nil { if err != nil {
return err return err
...@@ -221,12 +231,6 @@ func remove(clientset *kubernetes.Clientset, tag string) error { ...@@ -221,12 +231,6 @@ func remove(clientset *kubernetes.Clientset, tag string) error {
} else { } else {
log.Printf("deployment %v deleted", env) log.Printf("deployment %v deleted", env)
} }
err = clientset.NetworkingV1beta1().Ingresses("cocsn").Delete(ctx, env, opts)
if err != nil {
log.Error(err)
} else {
log.Printf("ingress %v deleted", env)
}
return err return err
} }
...@@ -240,23 +244,30 @@ func createService(environment string) *corev1.Service { ...@@ -240,23 +244,30 @@ func createService(environment string) *corev1.Service {
Name: environment, Name: environment,
Namespace: "cocsn", Namespace: "cocsn",
Labels: map[string]string{"run": environment}, Labels: map[string]string{"run": environment},
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: "v1",
Kind: "Deployment",
Name: environment,
UID: deployment.GetUID(),
},
},
}, },
Spec: corev1.ServiceSpec{ Spec: corev1.ServiceSpec{
Ports: []corev1.ServicePort{ Ports: []corev1.ServicePort{
{ {
Name: "http", Name: "http",
Port: 8080, Port: HTTP,
TargetPort: intstr.IntOrString{IntVal: 8080}, TargetPort: intstr.IntOrString{IntVal: HTTP},
}, },
{ {
Name: "grpc", Name: "grpc",
Port: 55055, Port: GRPC,
TargetPort: intstr.IntOrString{IntVal: 55055}, TargetPort: intstr.IntOrString{IntVal: GRPC},
}, },
}, },
Selector: map[string]string{"run": environment}, Selector: map[string]string{"run": environment},
Type: "NodePort", Type: "LoadBalancer",
ExternalName: environment + ".apps.ocp.fbi.h-da.de",
}, },
} }
} }
...@@ -294,18 +305,18 @@ func createDeployment(environment, hash string) *appv1.Deployment { ...@@ -294,18 +305,18 @@ func createDeployment(environment, hash string) *appv1.Deployment {
Containers: []corev1.Container{ Containers: []corev1.Container{
{ {
Name: "gosdn", Name: "gosdn",
Image: "registry.code.fbi.h-da.de/cocsn/gosdn:" + hash, Image: "registry.code.fbi.h-da.de/danet/gosdn:" + hash,
Command: nil, Command: nil,
Args: nil, Args: nil,
WorkingDir: "", WorkingDir: "",
Ports: []corev1.ContainerPort{ Ports: []corev1.ContainerPort{
{ {
Name: "grpc", Name: "grpc",
ContainerPort: 55055, ContainerPort: GRPC,
}, },
{ {
Name: "http", Name: "http",
ContainerPort: 8080, ContainerPort: HTTP,
}, },
}, },
VolumeMounts: []corev1.VolumeMount{ VolumeMounts: []corev1.VolumeMount{
...@@ -318,7 +329,7 @@ func createDeployment(environment, hash string) *appv1.Deployment { ...@@ -318,7 +329,7 @@ func createDeployment(environment, hash string) *appv1.Deployment {
Handler: corev1.Handler{ Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{ HTTPGet: &corev1.HTTPGetAction{
Path: "/livez", Path: "/livez",
Port: intstr.IntOrString{IntVal: 8080}, Port: intstr.IntOrString{IntVal: HTTP},
}, },
}, },
InitialDelaySeconds: 5, InitialDelaySeconds: 5,
...@@ -328,7 +339,7 @@ func createDeployment(environment, hash string) *appv1.Deployment { ...@@ -328,7 +339,7 @@ func createDeployment(environment, hash string) *appv1.Deployment {
Handler: corev1.Handler{ Handler: corev1.Handler{