Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into latest_merge
Browse files Browse the repository at this point in the history
  • Loading branch information
anandswaminathan committed Mar 3, 2021
2 parents 068b0ab + 0b778a9 commit d65105c
Show file tree
Hide file tree
Showing 56 changed files with 1,089 additions and 607 deletions.
30 changes: 6 additions & 24 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
key: /tmp/docker-images-${{ github.event.after }}
- name: Prime docker cache
run: docker load -i /tmp/tmp/docker-images/snapshot.tar || true
- uses: engineerd/setup-kind@v0.4.0
- uses: engineerd/setup-kind@v0.5.0
- name: End2End
run: |
kubectl cluster-info
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }}

push-github:
name: Push to Github Registry
Expand All @@ -107,30 +107,12 @@ jobs:
- name: Push Docker Image to Github Registry
uses: whoan/docker-build-with-cache-action@v5
with:
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
image_name: ${{ github.repository }}/${{ github.event.repository.name }}
image_tag: latest,${{ github.sha }},${{ needs.bump-version.outputs.version }}
push_git_tag: true
registry: docker.pkg.github.com
build_extra_args: "--compress=true"

push-dockerhub:
name: Push to Dockerhub
runs-on: ubuntu-latest
needs: bump-version
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Push Docker Image to Dockerhub
uses: whoan/docker-build-with-cache-action@v5
with:
username: "${{ secrets.DOCKERHUB_USERNAME }}"
password: "${{ secrets.DOCKERHUB_PASSWORD }}"
image_name: ${{ secrets.DOCKERHUB_IMAGE_NAME }}
username: "${{ secrets.FLYTE_BOT_USERNAME }}"
password: "${{ secrets.FLYTE_BOT_PAT }}"
image_name: ${{ github.repository }}
image_tag: latest,${{ github.sha }},${{ needs.bump-version.outputs.version }}
push_git_tag: true
registry: ghcr.io
build_extra_args: "--compress=true"

tests-lint:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
key: /tmp/docker-images-${{ github.event.after }}
- name: Prime docker cache
run: docker load -i /tmp/tmp/docker-images/snapshot.tar || true
- uses: engineerd/setup-kind@v0.4.0
- uses: engineerd/setup-kind@v0.5.0
- name: End2End
run: |
kubectl cluster-info
Expand All @@ -68,7 +68,7 @@ jobs:
key: /tmp/docker-images-${{ github.event.after }}
- name: Prime docker cache
run: docker load -i /tmp/tmp/docker-images/snapshot-builder.tar || true
- uses: engineerd/setup-kind@v0.4.0
- uses: engineerd/setup-kind@v0.5.0
- name: Integration
run: |
kubectl cluster-info
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ ENV PATH="/artifacts:${PATH}"

# This will eventually move to centurylink/ca-certs:latest for minimum possible image size
FROM alpine:3.10
LABEL org.opencontainers.image.source https://github.com/lyft/flyteadmin

COPY --from=builder /artifacts /bin

