Skip to content

Commit

Permalink
bump golang and split off prom service (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverMKing authored Oct 24, 2024
1 parent 4036db8 commit 293ecbd
Show file tree
Hide file tree
Showing 14 changed files with 290 additions and 53 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.e2e
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.20 as builder
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 as builder

WORKDIR /go/src/e2e
ADD . .
WORKDIR ./testing/e2e
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -a -ldflags '-extldflags "-static"' -o e2e

FROM scratch
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /go/src/e2e/testing/e2e .
ENTRYPOINT ["/e2e"]
2 changes: 1 addition & 1 deletion devenv/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# convenience dockerfile for unit tests
# run make unit from root
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.20
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22
RUN mkdir -p /usr/local/kubebuilder/bin
RUN wget -q https://github.com/etcd-io/etcd/releases/download/v3.5.0/etcd-v3.5.0-linux-amd64.tar.gz &&\
tar xzf etcd-v3.5.0-linux-amd64.tar.gz &&\
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Azure/aks-app-routing-operator

go 1.20
go 1.22

require (
github.com/Azure/go-autorest/autorest v0.11.29
Expand Down
37 changes: 32 additions & 5 deletions pkg/manifests/fixtures/nginx/full-with-replicas.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,6 @@
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true",
"service.beta.kubernetes.io/azure-load-balancer-internal": "true"
}
},
Expand All @@ -406,7 +404,37 @@
"name": "https",
"port": 443,
"targetPort": "https"
},
}
],
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nginx-metrics",
"namespace": "test-namespace",
"creationTimestamp": null,
"labels": {
"app.kubernetes.io/component": "ingress-controller",
"app.kubernetes.io/managed-by": "aks-app-routing-operator",
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true"
}
},
"spec": {
"ports": [
{
"name": "prometheus",
"port": 10254,
Expand All @@ -416,8 +444,7 @@
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
"type": "ClusterIP"
},
"status": {
"loadBalancer": {}
Expand Down
37 changes: 32 additions & 5 deletions pkg/manifests/fixtures/nginx/full-with-target-cpu.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,6 @@
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true",
"service.beta.kubernetes.io/azure-load-balancer-internal": "true"
}
},
Expand All @@ -406,7 +404,37 @@
"name": "https",
"port": 443,
"targetPort": "https"
},
}
],
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nginx-metrics",
"namespace": "test-namespace",
"creationTimestamp": null,
"labels": {
"app.kubernetes.io/component": "ingress-controller",
"app.kubernetes.io/managed-by": "aks-app-routing-operator",
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true"
}
},
"spec": {
"ports": [
{
"name": "prometheus",
"port": 10254,
Expand All @@ -416,8 +444,7 @@
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
"type": "ClusterIP"
},
"status": {
"loadBalancer": {}
Expand Down
37 changes: 32 additions & 5 deletions pkg/manifests/fixtures/nginx/full.json
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,6 @@
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true",
"service.beta.kubernetes.io/azure-load-balancer-internal": "true"
}
},
Expand All @@ -406,7 +404,37 @@
"name": "https",
"port": 443,
"targetPort": "https"
},
}
],
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nginx-metrics",
"namespace": "test-namespace",
"creationTimestamp": null,
"labels": {
"app.kubernetes.io/component": "ingress-controller",
"app.kubernetes.io/managed-by": "aks-app-routing-operator",
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true"
}
},
"spec": {
"ports": [
{
"name": "prometheus",
"port": 10254,
Expand All @@ -416,8 +444,7 @@
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
"type": "ClusterIP"
},
"status": {
"loadBalancer": {}
Expand Down
39 changes: 32 additions & 7 deletions pkg/manifests/fixtures/nginx/internal-with-ssl-cert.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,6 @@
"app.kubernetes.io/component": "ingress-controller",
"app.kubernetes.io/managed-by": "aks-app-routing-operator",
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true"
}
},
"spec": {
Expand All @@ -405,7 +401,37 @@
"name": "https",
"port": 443,
"targetPort": "https"
},
}
],
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nginx-metrics",
"namespace": "test-namespace",
"creationTimestamp": null,
"labels": {
"app.kubernetes.io/component": "ingress-controller",
"app.kubernetes.io/managed-by": "aks-app-routing-operator",
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true"
}
},
"spec": {
"ports": [
{
"name": "prometheus",
"port": 10254,
Expand All @@ -415,8 +441,7 @@
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
"type": "ClusterIP"
},
"status": {
"loadBalancer": {}
Expand Down
39 changes: 32 additions & 7 deletions pkg/manifests/fixtures/nginx/internal.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,6 @@
"app.kubernetes.io/component": "ingress-controller",
"app.kubernetes.io/managed-by": "aks-app-routing-operator",
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true"
}
},
"spec": {
Expand All @@ -405,7 +401,37 @@
"name": "https",
"port": 443,
"targetPort": "https"
},
}
],
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nginx-metrics",
"namespace": "test-namespace",
"creationTimestamp": null,
"labels": {
"app.kubernetes.io/component": "ingress-controller",
"app.kubernetes.io/managed-by": "aks-app-routing-operator",
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true"
}
},
"spec": {
"ports": [
{
"name": "prometheus",
"port": 10254,
Expand All @@ -415,8 +441,7 @@
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
"type": "ClusterIP"
},
"status": {
"loadBalancer": {}
Expand Down
37 changes: 32 additions & 5 deletions pkg/manifests/fixtures/nginx/kube-system.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,6 @@
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true",
"service.beta.kubernetes.io/azure-load-balancer-internal": "true"
}
},
Expand All @@ -393,7 +391,37 @@
"name": "https",
"port": 443,
"targetPort": "https"
},
}
],
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nginx-metrics",
"namespace": "kube-system",
"creationTimestamp": null,
"labels": {
"app.kubernetes.io/component": "ingress-controller",
"app.kubernetes.io/managed-by": "aks-app-routing-operator",
"app.kubernetes.io/name": "nginx"
},
"annotations": {
"prometheus.io/port": "10254",
"prometheus.io/scrape": "true"
}
},
"spec": {
"ports": [
{
"name": "prometheus",
"port": 10254,
Expand All @@ -403,8 +431,7 @@
"selector": {
"app": "nginx"
},
"type": "LoadBalancer",
"externalTrafficPolicy": "Local"
"type": "ClusterIP"
},
"status": {
"loadBalancer": {}
Expand Down
Loading

0 comments on commit 293ecbd

Please sign in to comment.