Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gslb Ingress management and associated health checks #5

Merged
merged 1 commit into from
Dec 10, 2019

Conversation

ytsarev
Copy link
Member

@ytsarev ytsarev commented Dec 9, 2019

  • Composite Ingress spec into Gslb spec from v1beta1
    Reuse Ingress spec type directly from v1beta1 api set

  • Update status with managed hosts from Gslb Ingress rules
    Expose Gslb host list in status

  • HealthCheck functions based on Service Endpoints
    Instead of directly checking Pods' Liveness and Readiness Probes
    we rely on EndpointsList of Service primitive, basically making
    k8s doing heavy lifting for us

And associated status update

* Composite Ingress spec into Gslb spec from v1beta1
  Reuse Ingress spec type directly from v1beta1 api set

* Update status with managed hosts from Gslb Ingress rules
  Expose Gslb host list in status

* HealthCheck functions based on Service Endpoints
  Instead of directly checking Pods' Liveness and Readiness Probes
  we rely on EndpointsList of Service primitive, basically making
  k8s doing heavy lifting for us

And associated status update
@ytsarev
Copy link
Member Author

ytsarev commented Dec 9, 2019

Example CR spec and output

$ kubectl get gslb example-gslb -o yaml
apiVersion: ohmyglb.absa.oss/v1beta1
kind: Gslb
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"ohmyglb.absa.oss/v1beta1","kind":"Gslb","metadata":{"annotations":{},"name":"example-gslb","namespace":"default"},"spec":{"ingress":{"rules":[{"host":"app.cloud.absa.internal","http":{"paths":[{"backend":{"serviceName":"app","servicePort":"http"},"path":"/"}]}}]},"strategy":"roundRobin"}}
  creationTimestamp: "2019-12-09T23:14:28Z"
  generation: 2
  name: example-gslb
  namespace: default
  resourceVersion: "24978"
  selfLink: /apis/ohmyglb.absa.oss/v1beta1/namespaces/default/gslbs/example-gslb
  uid: 6b4d51cf-eb14-49d9-a4bc-35c8368ec7fe
spec:
  ingress:
    rules:
    - host: app.cloud.absa.internal
      http:
        paths:
        - backend:
            serviceName: app
            servicePort: http
          path: /
    - host: app.cloud.absa.external
      http:
        paths:
        - backend:
            serviceName: nginx
            servicePort: http
          path: /
  strategy: roundRobin
status:
  managedHosts:
  - app.cloud.absa.internal
  - app.cloud.absa.external
  serviceHealth:
    app: NotFound
    nginx: Healthy