# Ensure the latest CA certs are present to authenticate SSL connections.
Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Flyteadmin
=============
[![Current Release](https://img.shields.io/github/release/flyteorg/flyteadmin.svg)](https://github.com/flyteorg/flyteadmin/releases/latest)
![Master](https://github.com/flyteorg/flyteadmin/workflows/Master/badge.svg)
[![GoDoc](https://godoc.org/github.com/lyft/flyteadmin?status.svg)](https://pkg.go.dev/mod/github.com/lyft/flyteadmin)
[![License](https://img.shields.io/badge/LICENSE-Apache2.0-ff69b4.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
[![CodeCoverage](https://img.shields.io/codecov/c/github/flyteorg/flyteadmin.svg)](https://codecov.io/gh/flyteorg/flyteadmin)
[![Go Report Card](https://goreportcard.com/badge/github.com/lyft/flyteadmin)](https://goreportcard.com/report/github.com/lyft/flyteadmin)
![Commit activity](https://img.shields.io/github/commit-activity/w/flyteorg/flyteadmin.svg?style=plastic)
![Commit since last release](https://img.shields.io/github/commits-since/flyteorg/flyteadmin/latest.svg?style=plastic)

Flyteadmin is the control plane for Flyte responsible for managing entities (task, workflows, launch plans) and
administering workflow executions. Flyteadmin implements the
[AdminService](https://github.com/flyteorg/flyteidl/blob/master/protos/flyteidl/service/admin.proto) which
defines a stateless REST/gRPC service for interacting with registered Flyte entities and executions.
Flyteadmin uses a relational style Metadata Store abstracted by [GORM](http://gorm.io/) ORM library.

Before Check-In
---------------

Flyte Admin has a few useful make targets for linting and testing. Please use these before checking in to help suss out
minor bugs and linting errors.

```
$ make goimports
```

```
$ make test_unit
```

```
$ make lint
```
26 changes: 0 additions & 26 deletions README.rst

This file was deleted.

8 changes: 4 additions & 4 deletions boilerplate/lyft/github_workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
key: /tmp/docker-images-${{ github.event.after }}
- name: Prime docker cache
run: docker load -i /tmp/tmp/docker-images/snapshot.tar || true
- uses: engineerd/setup-kind@v0.4.0
- uses: engineerd/setup-kind@v0.5.0
- name: End2End
run: |
kubectl cluster-info
Expand Down Expand Up @@ -107,12 +107,12 @@ jobs:
- name: Push Docker Image to Github Registry
uses: whoan/docker-build-with-cache-action@v5
with:
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
username: "${{ secrets.PUBLISH_CONTAINER_ACTOR }}"
password: "${{ secrets.PUBLIC_CONTAINER }}"
image_name: ${{ github.repository }}/${{ github.event.repository.name }}
image_tag: latest,${{ github.sha }},${{ needs.bump-version.outputs.version }}
push_git_tag: true
registry: docker.pkg.github.com
registry: ghcr.io
build_extra_args: "--compress=true"

push-dockerhub:
Expand Down
4 changes: 2 additions & 2 deletions boilerplate/lyft/github_workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
key: /tmp/docker-images-${{ github.event.after }}
- name: Prime docker cache
run: docker load -i /tmp/tmp/docker-images/snapshot.tar || true
- uses: engineerd/setup-kind@v0.4.0
- uses: engineerd/setup-kind@v0.5.0
- name: End2End
run: |
kubectl cluster-info
Expand All @@ -68,7 +68,7 @@ jobs:
key: /tmp/docker-images-${{ github.event.after }}
- name: Prime docker cache
run: docker load -i /tmp/tmp/docker-images/snapshot-builder.tar || true
- uses: engineerd/setup-kind@v0.4.0
- uses: engineerd/setup-kind@v0.5.0
- name: Integration
run: |
kubectl cluster-info
Expand Down
6 changes: 5 additions & 1 deletion cmd/entrypoints/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,12 @@ func newHTTPServer(ctx context.Context, cfg *config.ServerConfig, authContext in
if authContext.GetUserInfoURL() != nil && authContext.GetUserInfoURL().String() != "" {
mux.HandleFunc("/me", auth.GetMeEndpointHandler(ctx, authContext))
}

// The metadata endpoint is an RFC-defined constant, but we need a leading / for the handler to pattern match correctly.
mux.HandleFunc(fmt.Sprintf("/%s", auth.OIdCMetadataEndpoint), auth.GetOIdCMetadataEndpointRedirectHandler(ctx, authContext))

// The metadata endpoint is an RFC-defined constant, but we need a leading / for the handler to pattern match correctly.
mux.HandleFunc(fmt.Sprintf("/%s", auth.MetadataEndpoint), auth.GetMetadataEndpointRedirectHandler(ctx, authContext))
mux.HandleFunc(fmt.Sprintf("/%s", auth.OAuth2MetadataEndpoint), auth.GetOAuth2MetadataEndpointRedirectHandler(ctx, authContext))

// This option translates HTTP authorization data (cookies) into a gRPC metadata field
gwmuxOptions = append(gwmuxOptions, runtime.WithMetadata(auth.GetHTTPRequestCookieToMetadataHandler(authContext)))
Expand Down
19 changes: 15 additions & 4 deletions flyteadmin_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ server:
grpcServerReflection: true
security:
secure: false
ssl:
certificateFile: "/path/to/server.pem"
keyFile: "/path/to/server.key"
useAuth: false
allowCors: true
allowedOrigins:
# Accepting all domains for Sandbox installation
- "*"
allowedHeaders:
- "Content-Type"
oauth:
clientId: yourclientid
clientSecretFile: "/path/to/oauth/secret"
Expand Down Expand Up @@ -73,11 +76,19 @@ notifications:
accountId: "bar"
emailer:
subject: "Notice: Execution \"{{ name }}\" has {{ phase }} in \"{{ domain }}\"."
sender: "[email protected]"
sender: "[email protected]"
body: >
Execution \"{{ name }}\" has {{ phase }} in \"{{ domain }}\". View details at
<a href=\http://example.com/projects/{{ project }}/domains/{{ domain }}/executions/{{ name }}>
http://example.com/projects/{{ project }}/domains/{{ domain }}/executions/{{ name }}</a>. {{ error }}
externalEvents:
Enable: false
type: gcp
gcp:
projectId: "foo"
eventsPublisher:
topicName: "bar"
eventTypes: all
Logger:
show-source: true
level: 6
Expand Down
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ require (
github.com/jinzhu/gorm v1.9.12
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/lib/pq v1.3.0
github.com/lyft/flyteidl v0.18.10
github.com/lyft/flytepropeller v0.3.17
github.com/lyft/flyteidl v0.18.14
github.com/lyft/flytepropeller v0.5.14
github.com/lyft/flytestdlib v0.3.9
github.com/magiconair/properties v1.8.1
github.com/mitchellh/mapstructure v1.1.2
Expand All @@ -36,7 +36,7 @@ require (
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.6.1
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/tools v0.0.0-20200818005847-188abfa75333 // indirect
golang.org/x/tools v0.1.0 // indirect
google.golang.org/api v0.20.0
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940
google.golang.org/grpc v1.28.0
Expand All @@ -58,5 +58,4 @@ replace (
k8s.io/api => github.com/lyft/api v0.0.0-20191031200350-b49a72c274e0
k8s.io/apimachinery => github.com/lyft/apimachinery v0.0.0-20191031200210-047e3ea32d7f
k8s.io/client-go => k8s.io/client-go v0.0.0-20191016111102-bec269661e48

)
Loading

0 comments on commit d65105c

Please sign in to comment.