Skip to content

Commit

Permalink
Fix caps
Browse files Browse the repository at this point in the history
  • Loading branch information
faisal-memon committed Oct 15, 2024
1 parent d7555a8 commit 98e4b04
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cmd/spiffe-helper/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type Config struct {
AgentAddressDeprecated string `hcl:"agentAddress"`
Cmd string `hcl:"cmd"`
CmdArgs string `hcl:"cmd_args"`
PidFileName string `hcl:"pid_file_name"`
PIDFileName string `hcl:"pid_file_name"`
CmdArgsDeprecated string `hcl:"cmdArgs"`
CertDir string `hcl:"cert_dir"`
CertDirDeprecated string `hcl:"certDir"`
Expand Down Expand Up @@ -204,7 +204,7 @@ func NewSidecarConfig(config *Config, log logrus.FieldLogger) *sidecar.Config {
AgentAddress: config.AgentAddress,
Cmd: config.Cmd,
CmdArgs: config.CmdArgs,
PidFileName: config.PidFileName,
PIDFileName: config.PIDFileName,
CertDir: config.CertDir,
CertFileMode: fs.FileMode(config.CertFileMode), //nolint:gosec,G115
KeyFileMode: fs.FileMode(config.KeyFileMode), //nolint:gosec,G115
Expand Down
2 changes: 1 addition & 1 deletion pkg/sidecar/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Config struct {
CmdArgs string

// Signal external process via PID file
PidFileName string
PIDFileName string

// The directory name to store the x509s and/or JWTs.
CertDir string
Expand Down
8 changes: 4 additions & 4 deletions pkg/sidecar/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ func (s *Sidecar) updateCertificates(svidResponse *workloadapi.X509Context) {
// signalProcess sends the configured Renew signal to the process running the proxy
// to reload itself so that the proxy uses the new SVID
func (s *Sidecar) signalProcess() (err error) {
if s.config.PidFileName != "" {
byts, err := os.ReadFile(s.config.PidFileName)
if s.config.PIDFileName != "" {
byts, err := os.ReadFile(s.config.PIDFileName)
if err != nil {
return fmt.Errorf("failed to read pid file: %s\n%w", s.config.PidFileName, err)
return fmt.Errorf("failed to read pid file: %s\n%w", s.config.PIDFileName, err)
}
pid, err := strconv.Atoi(string(bytes.TrimSpace(byts)))
if err != nil {
return fmt.Errorf("failed to parse pid file: %s\n%w", s.config.PidFileName, err)
return fmt.Errorf("failed to parse pid file: %s\n%w", s.config.PIDFileName, err)
}
s.process, err = os.FindProcess(pid)
if err != nil {
Expand Down

0 comments on commit 98e4b04

Please sign in to comment.