$ kubectl describe gslb example-gslb
Name:         example-gslb
Namespace:    default
Labels:       <none>
Annotations:  kubectl.kubernetes.io/last-applied-configuration:
                {"apiVersion":"ohmyglb.absa.oss/v1beta1","kind":"Gslb","metadata":{"annotations":{},"name":"example-gslb","namespace":"default"},"spec":{"...
API Version:  ohmyglb.absa.oss/v1beta1
Kind:         Gslb
Metadata:
  Creation Timestamp:  2019-12-09T23:14:28Z
  Generation:          2
  Resource Version:    24978
  Self Link:           /apis/ohmyglb.absa.oss/v1beta1/namespaces/default/gslbs/example-gslb
  UID:                 6b4d51cf-eb14-49d9-a4bc-35c8368ec7fe
Spec:
  Ingress:
    Rules:
      Host:  app.cloud.absa.internal
      Http:
        Paths:
          Backend:
            Service Name:  app
            Service Port:  http
          Path:            /
      Host:                app.cloud.absa.external
      Http:
        Paths:
          Backend:
            Service Name:  nginx
            Service Port:  http
          Path:            /
  Strategy:                roundRobin
Status:
  Managed Hosts:
    app.cloud.absa.internal
    app.cloud.absa.external
  Service Health:
    App:    NotFound
    Nginx:  Healthy
Events:     <none>

@donovanmuller
Copy link
Contributor

This is looking awesome 👍

HealthCheck functions based on Service Endpoints
Instead of directly checking Pods' Liveness and Readiness Probes
we rely on EndpointsList of Service primitive, basically making
k8s doing heavy lifting for us

💯that is what was intended, I.e. "k8s doing heavy lifting for us"

Copy link
Contributor

@donovanmuller donovanmuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to skill up on Go so can't offer too much in terms of review but from what I see it looks great 👍

@ytsarev
Copy link
Member Author

ytsarev commented Dec 10, 2019

@donovanmuller thanks a lot for review! Merging in.

@ytsarev ytsarev merged commit 3202ae3 into master Dec 10, 2019
@ytsarev ytsarev deleted the gslb-ingress-health branch December 10, 2019 09:37
kuritka added a commit that referenced this pull request Nov 6, 2020
kuritka added a commit that referenced this pull request Nov 11, 2020
deploy-full-local-setup

fix localtargets name in documentation

local playground passed

wait

deploy-gslb-operator-14

k8gb terratest, moving to makefile

terratest-pipeline fix #1

terratest-pipeline fix #2

terratest-pipeline fix #3

terratest-pipeline fix #4

terratest-pipeline fix #5

move stable repo location from 	https://kubernetes-charts.storage.googleapis.com to https://charts.helm.sh/stable
see: https://helm.sh/blog/new-location-stable-incubator-charts/

highlight large script sections

fix version

fix version #2

fix version #3

fix version #4

simplify release pipeline, move logic to Makefile

fix terratest by adding image-repo between deploy-local-cluster args

registry.sh #1

registry.sh; installing docker registry always in deploy-full-terratest-setup; remove registry.sh

remove full.sh, remove registry.sh

test; functionality, hide generate, controller gent, manifest

remove GOPATH guardian as GO terraform-test runs clean ubuntu image, no GOLANG image

refactor generate and manifest

move kustomize

run

manager

install

infoblox-secret

retreive version from shell , deploy

fix deploy, remove  kustomize udf

bundle

build-bundle, debug-local

docker-test-build-push

change git-last-commit-hash into shell COMMIT_HASH

lowercase comments

alphabetically sort targets

remove deploy, bundle, bundle-build

remove debug-local and create debug-local-idea instead

refactor debug-local-idea to debug-idea

refactor debug-local-idea to debug-idea
kuritka added a commit that referenced this pull request Nov 11, 2020
deploy-full-local-setup

fix localtargets name in documentation

local playground passed

wait

deploy-gslb-operator-14

k8gb terratest, moving to makefile

terratest-pipeline fix #1

terratest-pipeline fix #2

terratest-pipeline fix #3

terratest-pipeline fix #4

terratest-pipeline fix #5

move stable repo location from 	https://kubernetes-charts.storage.googleapis.com to https://charts.helm.sh/stable
see: https://helm.sh/blog/new-location-stable-incubator-charts/

highlight large script sections

fix version

fix version #2

fix version #3

fix version #4

simplify release pipeline, move logic to Makefile

fix terratest by adding image-repo between deploy-local-cluster args

registry.sh #1

registry.sh; installing docker registry always in deploy-full-terratest-setup; remove registry.sh

remove full.sh, remove registry.sh

test; functionality, hide generate, controller gent, manifest

remove GOPATH guardian as GO terraform-test runs clean ubuntu image, no GOLANG image

refactor generate and manifest

move kustomize

run

manager

install

infoblox-secret

retreive version from shell , deploy

fix deploy, remove  kustomize udf

bundle

build-bundle, debug-local

docker-test-build-push

change git-last-commit-hash into shell COMMIT_HASH

lowercase comments

alphabetically sort targets

remove deploy, bundle, bundle-build

remove debug-local and create debug-local-idea instead

refactor debug-local-idea to debug-idea

refactor debug-local-idea to debug-idea
kuritka added a commit that referenced this pull request Nov 12, 2020
deploy-full-local-setup

fix localtargets name in documentation

local playground passed

wait

deploy-gslb-operator-14

k8gb terratest, moving to makefile

terratest-pipeline fix #1

terratest-pipeline fix #2

terratest-pipeline fix #3

terratest-pipeline fix #4

terratest-pipeline fix #5

move stable repo location from 	https://kubernetes-charts.storage.googleapis.com to https://charts.helm.sh/stable
see: https://helm.sh/blog/new-location-stable-incubator-charts/

highlight large script sections

fix version

fix version #2

fix version #3

fix version #4

simplify release pipeline, move logic to Makefile

fix terratest by adding image-repo between deploy-local-cluster args

registry.sh #1

registry.sh; installing docker registry always in deploy-full-terratest-setup; remove registry.sh

remove full.sh, remove registry.sh

test; functionality, hide generate, controller gent, manifest

remove GOPATH guardian as GO terraform-test runs clean ubuntu image, no GOLANG image

refactor generate and manifest

move kustomize

run

manager

install

infoblox-secret

retreive version from shell , deploy

fix deploy, remove  kustomize udf

bundle

build-bundle, debug-local

docker-test-build-push

change git-last-commit-hash into shell COMMIT_HASH

lowercase comments

alphabetically sort targets

remove deploy, bundle, bundle-build

remove debug-local and create debug-local-idea instead

refactor debug-local-idea to debug-idea

refactor debug-local-idea to debug-idea
kuritka added a commit that referenced this pull request Nov 12, 2020
deploy-full-local-setup

fix localtargets name in documentation

local playground passed

wait

deploy-gslb-operator-14

k8gb terratest, moving to makefile

terratest-pipeline fix #1

terratest-pipeline fix #2

terratest-pipeline fix #3

terratest-pipeline fix #4

terratest-pipeline fix #5

move stable repo location from 	https://kubernetes-charts.storage.googleapis.com to https://charts.helm.sh/stable
see: https://helm.sh/blog/new-location-stable-incubator-charts/

highlight large script sections

fix version

fix version #2

fix version #3

fix version #4

simplify release pipeline, move logic to Makefile

fix terratest by adding image-repo between deploy-local-cluster args

registry.sh #1

registry.sh; installing docker registry always in deploy-full-terratest-setup; remove registry.sh

remove full.sh, remove registry.sh

test; functionality, hide generate, controller gent, manifest

remove GOPATH guardian as GO terraform-test runs clean ubuntu image, no GOLANG image

refactor generate and manifest

move kustomize

run

manager

install

infoblox-secret

retreive version from shell , deploy

fix deploy, remove  kustomize udf

bundle

build-bundle, debug-local

docker-test-build-push

change git-last-commit-hash into shell COMMIT_HASH

lowercase comments

alphabetically sort targets

remove deploy, bundle, bundle-build

remove debug-local and create debug-local-idea instead

refactor debug-local-idea to debug-idea

refactor debug-local-idea to debug-idea
kuritka added a commit that referenced this pull request Nov 13, 2020
deploy-full-local-setup

fix localtargets name in documentation

local playground passed

wait

deploy-gslb-operator-14

k8gb terratest, moving to makefile

terratest-pipeline fix #1

terratest-pipeline fix #2

terratest-pipeline fix #3

terratest-pipeline fix #4

terratest-pipeline fix #5

move stable repo location from 	https://kubernetes-charts.storage.googleapis.com to https://charts.helm.sh/stable
see: https://helm.sh/blog/new-location-stable-incubator-charts/

highlight large script sections

fix version

fix version #2

fix version #3

fix version #4

simplify release pipeline, move logic to Makefile

fix terratest by adding image-repo between deploy-local-cluster args

registry.sh #1

registry.sh; installing docker registry always in deploy-full-terratest-setup; remove registry.sh

remove full.sh, remove registry.sh

test; functionality, hide generate, controller gent, manifest

remove GOPATH guardian as GO terraform-test runs clean ubuntu image, no GOLANG image

refactor generate and manifest

move kustomize

run

manager

install

infoblox-secret

retreive version from shell , deploy

fix deploy, remove  kustomize udf

bundle

build-bundle, debug-local

docker-test-build-push

change git-last-commit-hash into shell COMMIT_HASH

lowercase comments

alphabetically sort targets

remove deploy, bundle, bundle-build

remove debug-local and create debug-local-idea instead

refactor debug-local-idea to debug-idea

refactor debug-local-idea to debug-idea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants