Skip to content

Commit

Permalink
otk: add mtls into resolve ostree command
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap committed Nov 19, 2024
1 parent d7ae209 commit 7932dc4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cmd/otk/osbuild-resolve-ostree-commit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ type Input struct {

// Whether to use RHSM secrets when resolving and fetching the commit.
RHSM bool `json:"rhsm,omitempty"`

// MTLS information. Will be ignored if RHSM is set.
MTLS *struct {
CA string `json:"ca"`
ClientCert string `json:"client_cert"`
ClientKey string `json:"client_key"`
} `json:"mtls,omitempty"`

// HTTP proxy to use when fetching the ref.
Proxy string `json:"proxy,omitempty"`
}

// Output contains everything needed to write a manifest that requires pulling
Expand All @@ -53,6 +63,12 @@ func run(r io.Reader, w io.Writer) error {
URL: inputTree.Tree.URL,
Ref: inputTree.Tree.Ref,
RHSM: inputTree.Tree.RHSM,
MTLS: &ostree.MTLS{
CA: inputTree.Tree.MTLS.CA,
ClientCert: inputTree.Tree.MTLS.ClientCert,
ClientKey: inputTree.Tree.MTLS.ClientKey,
},
Proxy: inputTree.Tree.Proxy,
}

var commitSpec ostree.CommitSpec
Expand Down

0 comments on commit 7932dc4

Please sign in to comment.