projectcontour / ir2proxy Goto Github PK
View Code? Open in Web Editor NEWir2proxy is a tool to convert Contour's IngressRoute resources to HTTPProxy resources.
License: Apache License 2.0
ir2proxy is a tool to convert Contour's IngressRoute resources to HTTPProxy resources.
License: Apache License 2.0
Document the testing machinery and how to add new tests.
Load balancing strategy behaviour is that the first setting found will be the translated one, and any additional ones specified will add warnings.
The Healthcheck should be the same.
We should update the HTTPProxy CRD spec, it will mean that no empty status: {}
fields are output, now that there is a status subresource.
It would be great to allow ir2proxy to take a directory as an arg to process a set of yaml objects instead of just a single yaml file.
From @moderation:
The empty status: {} stanza at the end of a converted IngressRoute object causes the following deployment failures in our environment:
error: error validating "kube\\kustomize\\overlays\\local": error validating data: [ValidationError(HTTPProxy.status): missing required field "currentStatus" in io.projectcontour.v1.HTTPProxy.status, ValidationError(HTTPProxy.status): missing required field "description" in io.projectcontour.v1.HTTPProxy.status]; if you choose to ignore these errors, turn validation off with --validate=false
The README should tell you about the ways the conversion can not work out, and what the converter will do about them.
The YAML output of the HTTPProxy includes the currentTimestamp
field, although we don't initialise it, so it should be set to a zero value. By the ObjectMeta spec, this field should not be set by users (it will actually be thrown away by kubectl apply
, I think).
This issue is to look into either:
@jpeach raised a great question - how to track the warnings generated by a conversion once the conversion is done, and an even better solution - just put the warnings in the file.
The goreleaser artifacts include both i386 and x86_64 builds for Windows, Linux and macOS. i386 isn't a working architecture for macOS, and I'd bet that x86_64 is sufficient for the other platforms.
Once HTTPProxy is updated (in projectcontour/contour#1973), then all the test HTTPProxy YAMLs will need to have the status
stanza removed.
The Contour dependency should be updated to 1.1 before ir2proxy 1.0 is released.
Currently, ir2proxy does not handle non-root IngressRoute objects.
The issue here is that IngressRoute objects contain the full path, including any delegation prefixes, while HTTPProxy objects don't. So we need a way to guess at what the include path for a non-root IngressRoute was.
I suspect a largest common substring across all prefixes in an Ingressroute may work, but will need to experiment to check.
Logged by @slguarderas in projectcontour/contour#2564:
When using the conversion tool, it failed to migrate the tcpproxy portion of the IngressRoute.
Here is the input:
---
apiVersion: contour.heptio.com/v1beta1
kind: IngressRoute
metadata:
name: tls-edge-terminate-prometheus-k8s-thanos
spec:
virtualhost:
fqdn: "tls-edge-terminate-prometheus-k8s-thanos{{ domain_apps }}"
tls:
secretName: "{{ default_contour_cert }}"
tcpproxy:
services:
- name: prometheus-k8s-thanos
port: 10901
Output:
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
name: tls-edge-terminate-prometheus-k8s-thanos
spec:
virtualhost:
fqdn: tls-edge-terminate-prometheus-k8s-thanos{{ domain_apps }}
tls:
secretName: '{{ default_contour_cert }}'
What did you expect to happen:
The tcpproxy should have been included in the generated HttpProxy, as in:
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
name: tls-edge-terminate-prometheus-k8s-thanos
spec:
virtualhost:
fqdn: tls-edge-terminate-prometheus-k8s-thanos{{ domain_apps }}
tls:
secretName: '{{ default_contour_cert }}'
tcpproxy:
services:
- name: prometheus-k8s-thanos
port: 10901
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
): v1.15.3+vmware.1/etc/os-release
):From @jpeach:
Maybe we want to consider a Warning object that has multiple lines. Then we could join it for the single-line output and prefix it for the YAML.
I think this is probably a good idea, but there's a bit of wiring to do.
IngressRoute and HTTPProxy both support prefix rewrite, ir2proxy needs to as well.
ir2proxy should be able to be installed from homebrew, rpms, debs, etc.
This issue covers setting up goreleaser to generate those things.
ir2proxy should be able to translate IngressRoute objects that contain prefix rewrites.
Currently blocked on Contour 1.1, which will include the functionality.
The goreleaser Github action is broken at the moment. Either fix it, or remove the config.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.