Skip to content

Commit

Permalink
Various minor fixes (#145)
Browse files Browse the repository at this point in the history
* Minor fixes

* Reverted Travis Go version change
  • Loading branch information
yuchaoran2011 authored and mwylde committed Dec 13, 2019
1 parent 437a1ad commit 11eec01
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13.0-alpine3.10 as builder
FROM golang:1.13.4-alpine3.10 as builder
RUN apk add git openssh-client make curl bash

COPY boilerplate/lyft/golang_test_targets/dep_install.sh /go/src/github.com/lyft/flinkk8soperator/
Expand Down
2 changes: 1 addition & 1 deletion examples/wordcount/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM flink:1.8.2-scala_2.12
FROM flink:1.9.1-scala_2.12

# Prepare environment
ENV MAVEN_HOME=/opt/maven
Expand Down
4 changes: 2 additions & 2 deletions examples/wordcount/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>1.8.1</version>
<version>1.9.1</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java_2.11</artifactId>
<version>1.8.1</version>
<version>1.9.1</version>
</dependency>
</dependencies>
</project>
3 changes: 1 addition & 2 deletions integ/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

"github.com/go-resty/resty"
flinkapp "github.com/lyft/flinkk8soperator/pkg/apis/app/v1beta1"
clientset "github.com/lyft/flinkk8soperator/pkg/client/clientset/versioned"
client "github.com/lyft/flinkk8soperator/pkg/client/clientset/versioned/typed/app/v1beta1"
"github.com/prometheus/common/log"
appsv1 "k8s.io/api/apps/v1"
Expand All @@ -25,8 +26,6 @@ import (
"k8s.io/apimachinery/pkg/util/yaml"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"

clientset "github.com/lyft/flinkk8soperator/pkg/client/clientset/versioned"
)

type TestUtil struct {
Expand Down
32 changes: 16 additions & 16 deletions pkg/apis/app/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,30 +127,30 @@ type SavepointInfo struct {
type FlinkClusterStatus struct {
Health HealthStatus `json:"health,omitempty"`
NumberOfTaskManagers int32 `json:"numberOfTaskManagers,omitempty"`
HealthyTaskManagers int32 `json:"healthyTaskManagers,omitepty"`
HealthyTaskManagers int32 `json:"healthyTaskManagers,omitempty"`
NumberOfTaskSlots int32 `json:"numberOfTaskSlots,omitempty"`
AvailableTaskSlots int32 `json:"availableTaskSlots"`
}

type FlinkJobStatus struct {
JobID string `json:"jobID,omitEmpty"`
Health HealthStatus `json:"health,omitEmpty"`
State JobState `json:"state,omitEmpty"`
JobID string `json:"jobID,omitempty"`
Health HealthStatus `json:"health,omitempty"`
State JobState `json:"state,omitempty"`

JarName string `json:"jarName"`
Parallelism int32 `json:"parallelism"`
EntryClass string `json:"entryClass,omitempty"`
ProgramArgs string `json:"programArgs,omitempty"`
AllowNonRestoredState bool `json:"allowNonRestoredState,omitempty"`

StartTime *metav1.Time `json:"startTime,omitEmpty"`
JobRestartCount int32 `json:"jobRestartCount,omitEmpty"`
CompletedCheckpointCount int32 `json:"completedCheckpointCount,omitEmpty"`
FailedCheckpointCount int32 `json:"failedCheckpointCount,omitEmpty"`
LastCheckpointTime *metav1.Time `json:"lastCheckpointTime,omitEmpty"`
RestorePath string `json:"restorePath,omitEmpty"`
RestoreTime *metav1.Time `json:"restoreTime,omitEmpty"`
LastFailingTime *metav1.Time `json:"lastFailingTime,omitEmpty"`
StartTime *metav1.Time `json:"startTime,omitempty"`
JobRestartCount int32 `json:"jobRestartCount,omitempty"`
CompletedCheckpointCount int32 `json:"completedCheckpointCount,omitempty"`
FailedCheckpointCount int32 `json:"failedCheckpointCount,omitempty"`
LastCheckpointTime *metav1.Time `json:"lastCheckpointTime,omitempty"`
RestorePath string `json:"restorePath,omitempty"`
RestoreTime *metav1.Time `json:"restoreTime,omitempty"`
LastFailingTime *metav1.Time `json:"lastFailingTime,omitempty"`
}

type FlinkApplicationStatus struct {
Expand All @@ -160,11 +160,11 @@ type FlinkApplicationStatus struct {
Reason string `json:"reason,omitempty"`
ClusterStatus FlinkClusterStatus `json:"clusterStatus,omitempty"`
JobStatus FlinkJobStatus `json:"jobStatus"`
FailedDeployHash string `json:"failedDeployHash,omitEmpty"`
RollbackHash string `json:"rollbackHash,omitEmpty"`
FailedDeployHash string `json:"failedDeployHash,omitempty"`
RollbackHash string `json:"rollbackHash,omitempty"`
DeployHash string `json:"deployHash"`
RetryCount int32 `json:"retryCount,omitEmpty"`
LastSeenError FlinkApplicationError `json:"lastSeenError,omitEmpty"`
RetryCount int32 `json:"retryCount,omitempty"`
LastSeenError FlinkApplicationError `json:"lastSeenError,omitempty"`
}

func (in *FlinkApplicationStatus) GetPhase() FlinkApplicationPhase {
Expand Down
32 changes: 16 additions & 16 deletions pkg/apis/app/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,31 +130,31 @@ type FlinkClusterStatus struct {
ClusterOverviewURL string `json:"clusterOverviewURL,omitempty"`
Health HealthStatus `json:"health,omitempty"`
NumberOfTaskManagers int32 `json:"numberOfTaskManagers,omitempty"`
HealthyTaskManagers int32 `json:"healthyTaskManagers,omitepty"`
HealthyTaskManagers int32 `json:"healthyTaskManagers,omitempty"`
NumberOfTaskSlots int32 `json:"numberOfTaskSlots,omitempty"`
AvailableTaskSlots int32 `json:"availableTaskSlots"`
}

type FlinkJobStatus struct {
JobOverviewURL string `json:"jobOverviewURL,omitempty"`
JobID string `json:"jobID,omitEmpty"`
Health HealthStatus `json:"health,omitEmpty"`
State JobState `json:"state,omitEmpty"`
JobID string `json:"jobID,omitempty"`
Health HealthStatus `json:"health,omitempty"`
State JobState `json:"state,omitempty"`

JarName string `json:"jarName"`
Parallelism int32 `json:"parallelism"`
EntryClass string `json:"entryClass,omitempty"`
ProgramArgs string `json:"programArgs,omitempty"`
AllowNonRestoredState bool `json:"allowNonRestoredState,omitempty"`

StartTime *metav1.Time `json:"startTime,omitEmpty"`
JobRestartCount int32 `json:"jobRestartCount,omitEmpty"`
CompletedCheckpointCount int32 `json:"completedCheckpointCount,omitEmpty"`
FailedCheckpointCount int32 `json:"failedCheckpointCount,omitEmpty"`
LastCheckpointTime *metav1.Time `json:"lastCheckpointTime,omitEmpty"`
RestorePath string `json:"restorePath,omitEmpty"`
RestoreTime *metav1.Time `json:"restoreTime,omitEmpty"`
LastFailingTime *metav1.Time `json:"lastFailingTime,omitEmpty"`
StartTime *metav1.Time `json:"startTime,omitempty"`
JobRestartCount int32 `json:"jobRestartCount,omitempty"`
CompletedCheckpointCount int32 `json:"completedCheckpointCount,omitempty"`
FailedCheckpointCount int32 `json:"failedCheckpointCount,omitempty"`
LastCheckpointTime *metav1.Time `json:"lastCheckpointTime,omitempty"`
RestorePath string `json:"restorePath,omitempty"`
RestoreTime *metav1.Time `json:"restoreTime,omitempty"`
LastFailingTime *metav1.Time `json:"lastFailingTime,omitempty"`
}

type FlinkApplicationStatus struct {
Expand All @@ -164,13 +164,13 @@ type FlinkApplicationStatus struct {
Reason string `json:"reason,omitempty"`
ClusterStatus FlinkClusterStatus `json:"clusterStatus,omitempty"`
JobStatus FlinkJobStatus `json:"jobStatus"`
FailedDeployHash string `json:"failedDeployHash,omitEmpty"`
RollbackHash string `json:"rollbackHash,omitEmpty"`
FailedDeployHash string `json:"failedDeployHash,omitempty"`
RollbackHash string `json:"rollbackHash,omitempty"`
DeployHash string `json:"deployHash"`
SavepointTriggerID string `json:"savepointTriggerId,omitempty"`
SavepointPath string `json:"savepointPath,omitempty"`
RetryCount int32 `json:"retryCount,omitEmpty"`
LastSeenError *FlinkApplicationError `json:"lastSeenError,omitEmpty"`
RetryCount int32 `json:"retryCount,omitempty"`
LastSeenError *FlinkApplicationError `json:"lastSeenError,omitempty"`
}

func (in *FlinkApplicationStatus) GetPhase() FlinkApplicationPhase {
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type Config struct {
ResyncPeriod config.Duration `json:"resyncPeriod" pflag:"\"30s\",Determines the resync period for all watchers."`
LimitNamespace string `json:"limitNamespace" pflag:"\"\",Namespaces to watch for by flink operator"`
MetricsPrefix string `json:"metricsPrefix" pflag:"\"flinkk8soperator\",Prefix for metrics propagated to prometheus"`
ProfilerPort config.Port `json:"prof-port" pflag:"\"10254\",Profiler port"`
ProfilerPort config.Port `json:"profilerPort" pflag:"\"10254\",Profiler port"`
FlinkIngressURLFormat string `json:"ingressUrlFormat"`
UseProxy bool `json:"useKubectlProxy"`
ProxyPort config.Port `json:"ProxyPort" pflag:"\"8001\",The port at which flink cluster runs locally"`
ProxyPort config.Port `json:"proxyPort" pflag:"\"8001\",The port at which flink cluster runs locally"`
ContainerNameFormat string `json:"containerNameFormat"`
Workers int `json:"workers" pflag:"4,Number of routines to process custom resource"`
BaseBackoffDuration config.Duration `json:"baseBackoffDuration" pflag:"\"100ms\",Determines the base backoff for exponential retries."`
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/config/config_flags.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions pkg/controller/config/config_flags_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 11eec01

Please sign in to comment.