Skip to content

Commit

Permalink
Minor fixes:
Browse files Browse the repository at this point in the history
* Added comments for exported structs
* Fixed non-inclusive language

Signed-off-by: Alvaro Romero <alromero@redhat.com>
  • Loading branch information
alromeros committed Dec 21, 2022
1 parent fbea335 commit c5a97dd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/cdi-func-test-sample-populator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,21 @@ var (
fileContents string
httpEndpoint string
metricsPath string
masterURL string
mainURL string
kubeconfig string
imageName string
namespace string
)

// CDISamplePopulator is the struct to be used as a SamplePopulator CR
type CDISamplePopulator struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec CDIPopulatorSpec `json:"spec"`
}

// CDIPopulatorSpec is the struct to be used as the spec of the SamplePopulator CR
type CDIPopulatorSpec struct {
FileName string `json:"fileName"`
FileContents string `json:"fileContents"`
Expand All @@ -60,7 +62,7 @@ func init() {

// Controller args
flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
flag.StringVar(&masterURL, "master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
flag.StringVar(&mainURL, "main", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
flag.StringVar(&imageName, "image-name", "", "(Mandatory) Image to use for populating")
flag.StringVar(&namespace, "namespace", "cdi", "Namespace to deploy controller")
flag.StringVar(&httpEndpoint, "http-endpoint", "", "The TCP network address where the HTTP server for diagnostics, including metrics and leader election health check, will listen (example: `:8080`). The default is empty string, which means the server is disabled.")
Expand Down Expand Up @@ -94,7 +96,7 @@ func runSampleController() {
}

// We run the default controller in populator-machinery, which will trigger this populator again in "populate" mode
populatormachinery.RunController(masterURL, kubeconfig, imageName, httpEndpoint, metricsPath,
populatormachinery.RunController(mainURL, kubeconfig, imageName, httpEndpoint, metricsPath,
namespace, prefix, groupKind, groupVersionResource, mountPath, devicePath, getPopulatorPodArgs)
}

Expand Down

0 comments on commit c5a97dd

Please sign in to comment.