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: bump to GatewayAPI 1.1.0 #245

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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Next Next commit
feat: bump to GatewayAPI 1.1.0
Signed-off-by: Lin Yang <reaver@flomesh.io>
  • Loading branch information
reaver-flomesh committed May 10, 2024
commit 35c995dac9b8afc0c52a31c82a68ee29ecd63077
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
## Tool Versions
KUSTOMIZE_VERSION ?= v4.5.6
HELM_VERSION ?= v3.14.3
CONTROLLER_TOOLS_VERSION ?= v0.14.0
CONTROLLER_TOOLS_VERSION ?= v0.15.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand Down
2 changes: 1 addition & 1 deletion charts/fsm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ The following table lists the configurable parameters of the fsm chart and their
| fsm.fsmIngress.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].key | string | `"app"` | |
| fsm.fsmIngress.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].operator | string | `"In"` | |
| fsm.fsmIngress.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[0].values[0] | string | `"fsm-ingress"` | |
| fsm.fsmIngress.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[1].key | string | `"ingress.flomesh.io/namespaced"` | |
| fsm.fsmIngress.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[1].key | string | `"networking.flomesh.io/namespaced"` | |
| fsm.fsmIngress.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[1].operator | string | `"In"` | |
| fsm.fsmIngress.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.labelSelector.matchExpressions[1].values[0] | string | `"false"` | |
| fsm.fsmIngress.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[0].podAffinityTerm.topologyKey | string | `"kubernetes.io/hostname"` | |
Expand Down
6 changes: 3 additions & 3 deletions charts/fsm/templates/fsm-ingress-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ metadata:
{{- include "fsm.labels" . | nindent 4 }}
app: fsm-ingress
meshName: {{ .Values.fsm.meshName }}
ingress.flomesh.io/namespaced: "false"
networking.flomesh.io/namespaced: "false"
spec:
replicas: {{ .Values.fsm.fsmIngress.replicaCount }}
selector:
matchLabels:
app: fsm-ingress
ingress.flomesh.io/namespaced: "false"
networking.flomesh.io/namespaced: "false"
strategy:
rollingUpdate:
maxSurge: 1
Expand All @@ -29,7 +29,7 @@ spec:
{{- end }}
labels:
app: fsm-ingress
ingress.flomesh.io/namespaced: "false"
networking.flomesh.io/namespaced: "false"
{{- with .Values.fsm.fsmIngress.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/fsm/templates/fsm-ingress-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
{{- include "fsm.labels" . | nindent 4 }}
app: fsm-ingress
meshName: {{ .Values.fsm.meshName }}
ingress.flomesh.io/namespaced: "false"
networking.flomesh.io/namespaced: "false"
{{- with .Values.fsm.fsmIngress.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down Expand Up @@ -38,6 +38,6 @@ spec:
{{- end }}
selector:
app: fsm-ingress
ingress.flomesh.io/namespaced: "false"
networking.flomesh.io/namespaced: "false"
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/fsm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ fsm:
operator: In
values:
- fsm-ingress
- key: ingress.flomesh.io/namespaced
- key: networking.flomesh.io/namespaced
operator: In
values:
- "false"
Expand Down
12 changes: 6 additions & 6 deletions charts/namespaced-ingress/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ spec:
selector:
matchLabels:
app: fsm-ingress
ingress.flomesh.io/namespaced: "true"
ingress.flomesh.io/ns: {{ .Values.nsig.metadata.namespace }}
networking.flomesh.io/namespaced: "true"
networking.flomesh.io/ns: {{ .Values.nsig.metadata.namespace }}
strategy:
rollingUpdate:
maxSurge: 1
Expand All @@ -25,8 +25,8 @@ spec:
metadata:
labels:
app: fsm-ingress
ingress.flomesh.io/namespaced: "true"
ingress.flomesh.io/ns: {{ .Values.nsig.metadata.namespace }}
networking.flomesh.io/namespaced: "true"
networking.flomesh.io/ns: {{ .Values.nsig.metadata.namespace }}
{{- with .Values.nsig.spec.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -154,11 +154,11 @@ spec:
operator: In
values:
- fsm-ingress
- key: ingress.flomesh.io/namespaced
- key: networking.flomesh.io/namespaced
operator: In
values:
- "true"
- key: ingress.flomesh.io/ns
- key: networking.flomesh.io/ns
operator: In
values:
- {{ .Values.nsig.metadata.namespace }}
Expand Down
6 changes: 3 additions & 3 deletions charts/namespaced-ingress/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
labels:
{{- include "fsm.labels" . | nindent 4 }}
app: fsm-ingress
ingress.flomesh.io/namespaced: "true"
networking.flomesh.io/namespaced: "true"
{{- with .Values.nsig.spec.serviceLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -40,7 +40,7 @@ spec:
{{- end }}
selector:
app: fsm-ingress
ingress.flomesh.io/namespaced: "true"
ingress.flomesh.io/ns: {{ .Values.nsig.metadata.namespace }}
networking.flomesh.io/namespaced: "true"
networking.flomesh.io/ns: {{ .Values.nsig.metadata.namespace }}
{{- end }}
{{- end }}
10 changes: 5 additions & 5 deletions cmd/cli/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,9 @@ func updatePresetMeshConfigMap(ctx context.Context, kubeClient kubernetes.Interf
func deleteIngressResources(ctx context.Context, kubeClient kubernetes.Interface, fsmNamespace, meshName string) error {
labelSelector := metav1.LabelSelector{
MatchLabels: map[string]string{
constants.AppLabel: constants.FSMIngressName,
"meshName": meshName,
"ingress.flomesh.io/namespaced": "false",
constants.AppLabel: constants.FSMIngressName,
"meshName": meshName,
"networking.flomesh.io/namespaced": "false",
},
}
listOptions := metav1.ListOptions{
Expand Down Expand Up @@ -527,13 +527,13 @@ func deleteIngressResources(ctx context.Context, kubeClient kubernetes.Interface
}

func deleteNamespacedIngressResources(ctx context.Context, nsigClient nsigClientset.Interface) error {
nsigList, err := nsigClient.FlomeshV1alpha1().NamespacedIngresses(corev1.NamespaceAll).List(ctx, metav1.ListOptions{})
nsigList, err := nsigClient.NetworkingV1alpha1().NamespacedIngresses(corev1.NamespaceAll).List(ctx, metav1.ListOptions{})
if err != nil {
return err
}

for _, nsig := range nsigList.Items {
if err := nsigClient.FlomeshV1alpha1().NamespacedIngresses(nsig.GetNamespace()).Delete(ctx, nsig.GetName(), metav1.DeleteOptions{}); err != nil {
if err := nsigClient.NetworkingV1alpha1().NamespacedIngresses(nsig.GetNamespace()).Delete(ctx, nsig.GetName(), metav1.DeleteOptions{}); err != nil {
if !errors.IsNotFound(err) {
return err
}
Expand Down
Loading
Loading