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

New resource specification for EnvoyConfig custom resources #177

Merged
merged 6 commits into from
May 11, 2023

Conversation

roivaz
Copy link
Member

@roivaz roivaz commented Apr 25, 2023

This PR changes the way that resources are specified in the EnvoyConfig custom resource. A new field spec.resources has been added that is meant to replace spec.envoyResources. Both fields and specification formats work currently, with the controller internally transforming from spec.envoyResources to spec.resources.

The new resource specification looks like this:

apiVersion: marin3r.3scale.net/v1alpha1
kind: EnvoyConfig
metadata:
  name: test
spec:
  nodeID: test
  resources:
    - type: listener
      value:
        name: https
        address:
          socket_address:
            address: 0.0.0.0
            port_value: 8443
        filter_chains:
          - filters:
              - name: envoy.filters.network.http_connection_manager
                typed_config:
                  "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
                  access_log:
                    - name: envoy.access_loggers.file
                      typed_config:
                        "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
                        path: /dev/stdout
                  stat_prefix: ingress_http
                  rds:
                    route_config_name: test
                    config_source:
                      ads: {}
                      resource_api_version: "V3"
                  http_filters:
                    - name: envoy.filters.http.router
                      typed_config:
                        "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
            transport_socket:
              name: envoy.transport_sockets.tls
              typed_config:
                "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext
                common_tls_context:
                  tls_certificate_sds_secret_configs:
                    - name: test
                      sds_config:
                        ads: {}
                        resource_api_version: "V3"
    - type: secret
      generateFromTlsSecret: test
    - type: route
      value:
        name: test
        virtual_hosts:
          - name: all
            domains: ["*"]
            routes:
              - match:
                  prefix: "/"
                route:
                  cluster: test
    - type: cluster
      value:
        name: test
        connect_timeout: 0.010s
        type: EDS
        lb_policy: ROUND_ROBIN
        eds_cluster_config:
          eds_config:
            ads: {}
            resource_api_version: "V3"
    - type: endpoint
      generateFromEndpointSlices:
        selector:
          matchLabels:
            kubernetes.io/service-name: test
        clusterName: test
        targetPort: http

Some other updates also in this PR, like upgrade of go-control-plane, controller-runtime, etc.

/kind feature
/priority important-soon
/assign

@3scale-robot 3scale-robot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/work-in-progress labels Apr 25, 2023
@3scale-robot 3scale-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next sprint. needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. size/XL Requires about a week to complete the PR or the issue. and removed needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. labels Apr 25, 2023
@roivaz
Copy link
Member Author

roivaz commented Apr 25, 2023

/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 25, 2023
@roivaz roivaz force-pushed the feat/v1alpha2 branch 2 times, most recently from 28a2098 to b024a1c Compare May 2, 2023 14:57
@roivaz roivaz added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels May 2, 2023
@roivaz roivaz added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels May 3, 2023
@roivaz roivaz force-pushed the feat/v1alpha2 branch 4 times, most recently from 8423d29 to 04bc809 Compare May 10, 2023 11:37
Add a new field `spec.resources` that allows to better express envoy
resources. Internally, all the code uses now this field instead of `spec.envoyResources`.
The old field still works as it is transparently converted by the
controller to the new format.
The API has also been extended to support endpoint discovery from k8s
EndpointSlices and to support validationContext secret types. None of
those features are implemented yet.
@roivaz roivaz added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels May 10, 2023
@roivaz
Copy link
Member Author

roivaz commented May 10, 2023

/retitle New resource specification for EnvoyConfig custom resources

@3scale-robot 3scale-robot changed the title WIP feat/v1alpha2 New resource specification for EnvoyConfig custom resources May 10, 2023
@roivaz roivaz added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels May 10, 2023
@roivaz roivaz added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels May 10, 2023
@roivaz roivaz mentioned this pull request May 10, 2023
@slopezz
Copy link
Member

slopezz commented May 10, 2023

/lgtm

@3scale-robot 3scale-robot added the lgtm Indicates that a PR is ready to be merged. label May 10, 2023
@3scale-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 408bf726077a1138368c007d71778c7fa58c3f80

@roivaz
Copy link
Member Author

roivaz commented May 11, 2023

/approve

@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 May 11, 2023
@3scale-robot 3scale-robot merged commit 35554ed into main May 11, 2023
1 check passed
@3scale-robot 3scale-robot deleted the feat/v1alpha2 branch May 11, 2023 09:15
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.

None yet

3 participants