-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: http server & telemetry support
- Loading branch information
Showing
28 changed files
with
3,569 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Lint | ||
on: [ push, pull_request, workflow_dispatch ] | ||
|
||
jobs: | ||
golangci-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.18" | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
skip-go-installation: true | ||
version: v1.46.2 | ||
args: --timeout=10m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.18" | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Run GoReleaser | ||
uses: goreleaser/[email protected] | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Test | ||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.18" | ||
- name: run tests | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
run: | ||
go: '1.17' | ||
timeout: 10m | ||
skip-files: | ||
- expt/main.go | ||
|
||
output: | ||
format: colored-line-number | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
- exhaustruct | ||
- cyclop | ||
- exhaustive | ||
- exhaustivestruct | ||
- exhaustruct | ||
- funlen | ||
- gochecknoglobals | ||
- gocyclo | ||
- godox | ||
- gofumpt | ||
- golint | ||
- interfacer | ||
- lll | ||
- maintidx | ||
- ireturn | ||
- maligned | ||
- nlreturn | ||
- nolintlint | ||
- prealloc | ||
- promlinter | ||
- scopelint | ||
- tagliatelle | ||
- testpackage | ||
- paralleltest | ||
- tparallel | ||
- containedctx | ||
- varnamelen | ||
- wrapcheck | ||
- wsl | ||
|
||
linters-settings: | ||
decorder: | ||
dec-order: | ||
- type | ||
- const | ||
- var | ||
- func | ||
disable-dec-order-check: false | ||
disable-init-func-first-check: false | ||
dupl: | ||
threshold: 100 | ||
errcheck: # Report about not checking of errors in type assertions: `a := b.(MyStruct)`. | ||
check-type-assertions: true | ||
goconst: | ||
min-len: 2 # Minimal length of string constant. | ||
min-occurrences: 2 # Minimum occurrences of constant string count to trigger issue. | ||
ignore-tests: true | ||
match-constant: false # Look for existing constants matching the values. | ||
numbers: true # Search also for duplicated numbers. | ||
min: 2 # Minimum value, only works with goconst.numbers | ||
max: 2 # Maximum value, only works with goconst.numbers | ||
revive: | ||
ignore-generated-header: true | ||
severity: warning | ||
confidence: 0.8 | ||
rules: | ||
- name: atomic | ||
- name: context-as-argument | ||
- name: context-keys-type | ||
- name: defer | ||
- name: dot-imports | ||
- name: empty-block | ||
- name: error-naming | ||
- name: error-return | ||
- name: error-strings | ||
- name: errorf | ||
- name: increment-decrement | ||
- name: modifies-parameter | ||
- name: modifies-value-receiver | ||
- name: package-comments | ||
- name: range | ||
- name: receiver-naming | ||
- name: redefines-builtin-id | ||
- name: superfluous-else | ||
- name: time-naming | ||
- name: unreachable-code | ||
- name: unused-parameter | ||
- name: unused-receiver | ||
- name: var-declaration | ||
- name: var-naming | ||
gomnd: | ||
ignored-numbers: | ||
- '0o600' | ||
- '0o644' | ||
- '0o655' | ||
- '0o666' | ||
- '0o770' | ||
- '0o755' | ||
- '0o765' | ||
- '0o777' | ||
ignored-functions: | ||
- 'args.Error' | ||
- 'strconv.ParseInt' | ||
gosimple: | ||
go: "1.17" | ||
checks: | ||
- "all" | ||
staticcheck: | ||
go: "1.17" | ||
checks: | ||
- "all" | ||
goimports: | ||
local-prefixes: github.com/odpf/dex | ||
gci: | ||
sections: | ||
- standard # Captures all standard packages if they do not match another section. | ||
- default # Contains all imports that could not be matched to another section type. | ||
- prefix(github.com/odpf/dex) # Groups all imports with the specified Prefix. | ||
gocritic: | ||
disabled-checks: | ||
- ifElseChain | ||
- singleCaseSwitch | ||
enabled-tags: | ||
- diagnostic | ||
# - style | ||
# - opinionated | ||
# - performance | ||
unparam: | ||
# Inspect exported functions. | ||
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: | ||
check-exported: true | ||
|
||
issues: | ||
exclude-rules: | ||
# Exclude some linters from running on tests files. | ||
- path: _test\.go | ||
linters: | ||
- gocritic | ||
- dupl | ||
- path: cli | ||
linters: | ||
- forbidigo | ||
- contextcheck | ||
severity: | ||
default-severity: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
project_name: dex | ||
|
||
release: | ||
prerelease: auto | ||
draft: true | ||
|
||
builds: | ||
- main: ./main.go | ||
id: "dex" | ||
binary: dex | ||
flags: [ -a ] | ||
ldflags: | ||
- -X github.com/odpf/dex/pkg/version.Version={{.Tag}} | ||
- -X github.com/odpf/dex/pkg/version.Commit={{.FullCommit}} | ||
- -X github.com/odpf/dex/pkg/version.BuildTime={{.Date}} | ||
goos: | ||
- darwin | ||
- linux | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
env: | ||
- CGO_ENABLED=0 | ||
|
||
archives: | ||
- replacements: | ||
darwin: macos | ||
linux: linux | ||
windows: windows | ||
386: i386 | ||
amd64: x86_64 | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
name_template: "{{ .Version }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs' | ||
- '^test' | ||
- '^build' | ||
- '^ci' | ||
- '^chore' | ||
- '^refactor' | ||
|
||
dockers: | ||
- goos: linux | ||
goarch: amd64 | ||
ids: | ||
- dex | ||
dockerfile: Dockerfile | ||
image_templates: | ||
- 'docker.io/odpf/{{.ProjectName}}:latest' | ||
- 'docker.io/odpf/{{.ProjectName}}:{{ .Version }}' | ||
- 'docker.io/odpf/{{.ProjectName}}:{{ .Version }}-amd64' | ||
|
||
brews: | ||
- name: dex | ||
homepage: "https://github.com/odpf/dex" | ||
description: "Infrastructure orchestration tool." | ||
tap: | ||
owner: odpf | ||
name: homebrew-tap | ||
license: "Apache 2.0" | ||
folder: Formula | ||
dependencies: | ||
- name: git | ||
install: |- | ||
bin.install "dex" | ||
commit_author: | ||
name: Shivaprasad Bhat | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM alpine:3.13 | ||
|
||
COPY dex /usr/bin/dex | ||
|
||
RUN apk --no-cache add ca-certificates bash | ||
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.5 && \ | ||
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ | ||
chmod +x /bin/grpc_health_probe | ||
|
||
CMD ["dex"] |
Oops, something went wrong.