Skip to content

Commit

Permalink
Fix k8s posix (spiffe#70)
Browse files Browse the repository at this point in the history
* refactor: renamed ExperimentalSigstoreConfig to SigstoreConfig

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* docs: fixed comment about AllowedSubjectListEnabled

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* refactor: flattened chained if blocks

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* refactor: removed explicit default values for sigstore options from k8sConfig object

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* refactor: moved internal sigstore config to new struct, removed bool.
tests: fixed tests after refactor, added test for sigstore struct pointer value.

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* refactor: moved sigstore instantiation to Plugin.Configure

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* tests: removed sigstoreEnabled flag from error cases

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* fix: removed trailing colon from error message

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* tests: fixed fetch failure test, added log checking

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* fix: fixed a comment on sigstore configs

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* lint: removed unused function

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* fix: fixed nil reference error

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

* refactor: added logger on Configure, for when Sigstore isn't created until after setLogger

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>

Signed-off-by: Rodrigo Lopes <rlc2@cesar.org.br>
Co-authored-by: Rodrigo Lopes <rlc2@cesar.org.br>
Signed-off-by: Willian Alves <wiilliian.alves@gmail.com>
  • Loading branch information
2 people authored and willallves committed Oct 13, 2022
1 parent 0e28802 commit 1fe4c51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/agent/plugin/workloadattestor/k8s/k8s_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (p *Plugin) Attest(ctx context.Context, req *workloadattestorv1.AttestReque
switch lookup {
case containerInPod:
selectors := getSelectorValuesFromPodInfo(&item, status)
if p.config.EnableSigstore {
if p.config.sigstoreConfig != nil {
log.Debug("Attemping to get signature info for container", telemetry.ContainerName, status.Name)
sigstoreSelectors, err := p.sigstore.AttestContainerSignatures(ctx, status)
if err != nil {
Expand Down

0 comments on commit 1fe4c51

Please sign in to comment.