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

General updates to restart the project #4

Merged
merged 4 commits into from
Oct 15, 2023
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ dist/*
go.work

# Real endpoints configurations
*-endpoints.yaml
**/endpoints.yaml

# End of https://www.toptal.com/developers/gitignore/api/go
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -v -ldflags="-X 'github.com/j

FROM alpine:3.18.4 AS runtime

WORKDIR /app
RUN mkdir -p config
USER 1001
COPY --from=builder --chown=1001:1001 /build/dist/simple-prober ./simple-prober
VOLUME /app/config
ENTRYPOINT [ "/app/simple-prober" ]
CMD [ "check", "--config", "/app/config/endpoints.yaml", "--timeout", "5", "--loglevel", "debug" ]
ARG UID=1001

COPY --from=builder --chown=1001:1001 /build/dist/simple-prober /usr/local/bin/simple-prober
USER ${UID}
VOLUME /endpoints.yaml
CMD [ "simple-prober", "check", "--config", "/endpoints.yaml", "--timeout", "5", "--loglevel", "debug" ]
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
volumes:
- name: config-volume
configMap:
name: simple-prober-icd-endpoints
name: {{ .Values.config.configMapName | default "simple-prober-endpoints" }}
optional: true
items:
- key: endpoints
Expand Down
7 changes: 0 additions & 7 deletions ci/deployment/k8s/chart/simple-prober/values-production.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions ci/deployment/k8s/chart/simple-prober/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
name: simple-prober
istio: false
config:
configMapName: simple-prober-endpoints

cron:
scheduledExpression: "* * * * *"
failedJobsHistoryLimit: 3
Expand Down
14 changes: 14 additions & 0 deletions ci/deployment/k8s/chart/values-production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: simple-prober
cron:
scheduledExpression: "0 * * * *"

image:
repository: us.icr.io
namespace: qc-production-ext-images
name: simple-prober
pullPolicy: Always
tag: 0.3.0

imagePullSecrets:
- name: all-icr-io
6 changes: 3 additions & 3 deletions cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
)

const (
defaultConfigFileName string = "./config/endpoints.yaml"
defaultConfigFileName string = "endpoints.yaml"
defaultTimeout int = 5
defaultLogLevel string = "info"
defaultLogLevel string = "debug"
)

var (
Expand Down Expand Up @@ -83,7 +83,7 @@ func init() {
// The log level
rootCmd.PersistentFlags().StringVar(&logLevel, "loglevel", defaultLogLevel, "The log level")
// The confiuration file name
rootCmd.PersistentFlags().StringVar(&configFileName, "config", defaultConfigFileName, "Config file (default is: config/endpoints.yaml)")
rootCmd.PersistentFlags().StringVar(&configFileName, "config", defaultConfigFileName, "Config file (default is: endpoints.yaml)")
// The connection timeout
rootCmd.PersistentFlags().IntVar(&parameterTimeout, "timeout", defaultTimeout, "Connection timeout")
timeout = time.Duration(parameterTimeout) * time.Second
Expand Down