added PodSecurityContext #4867
Annotations
5 errors and 2 warnings
Verify goimports:
cmd/create.go#L1
Please run goimports.
diff --git a/cmd/create.go b/cmd/create.go
index 4263c0c..b123135 100644
--- a/cmd/create.go
+++ b/cmd/create.go
@@ -568,4 +568,4 @@ func RuntimeTemplateOptions(client *fn.Client) (string, error) {
}
writer.Flush()
return builder.String(), nil
-}
\ No newline at end of file
+}
|
Verify goimports:
pkg/functions/function.go#L1
Please run goimports.
diff --git a/pkg/functions/function.go b/pkg/functions/function.go
index 459f8cc..dd9c587 100644
--- a/pkg/functions/function.go
+++ b/pkg/functions/function.go
@@ -141,7 +141,7 @@ type RunSpec struct {
// Env variables to be set
Envs Envs `yaml:"envs,omitempty"`
-
+
// PodSecurityContext to be set for read and write permission
PodSecurityContext PodSecurityContext `yaml:"podSecurityContext, omitempty"`
// StartTimeout specifies that this function should have a custom timeout
|
Verify goimports:
pkg/functions/function_security.go#L1
Please run goimports.
diff --git a/pkg/functions/function_security.go b/pkg/functions/function_security.go
index 08bbc5e..e516b0a 100644
--- a/pkg/functions/function_security.go
+++ b/pkg/functions/function_security.go
@@ -1,8 +1,8 @@
package functions
type PodSecurityContext struct {
- RunAsUser *int64 `yaml:"RunAsUser,omitempty"`
- RunAsGroup *int64 `yaml:"RunAsGroup,omitempty"`
- RunAsNonRoot *bool `yaml:"RunAsNonRoot,omitempty"`
- FSGroup *int64 `yaml:"FSGroup,omitempty"`
+ RunAsUser *int64 `yaml:"RunAsUser,omitempty"`
+ RunAsGroup *int64 `yaml:"RunAsGroup,omitempty"`
+ RunAsNonRoot *bool `yaml:"RunAsNonRoot,omitempty"`
+ FSGroup *int64 `yaml:"FSGroup,omitempty"`
}
|
Verify goimports:
pkg/knative/deployer.go#L1
Please run goimports.
diff --git a/pkg/knative/deployer.go b/pkg/knative/deployer.go
index 19e201e..84e8460 100644
--- a/pkg/knative/deployer.go
+++ b/pkg/knative/deployer.go
@@ -435,7 +435,7 @@ func generateNewService(f fn.Function, decorator DeployDecorator) (*v1.Service,
for k, v := range annotations {
revisionAnnotations[k] = v
}
- PodSecurityContext := getPodSecurityContext(f.Run)
+ PodSecurityContext := getPodSecurityContext(f.Run)
service := &v1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: f.Name,
@@ -1077,12 +1077,12 @@ func setServiceOptions(template *v1.RevisionTemplateSpec, options fn.Options) er
return servingclientlib.UpdateRevisionTemplateAnnotations(template, toUpdate, toRemove)
}
-func getPodSecurityContext(RunSpec fn.RunSpec) *corev1.PodSecurityContext{
- return &corev1.PodSecurityContext{
- RunAsUser: RunSpec.PodSecurityContext.RunAsUser,
- RunAsGroup: RunSpec.PodSecurityContext.RunAsGroup,
+func getPodSecurityContext(RunSpec fn.RunSpec) *corev1.PodSecurityContext {
+ return &corev1.PodSecurityContext{
+ RunAsUser: RunSpec.PodSecurityContext.RunAsUser,
+ RunAsGroup: RunSpec.PodSecurityContext.RunAsGroup,
RunAsNonRoot: RunSpec.PodSecurityContext.RunAsNonRoot,
- FSGroup: RunSpec.PodSecurityContext.FSGroup,
+ FSGroup: RunSpec.PodSecurityContext.FSGroup,
}
-}
\ No newline at end of file
+}
|
Verify goimports
Process completed with exit code 1.
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-go@v4, actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Set up Go
Restore cache failed: Dependencies file is not found in /home/runner/work/func/func. Supported file pattern: go.sum
|
The logs for this run have expired and are no longer available.
Loading