File tree Expand file tree Collapse file tree 2 files changed +50
-1
lines changed
cmd/aws-application-networking-k8s Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy Apps
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - dev
8+ jobs :
9+ build :
10+ name : Build and Push to ECR with Docker Buildx Cache
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ id-token : write
15+
16+ strategy :
17+ matrix :
18+ service : [aws-gateway-controller]
19+
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+
24+ - name : Set up Docker Buildx
25+ uses : docker/setup-buildx-action@v3
26+
27+ - name : Configure AWS credentials from OIDC
28+ uses : aws-actions/configure-aws-credentials@v4
29+ with :
30+ aws-region : ap-northeast-1
31+ role-to-assume : ${{ vars.AWS_ROLE_ARN }}
32+ role-session-name : GitHubActions
33+
34+ - name : Login to Amazon ECR
35+ uses : aws-actions/amazon-ecr-login@v2
36+
37+ - name : Build and push Docker image with Buildx
38+ run : |
39+ docker buildx build \
40+ -t "${{ vars.AWS_ACCOUNT_ID }}.dkr.ecr.ap-northeast-1.amazonaws.com/${{ matrix.service }}:${{github.sha}}" \
41+ -t "${{ vars.AWS_ACCOUNT_ID }}.dkr.ecr.ap-northeast-1.amazonaws.com/${{ matrix.service }}:latest" \
42+ --push \
43+ .
Original file line number Diff line number Diff line change @@ -17,11 +17,13 @@ limitations under the License.
1717package main
1818
1919import (
20+ "context"
2021 "flag"
2122 "os"
22- gwv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
2323 "strings"
2424
25+ gwv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
26+
2527 "github.com/aws/aws-application-networking-k8s/pkg/webhook"
2628 "github.com/go-logr/zapr"
2729 "go.uber.org/zap/zapcore"
@@ -45,6 +47,7 @@ import (
4547 "k8s.io/apimachinery/pkg/runtime/schema"
4648 "sigs.k8s.io/external-dns/endpoint"
4749 gwv1 "sigs.k8s.io/gateway-api/apis/v1"
50+
4851 //+kubebuilder:scaffold:imports
4952 anv1alpha1 "github.com/aws/aws-application-networking-k8s/pkg/apis/applicationnetworking/v1alpha1"
5053 "github.com/aws/aws-application-networking-k8s/pkg/config"
@@ -108,6 +111,9 @@ func main() {
108111 log := gwlog .NewLogger (logLevel )
109112 ctrl .SetLogger (zapr .NewLogger (log .InnerLogger .Desugar ()).WithName ("runtime" ))
110113
114+ ctx := context .Background ()
115+ log .Infof (ctx , "log level set to %s" , logLevel )
116+
111117 setupLog := log .InnerLogger .Named ("setup" )
112118
113119 err := config .ConfigInit ()
You can’t perform that action at this time.
0 commit comments