Skip to content

Commit

Permalink
fixes 'kfctl generated yaml fails validation kubeflow#2653'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kam D Kasravi committed Mar 10, 2019
1 parent 11ab94f commit 31aa10e
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 90 deletions.
18 changes: 9 additions & 9 deletions kubeflow/argo/argo.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
local workflowController = {
apiVersion: "extensions/v1beta1",
kind: "Deployment",
labels: {
app: "workflow-controller",
},
metadata: {
labels: {
app: "workflow-controller",
},
name: "workflow-controller",
namespace: params.namespace,
},
Expand Down Expand Up @@ -168,6 +168,12 @@
resources: {},
terminationMessagePath: "/dev/termination-log",
terminationMessagePolicy: "File",
readinessProbe: {
httpGet: {
path: "/",
port: 8001,
},
},
},
],
dnsPolicy: "ClusterFirst",
Expand All @@ -177,12 +183,6 @@
serviceAccount: "argo-ui",
serviceAccountName: "argo-ui",
terminationGracePeriodSeconds: 30,
readinessProbe: {
httpGet: {
path: "/",
port: 8001,
},
},
},
},
},
Expand Down
18 changes: 9 additions & 9 deletions kubeflow/argo/tests/argo_test.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ local testCases = [
expected: {
apiVersion: "extensions/v1beta1",
kind: "Deployment",
labels: {
app: "workflow-controller",
},
metadata: {
labels: {
app: "workflow-controller",
},
name: "workflow-controller",
namespace: "kubeflow",
},
Expand Down Expand Up @@ -182,18 +182,18 @@ local testCases = [
image: "argoproj/argoui:v2.2.0",
imagePullPolicy: "IfNotPresent",
name: "argo-ui",
readinessProbe: {
httpGet: {
path: "/",
port: 8001,
},
},
resources: {},
terminationMessagePath: "/dev/termination-log",
terminationMessagePolicy: "File",
},
],
dnsPolicy: "ClusterFirst",
readinessProbe: {
httpGet: {
path: "/",
port: 8001,
},
},
restartPolicy: "Always",
schedulerName: "default-scheduler",
securityContext: {},
Expand Down
32 changes: 16 additions & 16 deletions kubeflow/common/ambassador.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
ambassadorRoleBinding:: ambassadorRoleBinding,

local ambassadorDeployment = {
apiVersion: "extensions/v1beta1",
apiVersion: "apps/v1beta1",
kind: "Deployment",
metadata: {
name: "ambassador",
Expand Down Expand Up @@ -174,15 +174,17 @@
},
],
image: params.ambassadorImage,
livenessProbe: {
httpGet: {
path: "/ambassador/v0/check_alive",
port: 8877,
name: "ambassador",
resources: {
limits: {
cpu: 1,
memory: "400Mi",
},
requests: {
cpu: "200m",
memory: "100Mi",
},
initialDelaySeconds: 30,
periodSeconds: 30,
},
name: "ambassador",
readinessProbe: {
httpGet: {
path: "/ambassador/v0/check_ready",
Expand All @@ -191,15 +193,13 @@
initialDelaySeconds: 30,
periodSeconds: 30,
},
resources: {
limits: {
cpu: 1,
memory: "400Mi",
},
requests: {
cpu: "200m",
memory: "100Mi",
livenessProbe: {
httpGet: {
path: "/ambassador/v0/check_alive",
port: 8877,
},
initialDelaySeconds: 30,
periodSeconds: 30,
},
},
],
Expand Down
111 changes: 56 additions & 55 deletions kubeflow/common/tests/ambassador_test.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -159,71 +159,72 @@ local testCases = [
},
{
actual: instance.parts.ambassadorDeployment,
expected: {
apiVersion: "extensions/v1beta1",
kind: "Deployment",
metadata: {
name: "ambassador",
namespace: "kubeflow",
},
spec: {
replicas: 3,
template: {
metadata: {
labels: {
service: "ambassador",
expected:
{
apiVersion: "apps/v1beta1",
kind: "Deployment",
metadata: {
name: "ambassador",
namespace: "kubeflow",
},
spec: {
replicas: 3,
template: {
metadata: {
labels: {
service: "ambassador",
},
namespace: "kubeflow",
},
namespace: "kubeflow",
},
spec: {
containers: [
{
env: [
{
name: "AMBASSADOR_NAMESPACE",
valueFrom: {
fieldRef: {
fieldPath: "metadata.namespace",
spec: {
containers: [
{
env: [
{
name: "AMBASSADOR_NAMESPACE",
valueFrom: {
fieldRef: {
fieldPath: "metadata.namespace",
},
},
},
],
image: "quay.io/datawire/ambassador:0.37.0",
livenessProbe: {
httpGet: {
path: "/ambassador/v0/check_alive",
port: 8877,
},
initialDelaySeconds: 30,
periodSeconds: 30,
},
],
image: "quay.io/datawire/ambassador:0.37.0",
livenessProbe: {
httpGet: {
path: "/ambassador/v0/check_alive",
port: 8877,
},
initialDelaySeconds: 30,
periodSeconds: 30,
},
name: "ambassador",
readinessProbe: {
httpGet: {
path: "/ambassador/v0/check_ready",
port: 8877,
},
initialDelaySeconds: 30,
periodSeconds: 30,
},
resources: {
limits: {
cpu: 1,
memory: "400Mi",
name: "ambassador",
readinessProbe: {
httpGet: {
path: "/ambassador/v0/check_ready",
port: 8877,
},
initialDelaySeconds: 30,
periodSeconds: 30,
},
requests: {
cpu: "200m",
memory: "100Mi",
resources: {
limits: {
cpu: 1,
memory: "400Mi",
},
requests: {
cpu: "200m",
memory: "100Mi",
},
},
},
},
],
restartPolicy: "Always",
serviceAccountName: "ambassador",
],
restartPolicy: "Always",
serviceAccountName: "ambassador",
},
},
},
},
},
},
];

Expand Down
1 change: 0 additions & 1 deletion kubeflow/pipeline/pipeline-viewercrd.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
app: app_label,
},
name: viewer_controller_role,
namespace: namespace,
},
rules: [
{
Expand Down

0 comments on commit 31aa10e

Please sign in to comment.