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

[do not merge] modified apiversion capabilities check #2143

Closed
wants to merge 4 commits into from
Closed
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
8 changes: 0 additions & 8 deletions charts/vald/templates/agent/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@
#
{{- $agent := .Values.agent -}}
{{- if and $agent.enabled $agent.hpa.enabled }}
{{- if (.Capabilities.APIVersions.Has "autoscaling/v2") }}
apiVersion: autoscaling/v2
{{- else if (.Capabilities.APIVersions.Has "autoscaling/v2beta2") }}
apiVersion: autoscaling/v2beta2
{{- else if (.Capabilities.APIVersions.Has "autoscaling/v2beta1") }}
apiVersion: autoscaling/v2beta1
{{- else }}
apiVersion: autoscaling/v1
{{- end }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ $agent.name }}
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/agent/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@
{{- $lb := .Values.gateway.lb -}}
{{- $index := .Values.manager.index -}}
{{- if .Values.defaults.networkPolicy.enabled }}
{{- if (.Capabilities.APIVersions.Has "networking.k8s.io/v1alpha1") }}
apiVersion: networking.k8s.io/v1alpha1
{{- else }}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: NetworkPolicy
metadata:
name: agent-allow
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/agent/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
#
{{- $agent := .Values.agent -}}
{{- if $agent.enabled }}
{{- if (.Capabilities.APIVersions.Has "policy/v1beta1") }}
apiVersion: policy/v1beta1
{{- else }}
apiVersion: policy/v1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ $agent.name }}
Expand Down
8 changes: 0 additions & 8 deletions charts/vald/templates/discoverer/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@
#
{{- $discoverer := .Values.discoverer -}}
{{- if $discoverer.hpa.enabled }}
{{- if (.Capabilities.APIVersions.Has "autoscaling/v2") }}
apiVersion: autoscaling/v2
{{- else if (.Capabilities.APIVersions.Has "autoscaling/v2beta2") }}
apiVersion: autoscaling/v2beta2
{{- else if (.Capabilities.APIVersions.Has "autoscaling/v2beta1") }}
apiVersion: autoscaling/v2beta1
{{- else }}
apiVersion: autoscaling/v1
{{- end }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ $discoverer.name }}
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/discoverer/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@
{{- $lb := .Values.gateway.lb -}}
{{- $index := .Values.manager.index -}}
{{- if .Values.defaults.networkPolicy.enabled }}
{{- if (.Capabilities.APIVersions.Has "networking.k8s.io/v1alpha1") }}
apiVersion: networking.k8s.io/v1alpha1
{{- else }}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: NetworkPolicy
metadata:
name: discoverer-allow
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/discoverer/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
#
{{- $discoverer := .Values.discoverer -}}
{{- if $discoverer.enabled }}
{{- if (.Capabilities.APIVersions.Has "policy/v1beta1") }}
apiVersion: policy/v1beta1
{{- else }}
apiVersion: policy/v1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ $discoverer.name }}
Expand Down
8 changes: 0 additions & 8 deletions charts/vald/templates/gateway/filter/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@
#
{{- $gateway := .Values.gateway.filter -}}
{{- if and $gateway.enabled $gateway.hpa.enabled }}
{{- if (.Capabilities.APIVersions.Has "autoscaling/v2") }}
apiVersion: autoscaling/v2
{{- else if (.Capabilities.APIVersions.Has "autoscaling/v2beta2") }}
apiVersion: autoscaling/v2beta2
{{- else if (.Capabilities.APIVersions.Has "autoscaling/v2beta1") }}
apiVersion: autoscaling/v2beta1
{{- else }}
apiVersion: autoscaling/v1
{{- end }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ $gateway.name }}
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/gateway/filter/ing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
#
{{- $gateway := .Values.gateway.filter -}}
{{- if and $gateway.enabled $gateway.ingress.enabled }}
{{- if (.Capabilities.APIVersions.Has "networking.k8s.io/v1alpha1") }}
apiVersion: networking.k8s.io/v1alpha1
{{- else }}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: Ingress
metadata:
annotations:
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/gateway/filter/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
{{- $lb := .Values.gateway.lb -}}
{{- $filter := .Values.gateway.filter -}}
{{- if .Values.defaults.networkPolicy.enabled }}
{{- if (.Capabilities.APIVersions.Has "networking.k8s.io/v1alpha1") }}
apiVersion: networking.k8s.io/v1alpha1
{{- else }}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: NetworkPolicy
metadata:
name: filter-allow
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/gateway/filter/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
#
{{- $gateway := .Values.gateway.filter -}}
{{- if $gateway.enabled }}
{{- if (.Capabilities.APIVersions.Has "policy/v1beta1") }}
apiVersion: policy/v1beta1
{{- else }}
apiVersion: policy/v1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ $gateway.name }}
Expand Down
8 changes: 0 additions & 8 deletions charts/vald/templates/gateway/lb/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@
#
{{- $gateway := .Values.gateway.lb -}}
{{- if and $gateway.enabled $gateway.hpa.enabled }}
{{- if (.Capabilities.APIVersions.Has "autoscaling/v2") }}
apiVersion: autoscaling/v2
{{- else if (.Capabilities.APIVersions.Has "autoscaling/v2beta2") }}
apiVersion: autoscaling/v2beta2
{{- else if (.Capabilities.APIVersions.Has "autoscaling/v2beta1") }}
apiVersion: autoscaling/v2beta1
{{- else }}
apiVersion: autoscaling/v1
{{- end }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ $gateway.name }}
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/gateway/lb/ing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
#
{{- $gateway := .Values.gateway.lb -}}
{{- if and $gateway.enabled $gateway.ingress.enabled }}
{{- if (.Capabilities.APIVersions.Has "networking.k8s.io/v1alpha1") }}
apiVersion: networking.k8s.io/v1alpha1
{{- else }}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: Ingress
metadata:
annotations:
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/gateway/lb/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
{{- $filter := .Values.gateway.filter -}}
{{- $discoverer := .Values.discoverer -}}
{{- if .Values.defaults.networkPolicy.enabled }}
{{- if (.Capabilities.APIVersions.Has "networking.k8s.io/v1alpha1") }}
apiVersion: networking.k8s.io/v1alpha1
{{- else }}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: NetworkPolicy
metadata:
name: lb-allow
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/gateway/lb/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
#
{{- $gateway := .Values.gateway.lb -}}
{{- if $gateway.enabled }}
{{- if (.Capabilities.APIVersions.Has "policy/v1beta1") }}
apiVersion: policy/v1beta1
{{- else }}
apiVersion: policy/v1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ $gateway.name }}
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/manager/index/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@
{{- $discoverer := .Values.discoverer -}}
{{- $index := .Values.manager.index -}}
{{- if .Values.defaults.networkPolicy.enabled }}
{{- if (.Capabilities.APIVersions.Has "networking.k8s.io/v1alpha1") }}
apiVersion: networking.k8s.io/v1alpha1
{{- else }}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: NetworkPolicy
metadata:
name: index-allow
Expand Down
4 changes: 0 additions & 4 deletions charts/vald/templates/manager/index/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
#
{{- $index := .Values.manager.index -}}
{{- if $index.enabled }}
{{- if (.Capabilities.APIVersions.Has "policy/v1beta1") }}
apiVersion: policy/v1beta1
{{- else }}
apiVersion: policy/v1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ $index.name }}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/operation/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ func (c *client) GetObject(
}

if ts := resp.GetTimestamp(); ts <= 0 {
t.Error("timestamp is not set properly")
t.Error("timestamp is not set properly, ts: %s", ts)
}
}
}()
Expand Down
Loading