Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
d1896a69
Commit
d1896a69
authored
Nov 15, 2016
by
Dlugolecki, Jakub
Committed by
jdlugole
Nov 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change ScheduledJob POD name suffix from hash to Unix Epoch
parent
79fc0a95
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
BUILD
pkg/controller/cronjob/BUILD
+0
-1
utils.go
pkg/controller/cronjob/utils.go
+3
-6
No files found.
pkg/controller/cronjob/BUILD
View file @
d1896a69
...
@@ -32,7 +32,6 @@ go_library(
...
@@ -32,7 +32,6 @@ go_library(
"//pkg/runtime:go_default_library",
"//pkg/runtime:go_default_library",
"//pkg/types:go_default_library",
"//pkg/types:go_default_library",
"//pkg/util/errors:go_default_library",
"//pkg/util/errors:go_default_library",
"//pkg/util/hash:go_default_library",
"//pkg/util/metrics:go_default_library",
"//pkg/util/metrics:go_default_library",
"//pkg/util/runtime:go_default_library",
"//pkg/util/runtime:go_default_library",
"//pkg/util/wait:go_default_library",
"//pkg/util/wait:go_default_library",
...
...
pkg/controller/cronjob/utils.go
View file @
d1896a69
...
@@ -19,7 +19,6 @@ package cronjob
...
@@ -19,7 +19,6 @@ package cronjob
import
(
import
(
"encoding/json"
"encoding/json"
"fmt"
"fmt"
"hash/adler32"
"time"
"time"
"github.com/golang/glog"
"github.com/golang/glog"
...
@@ -30,7 +29,6 @@ import (
...
@@ -30,7 +29,6 @@ import (
"k8s.io/kubernetes/pkg/apis/batch"
"k8s.io/kubernetes/pkg/apis/batch"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/types"
"k8s.io/kubernetes/pkg/types"
hashutil
"k8s.io/kubernetes/pkg/util/hash"
)
)
// Utilities for dealing with Jobs and CronJobs and time.
// Utilities for dealing with Jobs and CronJobs and time.
...
@@ -200,10 +198,9 @@ func getJobFromTemplate(sj *batch.CronJob, scheduledTime time.Time) (*batch.Job,
...
@@ -200,10 +198,9 @@ func getJobFromTemplate(sj *batch.CronJob, scheduledTime time.Time) (*batch.Job,
return
job
,
nil
return
job
,
nil
}
}
func
getTimeHash
(
scheduledTime
time
.
Time
)
uint32
{
// Return Unix Epoch Time
timeHasher
:=
adler32
.
New
()
func
getTimeHash
(
scheduledTime
time
.
Time
)
int64
{
hashutil
.
DeepHashObject
(
timeHasher
,
scheduledTime
)
return
scheduledTime
.
Unix
()
return
timeHasher
.
Sum32
()
}
}
// makeCreatedByRefJson makes a json string with an object reference for use in "created-by" annotation value
// makeCreatedByRefJson makes a json string with an object reference for use in "created-by" annotation value
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment