This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 175
Why does string representation matter depending on whether its imported from libsonnet file? #670
Projects
Milestone
Comments
jlewi
added a commit
to jlewi/kubeflow
that referenced
this issue
Jun 28, 2018
* This is intended to support debugging IAP; we want to see what headers are on resulting requests. * See kubeflow#574 * While creating this I ran into an issue with ksonnet not formatting the Ambassador mapping correctly unless we import it from a libsonnet file see ksonnet/ksonnet#670
k8s-ci-robot
pushed a commit
to kubeflow/kubeflow
that referenced
this issue
Jun 29, 2018
* Create a version of echo-server to echo headers. * This is intended to support debugging IAP; we want to see what headers are on resulting requests. * See #574 * While creating this I ran into an issue with ksonnet not formatting the Ambassador mapping correctly unless we import it from a libsonnet file see ksonnet/ksonnet#670 * Address comments. * Reference the images in kubeflow-images-public. * Autoformat.
bryanl
added a commit
to bryanl/ksonnet-lib
that referenced
this issue
Jul 2, 2018
Re ksonnet/ksonnet#670 Signed-off-by: bryanl <bryanliles@gmail.com>
bryanl
added a commit
to bryanl/ksonnet-lib
that referenced
this issue
Jul 2, 2018
Re ksonnet/ksonnet#670 Signed-off-by: bryanl <bryanliles@gmail.com>
@jlewi I noticed an interesting output from the Jsonnet parser. It will create strings that contain escaped control characters. I've updated the ksonnet jsonnet printer to account for this and will integrate this into ksonnet itself as well. Output now looks like it should: ---
apiVersion: v1
kind: Service
metadata:
annotations:
getambassador.io/config: |-
---
apiVersion: ambassador/v0
kind: Mapping
name: centralui-mapping
prefix: /
rewrite: /
service: centraldashboard.libsonnet
labels:
app: centraldashboard
ksonnet.io/component: test-central
name: centraldashboard
namespace: namespace
spec:
ports:
- port: 80
targetPort: 8082
selector:
app: centraldashboard
sessionAffinity: None
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
annotations:
getambassador.io/config: |-
---
apiVersion: ambassador/v0
kind: Mapping
name: uiLocal-mapping
prefix: /
rewrite: /
service: uiLocal.jsonnet
labels:
app: centraldashboard
ksonnet.io/component: test-central
name: uiLocal
namespace: kubeflow
spec:
ports:
- port: 80
targetPort: 8082
selector:
app: centraldashboard
sessionAffinity: None
type: ClusterIP |
bryanl
added a commit
to ksonnet/ksonnet-lib
that referenced
this issue
Jul 2, 2018
Re ksonnet/ksonnet#670 Signed-off-by: bryanl <bryanliles@gmail.com>
Addressed via ksonnet/ksonnet-lib/pull/148, #682. |
Thank you! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What happened:
I define the same service two different ways in the following two files
https://github.com/jlewi/kubeflow-dev/blob/0a78fee4daace5a7adfcbf5efecb860a0bfd1f00/kubeflow-deployments/ks-app/components/test-central.jsonnet#L1
https://github.com/jlewi/kubeflow-dev/blob/0a78fee4daace5a7adfcbf5efecb860a0bfd1f00/kubeflow-deployments/ks-app/components/test-central.libsonnet#L1
The resulting service is different. In the case where it is defined in libsonnet
When its defined in the jsonnet file
So the strong escaping appears to have changed and this appears to cause problems for Ambassador.
What you expected to happen:
I would expect it to always be
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
ks version
):kubectl version
):The text was updated successfully, but these errors were encountered: