diff --git a/cmd/k8s-operator/deploy/crds/tailscale.com_proxygroups.yaml b/cmd/k8s-operator/deploy/crds/tailscale.com_proxygroups.yaml
index 86e74e441..e101c201f 100644
--- a/cmd/k8s-operator/deploy/crds/tailscale.com_proxygroups.yaml
+++ b/cmd/k8s-operator/deploy/crds/tailscale.com_proxygroups.yaml
@@ -103,7 +103,7 @@ spec:
pattern: ^tag:[a-zA-Z][a-zA-Z0-9-]*$
type:
description: |-
- Type of the ProxyGroup proxies. Supported types are egress and ingress.
+ Type of the ProxyGroup proxies. Currently the only supported type is egress.
Type is immutable once a ProxyGroup is created.
type: string
enum:
diff --git a/cmd/k8s-operator/deploy/manifests/operator.yaml b/cmd/k8s-operator/deploy/manifests/operator.yaml
index e966ef559..54b32bef0 100644
--- a/cmd/k8s-operator/deploy/manifests/operator.yaml
+++ b/cmd/k8s-operator/deploy/manifests/operator.yaml
@@ -2860,7 +2860,7 @@ spec:
type: array
type:
description: |-
- Type of the ProxyGroup proxies. Supported types are egress and ingress.
+ Type of the ProxyGroup proxies. Currently the only supported type is egress.
Type is immutable once a ProxyGroup is created.
enum:
- egress
diff --git a/cmd/k8s-operator/operator.go b/cmd/k8s-operator/operator.go
index 8fa979094..8fcd1342c 100644
--- a/cmd/k8s-operator/operator.go
+++ b/cmd/k8s-operator/operator.go
@@ -331,28 +331,6 @@ func runReconcilers(opts reconcilerOpts) {
if err != nil {
startlog.Fatalf("could not create ingress reconciler: %v", err)
}
- lc, err := opts.tsServer.LocalClient()
- if err != nil {
- startlog.Fatalf("could not get local client: %v", err)
- }
- err = builder.
- ControllerManagedBy(mgr).
- For(&networkingv1.Ingress{}).
- Named("ingress-pg-reconciler").
- Watches(&corev1.Service{}, handler.EnqueueRequestsFromMapFunc(serviceHandlerForIngressPG(mgr.GetClient(), startlog))).
- Complete(&IngressPGReconciler{
- recorder: eventRecorder,
- tsClient: opts.tsClient,
- tsnetServer: opts.tsServer,
- defaultTags: strings.Split(opts.proxyTags, ","),
- Client: mgr.GetClient(),
- logger: opts.log.Named("ingress-pg-reconciler"),
- lc: lc,
- tsNamespace: opts.tailscaleNamespace,
- })
- if err != nil {
- startlog.Fatalf("could not create ingress-pg-reconciler: %v", err)
- }
connectorFilter := handler.EnqueueRequestsFromMapFunc(managedResourceHandlerForType("connector"))
// If a ProxyClassChanges, enqueue all Connectors that have
@@ -1178,42 +1156,6 @@ func indexEgressServices(o client.Object) []string {
return []string{o.GetAnnotations()[AnnotationProxyGroup]}
}
-// serviceHandlerForIngressPG returns a handler for Service events that ensures that if the Service
-// associated with an event is a backend Service for a tailscale Ingress with ProxyGroup annotation,
-// the associated Ingress gets reconciled.
-func serviceHandlerForIngressPG(cl client.Client, logger *zap.SugaredLogger) handler.MapFunc {
- return func(ctx context.Context, o client.Object) []reconcile.Request {
- ingList := networkingv1.IngressList{}
- if err := cl.List(ctx, &ingList, client.InNamespace(o.GetNamespace())); err != nil {
- logger.Debugf("error listing Ingresses: %v", err)
- return nil
- }
- reqs := make([]reconcile.Request, 0)
- for _, ing := range ingList.Items {
- if ing.Spec.IngressClassName == nil || *ing.Spec.IngressClassName != tailscaleIngressClassName {
- continue
- }
- if !hasProxyGroupAnnotation(&ing) {
- continue
- }
- if ing.Spec.DefaultBackend != nil && ing.Spec.DefaultBackend.Service != nil && ing.Spec.DefaultBackend.Service.Name == o.GetName() {
- reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&ing)})
- }
- for _, rule := range ing.Spec.Rules {
- if rule.HTTP == nil {
- continue
- }
- for _, path := range rule.HTTP.Paths {
- if path.Backend.Service != nil && path.Backend.Service.Name == o.GetName() {
- reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&ing)})
- }
- }
- }
- }
- return reqs
- }
-}
-
func hasProxyGroupAnnotation(obj client.Object) bool {
ing := obj.(*networkingv1.Ingress)
return ing.Annotations[AnnotationProxyGroup] != ""
diff --git a/k8s-operator/api.md b/k8s-operator/api.md
index fae25b1f6..64756c8f1 100644
--- a/k8s-operator/api.md
+++ b/k8s-operator/api.md
@@ -599,7 +599,7 @@ _Appears in:_
| Field | Description | Default | Validation |
| --- | --- | --- | --- |
-| `type` _[ProxyGroupType](#proxygrouptype)_ | Type of the ProxyGroup proxies. Supported types are egress and ingress.
Type is immutable once a ProxyGroup is created. | | Enum: [egress ingress]
Type: string
|
+| `type` _[ProxyGroupType](#proxygrouptype)_ | Type of the ProxyGroup proxies. Currently the only supported type is egress.
Type is immutable once a ProxyGroup is created. | | Enum: [egress ingress]
Type: string
|
| `tags` _[Tags](#tags)_ | Tags that the Tailscale devices will be tagged with. Defaults to [tag:k8s].
If you specify custom tags here, make sure you also make the operator
an owner of these tags.
See https://tailscale.com/kb/1236/kubernetes-operator/#setting-up-the-kubernetes-operator.
Tags cannot be changed once a ProxyGroup device has been created.
Tag values must be in form ^tag:[a-zA-Z][a-zA-Z0-9-]*$. | | Pattern: `^tag:[a-zA-Z][a-zA-Z0-9-]*$`
Type: string
|
| `replicas` _integer_ | Replicas specifies how many replicas to create the StatefulSet with.
Defaults to 2. | | Minimum: 0
|
| `hostnamePrefix` _[HostnamePrefix](#hostnameprefix)_ | HostnamePrefix is the hostname prefix to use for tailnet devices created
by the ProxyGroup. Each device will have the integer number from its
StatefulSet pod appended to this prefix to form the full hostname.
HostnamePrefix can contain lower case letters, numbers and dashes, it
must not start with a dash and must be between 1 and 62 characters long. | | Pattern: `^[a-z0-9][a-z0-9-]{0,61}$`
Type: string
|
diff --git a/k8s-operator/apis/v1alpha1/types_proxygroup.go b/k8s-operator/apis/v1alpha1/types_proxygroup.go
index f95fc58d0..cb9f678f8 100644
--- a/k8s-operator/apis/v1alpha1/types_proxygroup.go
+++ b/k8s-operator/apis/v1alpha1/types_proxygroup.go
@@ -48,7 +48,7 @@ type ProxyGroupList struct {
}
type ProxyGroupSpec struct {
- // Type of the ProxyGroup proxies. Supported types are egress and ingress.
+ // Type of the ProxyGroup proxies. Currently the only supported type is egress.
// Type is immutable once a ProxyGroup is created.
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ProxyGroup type is immutable"
Type ProxyGroupType `json:"type"`