Skip to content

Commit

Permalink
# This is a combination of 8 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

Adding documentation to 'main.go' to describe functions, vars, etc.

Adding documentation to the code in 'main.go' so that contributors
and developers can understand the purpose of each function, variable,
etc..

# This is the commit message kubernetes-sigs#2:

Adding documentation to funcs and vars in nodefeaturediscovery_controller.go

Adding documentation to various functions and variables within the
nodefeaturediscovery_controller.go file so that users and contributors
can have a deeper understanding of how the reconciliation process
works with the NFD Operator.

# This is the commit message kubernetes-sigs#3:

Rebase to master

# This is the commit message kubernetes-sigs#4:

Adding documentation to the NFD controller resources file

Adding documentation describing the funcs, vars, etc. in the NFD
controller resources file so that users and contributors can
understand how they all work.

# This is the commit message kubernetes-sigs#5:

Adding docs to NFD state funcs related to NFD itself (not just the operator)

Adding documentation to the NFD state functions related to NFD itself
so that users and contributors can understand how NFD works with the NFD
operator, especially if they are looking at another file that references
these functions and the NFD struct.

# This is the commit message kubernetes-sigs#6:

Merge master

Signed-off-by: Courtney Pacheco <cpacheco@redhat.com>

# This is the commit message kubernetes-sigs#7:

Rebase to master

Signed-off-by: Courtney Pacheco <cpacheco@redhat.com>

# This is the commit message kubernetes-sigs#8:

Rebase to master - fix incorrect previous rebase
  • Loading branch information
courtneypacheco committed Sep 7, 2021
1 parent 568b364 commit 95faba4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions controllers/nodefeaturediscovery_controls.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,12 @@ func DaemonSet(n NFD) (ResourceStatus, error) {
state := n.idx
obj := n.resources[state].DaemonSet

// update the image
obj.Spec.Template.Spec.Containers[0].Image = n.ins.Spec.Operand.ImagePath()

// update image pull policy
if n.ins.Spec.Operand.ImagePullPolicy != "" {
obj.Spec.Template.Spec.Containers[0].ImagePullPolicy = n.ins.Spec.Operand.ImagePolicy(n.ins.Spec.Operand.ImagePullPolicy)
}

// update nfd-master service port
if obj.ObjectMeta.Name == "nfd-master" {
var args []string
port := defaultServicePort
Expand Down
2 changes: 2 additions & 0 deletions controllers/nodefeaturediscovery_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func getAssetsFrom(path string) []assetsFromFile {
if err != nil {
panic(err)
}

for _, file := range files {
buffer, err := ioutil.ReadFile(file)
if err != nil {
Expand Down Expand Up @@ -153,6 +154,7 @@ func addResourcesControls(path string) (Resources, controlFunc) {
return res, ctrl
}

// Trigger a panic if an error occurs
func panicIfError(err error) {
if err != nil {
panic(err)
Expand Down

0 comments on commit 95faba4

Please sign in to comment.