Skip to content

Commit 42f6a9c

Browse files
committed
config: documentation updates
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
1 parent 88f22a9 commit 42f6a9c

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

config/config.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,25 @@ type Config struct {
1212
// TLS configures HTTPS support.
1313
//
1414
// Note that any non-trivial deployment means the certificate provided here
15-
// will need to be for the name the load balancer uses to connect to a given
16-
// Clair instance.
15+
// will need to be for the name used by the load balancer for a given Clair
16+
// instance.
1717
//
18-
// This is not used for outgoing requests; setting the SSL_CERT_DIR
19-
// environment variable is the recommended way to do that. The release
20-
// container has `/var/run/certs` added to the list already.
18+
// Deprecated: Use the [API] configuration hierarchy.
2119
TLS *TLS `yaml:"tls,omitempty" json:"tls,omitempty"`
2220
// Sets which mode the clair instance will run.
2321
Mode Mode `yaml:"-" json:"-"`
2422
// A string in <host>:<port> format where <host> can be an empty string.
2523
//
26-
// exposes Clair node's functionality to the network.
27-
// see /openapi/v1 for api spec.
24+
// Exposes Clair node's functionality to the network.
25+
// See /openapi/v1 for the API spec.
26+
//
27+
// Deprecated: Use the [API] configuration hierarchy.
2828
HTTPListenAddr string `yaml:"http_listen_addr" json:"http_listen_addr"`
2929
// A string in <host>:<port> format where <host> can be an empty string.
3030
//
31-
// exposes Clair's metrics and health endpoints.
31+
// Exposes Clair's metrics and health endpoints.
32+
//
33+
// Deprecated: Use the [Introspection] configuration hierarchy.
3234
IntrospectionAddr string `yaml:"introspection_addr" json:"introspection_addr"`
3335
// Set the logging level.
3436
LogLevel LogLevel `yaml:"log_level" json:"log_level"`

config/tls.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ import (
1515
//
1616
// Using the environment variables "SSL_CERT_DIR" or "SSL_CERT_FILE" or
1717
// modifying the system's trust store are the ways to modify root CAs for all
18-
// outgoing TLS connections.
18+
// outgoing TLS connections. The Clair release containers have `/var/run/certs`
19+
// added to the list already.
1920
type TLS struct {
2021
// The filesystem path where a root CA can be read.
2122
//
22-
// This can also be controlled by the SSL_CERT_FILE and SSL_CERT_DIR
23-
// environment variables, or adding the relevant certs to the system trust
24-
// store.
23+
// Deprecated: Use the "SSL_CERT_FILE" or "SSL_CERT_DIR" environment
24+
// variables, or add the relevant certs to the system trust store.
2525
RootCA string `yaml:"root_ca" json:"root_ca"`
2626
// The filesystem path where a TLS certificate can be read.
2727
Cert string `yaml:"cert" json:"cert"`
2828
// The filesystem path where a TLS private key can be read.
2929
Key string `yaml:"key" json:"key"`
3030
}
3131

32-
// Config returns a tls.Config modified according to the TLS struct.
32+
// Config returns a [tls.Config] modified according to the TLS struct.
3333
//
34-
// If the *TLS is nil, a default tls.Config is returned.
34+
// If the receiver is nil, a default [tls.Config] is returned.
3535
func (t *TLS) Config() (*tls.Config, error) {
3636
var cfg tls.Config
3737
if t == nil {

0 commit comments

Comments
 (0)