-
Notifications
You must be signed in to change notification settings - Fork 0
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
Get BiosCfg ready for prod #6
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e137d72
More updates to get bioscfg ready
jakeschuurmans c96a179
clean up helm chart
jakeschuurmans 9804830
update docker
jakeschuurmans 4ecb8a0
clean up makefile
jakeschuurmans 324f17a
Huge Refactor
jakeschuurmans 3c72ce8
PR fixes
jakeschuurmans File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM alpine:3.8 as runner | ||
FROM alpine:latest | ||
|
||
ENTRYPOINT ["/usr/sbin/bioscfg"] | ||
|
||
COPY bioscfg /usr/sbin/bioscfg | ||
RUN chmod +x /usr/sbin/bioscfg | ||
|
||
ENTRYPOINT bioscfg |
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 |
---|---|---|
@@ -1,6 +1,10 @@ | ||
apiVersion: v2 | ||
name: bioscfg | ||
description: A helm chart for deploying the bioscfg controller. | ||
type: application | ||
version: 0.0.1 | ||
appVersion: "0.0.1" | ||
description: A chart to control BMCs | ||
version: v0.1.1 | ||
keywords: | ||
- bmc | ||
- bios | ||
home: "https://github.com/metal-toolbox/bioscfg" | ||
sources: | ||
- "https://github.com/metal-toolbox/bioscfg" |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
{{ if .Values.enable }} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: bioscfg-config | ||
data: | ||
config.yaml: |- | ||
{{ toYaml .Values.env | indent 4 }} | ||
{{ end }} |
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 |
---|---|---|
@@ -1,14 +1,29 @@ | ||
location: "sandbox" | ||
enable: true | ||
image: | ||
repository: "localhost:5001/bioscfg" | ||
tag: latest | ||
pullPolicy: Always | ||
repository: | ||
tag: latest | ||
url: localhost:5001 | ||
env: | ||
FLEETDB_ENDPOINT: http://fleetdb:8000 | ||
FLEETDB_DISABLE_OAUTH: true | ||
NATS_URL: "nats://nats:4222" | ||
NATS_CONNECT_TIMEOUT: 60s | ||
NATS_KV_REPLICAS: 1 | ||
# telemetry configuration | ||
OTEL_EXPORTER_OTLP_ENDPOINT: jaeger:4317 | ||
OTEL_EXPORTER_OTLP_INSECURE: true | ||
test: myTest | ||
test1: myFirstTest | ||
facility: sandbox | ||
log_level: debug | ||
concurrency: 5 | ||
dryrun: false | ||
endpoints: | ||
fleetdb: | ||
authenticate: false | ||
oidc_audience_url: | ||
oidc_client_id: | ||
oidc_issuer_url: | ||
oidc_client_scopes: | ||
url: http://fleetdb:8000 | ||
nats: | ||
connect_timeout: 60s | ||
kv_replication: 1 | ||
creds_file: /etc/nats/nats.creds | ||
url: nats://nats:4222 | ||
otel: | ||
authenticate: false | ||
url: jaeger:4317 |
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,26 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/metal-toolbox/bioscfg/internal/bioscfg" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// bioscfgCmd represents the bioscfg command | ||
var bioscfgCmd = &cobra.Command{ | ||
Use: "run", | ||
Short: "Run the BiosCfg Controller", | ||
Run: func(cmd *cobra.Command, _ []string) { | ||
err := bioscfg.Run(cmd.Context(), ConfigFile, LogLevel, EnableProfiling) | ||
if err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(bioscfgCmd) | ||
} |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why we moved the
entrypoint
up here? I don't know that it will affect the execution, but I've never really seen it NOT be the last line of Dockerfile.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, ill move it back. I forgot to change it back. I was dealing with a weird bug and trying some wild stuff to see what was up.