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

Fix Dockerfile Packaging Issues Related to Go Version and Missing Utils #92

Merged
merged 1 commit into from
Aug 27, 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
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.21 AS builder
FROM golang:1.22 AS builder
ARG TARGETOS
ARG TARGETARCH

Expand All @@ -15,6 +15,7 @@ RUN go mod download
COPY cmd/main.go cmd/main.go
COPY api/ api/
COPY pkg/controller/ pkg/controller/
COPY pkg/utils/ pkg/utils/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. In future, we should copy all pkg/ folder into the container.


# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
Expand Down
17 changes: 16 additions & 1 deletion docs/tutorial/podautoscaler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ adjusts the number of replicas for an Nginx service based on CPU utilization.

## Start 1: Build and Run Local

First, build and install the Custom Resource Definitions (CRDs) for AIBrix:
Go into the root directory:

```shell
cd $AIBrix_HOME
```

First, build and install the Custom Resource Definitions (CRDs) for AIBrix:

```shell

make manifests && make build && make install
```
Expand Down Expand Up @@ -59,6 +64,13 @@ check the deployed manager logs:
kubectl get pods -n aibrix-system -o name | grep aibrix-controller-manager | head -n 1 | xargs -I {} kubectl logs {} -n aibrix-system
```


Or you can add `-f` to watch manager's logs continuously:

```shell
kubectl get pods -n aibrix-system -o name | grep aibrix-controller-manager | head -n 1 | xargs -I {} kubectl logs -f {} -n aibrix-system
```

Expected output (no warnings, no errors):

```log
Expand All @@ -85,6 +97,8 @@ The AIBrix-pa will automatically create a corresponding Horizontal Pod Autoscale
kubectl apply -f config/samples/autoscaling_v1alpha1_demo_nginx.yaml
# Create AIBrix-pa
kubectl apply -f config/samples/autoscaling_v1alpha1_podautoscaler.yaml

kubectl apply -f config/samples/autoscaling_v1alpha1_kpa.yaml
```

After applying the configurations, you should see:
Expand Down Expand Up @@ -154,6 +168,7 @@ To clean up the resources:
```shell
# Remove AIBrix resources
kubectl delete podautoscalers.autoscaling.aibrix.ai podautoscaler-example
kubectl delete podautoscalers.autoscaling.aibrix.ai podautoscaler-example-kpa

make uninstall && make undeploy

Expand Down
Loading