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

feat/envoy-deployment #89

Merged
merged 35 commits into from
Apr 13, 2021
Merged

feat/envoy-deployment #89

merged 35 commits into from
Apr 13, 2021

Conversation

roivaz
Copy link
Member

@roivaz roivaz commented Apr 12, 2021

This PR adds a new custom resource, the EnvoyDeployment that allows to deploy envoy as a k8s Deployment.

Implemented functionality for EnvoyDeployment:

  • Requires a reference to a DiscoveryService and to an EnvoyConfig to be able to configure itself through service discovery. Will dynamically load the envoy resources specified in the EnvoyConfig.
  • Automatically generates the required bootstrap configuration to talk to the discovery service by using the provided reference.
  • Automatically selects the envoy API version at use by using the provided reference to an EnvoyConfig resource.
  • Cofigurable number of replicas, either via a static number or using an HPA
  • Configurable Pod resource requirementes
  • Configurable Pod affinity
  • Configurable pod disruption budget
  • Configurable Pod image
  • Configurable Pod ports
  • Configurable extra arguments to pass to the envoy process
  • Configurable admin port and admin log path
  • Configurable liveness and readiness probe timeouts and thresholds
  • Automatically triggers rollouts when changes to envoy static configs (like admin port configurations) occur.

An example of the resource:

apiVersion: operator.marin3r.3scale.net/v1alpha1
kind: EnvoyDeployment
metadata:
  name: envoy
spec:
  discoveryServiceRef: xds
  envoyConfigRef: config
  image: envoyproxy/envoy:1.16.2
  ports:
    - name: https
      port: 8443
  extraArgs:
    - --component-log-level
    - http:debug
  adminAccessLogPath: /dev/null
  resources:
    requests:
      memory: "64Mi"
      cpu: "100m"
    limits:
      memory: "128Mi"
      cpu: "200"
  replicas:
    dynamic:
      minReplicas: 1
      maxReplicas: 10
      metrics:
        - type: Resource
          resource:
            name: cpu
            target:
              type: Utilization
              averageUtilization: 50
  podDisruptionBudget:
    minAvailable: 1

Integration and e2e tests have been added to cover the added functinality.

…discovery. This change strives for simplicity
The condition to update the resource wsa wrong and the controller was
never picking up changes and properly updating the configmaps with the
config.
* Configurable HPA
* Configurable Pod affinity
* Configurable PDB
@roivaz roivaz added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 12, 2021
@roivaz roivaz requested review from raelga and slopezz April 12, 2021 11:26
@3scale-robot 3scale-robot added needs-priority Indicates a PR or issue lacks a `priority/foo` label and requires one. needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. labels Apr 12, 2021
@roivaz roivaz added the size/XL Requires about a week to complete the PR or the issue. label Apr 12, 2021
@3scale-robot 3scale-robot removed the needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. label Apr 12, 2021
@roivaz roivaz added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next sprint. label Apr 12, 2021
@3scale-robot 3scale-robot removed the needs-priority Indicates a PR or issue lacks a `priority/foo` label and requires one. label Apr 12, 2021
@roivaz
Copy link
Member Author

roivaz commented Apr 12, 2021

/ok-to-test

@3scale-robot 3scale-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Apr 12, 2021
@slopezz
Copy link
Member

slopezz commented Apr 12, 2021

/lgtm

@3scale-robot 3scale-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 12, 2021
@raelga
Copy link
Contributor

raelga commented Apr 12, 2021

Awesome work @roivaz , congrats!
/lgtm

@3scale-robot 3scale-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 12, 2021
@3scale-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roivaz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@3scale-robot 3scale-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 12, 2021
@roivaz roivaz removed the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Apr 12, 2021
@roivaz
Copy link
Member Author

roivaz commented Apr 12, 2021

/ok-to-test

@3scale-robot 3scale-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Apr 12, 2021
@raelga
Copy link
Contributor

raelga commented Apr 13, 2021

/lgtm

@3scale-robot 3scale-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 13, 2021
@3scale-robot 3scale-robot merged commit 9e9a5d2 into main Apr 13, 2021
@3scale-robot 3scale-robot deleted the feat/envoy-deployment branch April 13, 2021 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next sprint. size/XL Requires about a week to complete the PR or the issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants