Skip to content

Commit

Permalink
add installationoutputs outputNames to resource
Browse files Browse the repository at this point in the history
Signed-off-by: Troy Connor <[email protected]>
  • Loading branch information
troy0820 committed Sep 13, 2023
1 parent 3b979d0 commit d771ea3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/installation_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"reflect"
"strings"
"time"

v1 "get.porter.sh/operator/api/v1"
Expand Down Expand Up @@ -227,19 +228,21 @@ func (r *InstallationReconciler) CreateStatusOutputs(ctx context.Context, instal
}

outputs := []v1.Output{}
outputNames := []string{}
for _, output := range in.Outputs {
tmpOutput := v1.Output{
Name: output.Name,
Type: output.Type,
Sensitive: output.Sensitive,
Value: output.GetValue().GetStringValue(),
}
outputNames = append(outputNames, output.Name)
outputs = append(outputs, tmpOutput)
}
install.Status.Outputs = outputs
install.Status.OutputNames = strings.Join(outputNames, ",")

return install, nil

}

func (r *InstallationReconciler) CreateInstallationOutputsCR(ctx context.Context, install *v1.Installation, in *installationv1.ListInstallationLatestOutputResponse) (*v1.InstallationOutput, error) {
Expand Down

0 comments on commit d771ea3

Please sign in to comment.