Commit 90012261 authored by Fotis Soldatos's avatar Fotis Soldatos
Browse files

Merge branch 'fix/change-policy-component-service' into 'develop'

fix(policy): change policy component service to ClusterIP

See merge request teraflow-h2020/controller!90
parents 46176298 9a7e59b9
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -3,13 +3,16 @@ build policy:
  variables:
    IMAGE_NAME: 'policy' # name of the microservice
    IMAGE_NAME_TEST: 'policy-test' # name of the microservice
    IMAGE_TAG: '0.0.1' # tag of the container image (production, development, etc)
    IMAGE_TAG: '0.1.0' # tag of the container image (production, development, etc)
  stage: build
  script:
    - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME/ --target builder
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
    - changes:
        - src/$IMAGE_NAME/**
        - manifests/${IMAGE_NAME}service.yaml
        - .gitlab-ci.yml

# Run tests, build & push the image
@@ -17,7 +20,7 @@ unit_test policy:
  variables:
    IMAGE_NAME: 'policy' # name of the microservice
    IMAGE_NAME_TEST: 'policy-test' # name of the microservice
    IMAGE_TAG: '0.0.1' # tag of the container image (production, development, etc)
    IMAGE_TAG: '0.1.0' # tag of the container image (production, development, etc)
  stage: unit_test
  needs:
    - build policy
@@ -29,8 +32,11 @@ unit_test policy:
    - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
    - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
    - changes:
        - src/$IMAGE_NAME/**
        - manifests/${IMAGE_NAME}service.yaml
        - .gitlab-ci.yml

# Deployment of policy service in Kubernetes Cluster
@@ -42,6 +48,12 @@ deploy policy:
  script:
    - kubectl version
    - kubectl get all
    - kubectl delete --ignore-not-found=true -f "manifests/policyservice.yaml"
    - kubectl apply -f "manifests/policyservice.yaml"
    - kubectl delete pods --selector app=policyservice
    - kubectl get all
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
      when: manual
    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
      when: manual
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@

    <groupId>eu.teraflow</groupId>
    <artifactId>policy</artifactId>
    <version>0.0.1</version>
    <version>0.1.0</version>
    <name>TeraFlow Policy Component</name>
    <description>TeraFlow Policy Component</description>

+1 −0
Original line number Diff line number Diff line
../../../../../proto/kpi_sample_types.proto
 No newline at end of file
+1 −2
Original line number Diff line number Diff line
@@ -8,12 +8,11 @@ quarkus:
  container-image:
    group: teraflow-h2020
    name: controller/policy
    tag: 0.0.1
    registry: registry.gitlab.com
  kubernetes:
    name: policyservice
    image-pull-policy: Always
    service-type: NodePort
    add-version-to-label-selectors: false
    labels:
      app: policyservice
    readiness-probe:
+5000 −3476

File changed.

Preview size limit exceeded, changes collapsed.

Loading