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

Support Istio apiVersion networking.istio.io/v1 #179

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -676,13 +676,13 @@ certificates are managed automatically for the hosts.

### Istio gateways

For Istio, gateways for API versions `networking.istio.io/v1beta1` and `networking.istio.io/v1alpha3` are supported.
For Istio, gateways for API versions `networking.istio.io/v1`, `networking.istio.io/v1beta1`, and `networking.istio.io/v1alpha3` are supported.

To enable automatic management of `Certificate` resources, annotate the Istio `Gateway` resource with `cert.gardener.cloud/purpose=managed`.
The domain names are extracted from the `spec.servers.hosts` field and from the field `spec.hosts` of related `VirtualService` resources.

```yaml
apiVersion: networking.istio.io/v1beta1
apiVersion: networking.istio.io/v1
kind: Gateway
metadata:
annotations:
Expand Down
2 changes: 2 additions & 0 deletions cmd/cert-controller-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"os"

"github.com/gardener/controller-manager-library/pkg/utils"
istionetworkingv1 "istio.io/client-go/pkg/apis/networking/v1"
istionetworkingv1alpha3 "istio.io/client-go/pkg/apis/networking/v1alpha3"
istionetworkingv1beta1 "istio.io/client-go/pkg/apis/networking/v1beta1"
coordinationv1 "k8s.io/api/coordination/v1"
Expand Down Expand Up @@ -73,6 +74,7 @@ func init() {
utils.Must(resources.Register(coordinationv1.SchemeBuilder))
utils.Must(resources.Register(istionetworkingv1alpha3.SchemeBuilder))
utils.Must(resources.Register(istionetworkingv1beta1.SchemeBuilder))
utils.Must(resources.Register(istionetworkingv1.SchemeBuilder))
utils.Must(resources.Register(gatewayapisv1alpha2.SchemeBuilder))
utils.Must(resources.Register(gatewayapisv1beta1.SchemeBuilder))
utils.Must(resources.Register(gatewayapisv1.SchemeBuilder))
Expand Down
8 changes: 4 additions & 4 deletions docs/usage/tutorials/istio-gateways.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $ kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.20/sa
#### Create an Istio Gateway:
```bash
$ cat <<EOF | kubectl apply -f -
apiVersion: networking.istio.io/v1alpha3
apiVersion: networking.istio.io/v1
kind: Gateway
metadata:
name: httpbin-gateway
Expand Down Expand Up @@ -82,7 +82,7 @@ items:
name: httpbin-gateway-gateway-hdbjb
namespace: istio-system
ownerReferences:
- apiVersion: networking.istio.io/v1beta1
- apiVersion: networking.istio.io/v1
blockOwnerDeletion: true
controller: true
kind: Gateway
Expand All @@ -106,7 +106,7 @@ These resources don't need an additional annotation.
#### Create an Istio Gateway:
```bash
$ cat <<EOF | kubectl apply -f -
apiVersion: networking.istio.io/v1alpha3
apiVersion: networking.istio.io/v1
kind: Gateway
metadata:
name: httpbin-gateway
Expand All @@ -131,7 +131,7 @@ EOF
#### Configure routes for traffic entering via the Gateway:
```bash
$ cat <<EOF | kubectl apply -f -
apiVersion: networking.istio.io/v1alpha3
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
name: httpbin
Expand Down
2 changes: 1 addition & 1 deletion examples/40-gateway-istio.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: networking.istio.io/v1beta1
apiVersion: networking.istio.io/v1
kind: Gateway
metadata:
annotations:
Expand Down
45 changes: 21 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ require (
github.com/gardener/external-dns-management v0.18.4
github.com/go-acme/lego/v4 v4.15.0
github.com/miekg/dns v1.1.58
github.com/onsi/ginkgo/v2 v2.13.0
github.com/onsi/gomega v1.29.0
github.com/onsi/ginkgo/v2 v2.17.3
github.com/onsi/gomega v1.33.1
github.com/pavlo-v-chernykh/keystore-go/v4 v4.4.0
github.com/prometheus/client_golang v1.17.0
golang.org/x/crypto v0.21.0
golang.org/x/crypto v0.22.0
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/net v0.23.0
istio.io/api v1.20.2
istio.io/client-go v1.20.2
k8s.io/api v0.28.3
golang.org/x/net v0.24.0
istio.io/api v1.22.0
istio.io/client-go v1.22.0
k8s.io/api v0.29.0
k8s.io/apiextensions-apiserver v0.28.3
k8s.io/apimachinery v0.28.3
k8s.io/client-go v0.28.3
k8s.io/apimachinery v0.29.0
k8s.io/client-go v0.29.0
k8s.io/code-generator v0.28.3
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
Expand All @@ -47,19 +47,19 @@ require (
github.com/go-asn1-ber/asn1-ber v1.5.4 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/go-ldap/ldap/v3 v3.4.4 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gobuffalo/flect v1.0.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/imdario/mergo v0.3.16 // indirect
Expand All @@ -83,30 +83,27 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.10.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.17.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
golang.org/x/tools v0.20.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/component-base v0.28.3 // indirect
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-aggregator v0.26.4 // indirect
sigs.k8s.io/controller-tools v0.13.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading