-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Kubeless 0.5.0 #245
Conversation
@@ -36,6 +36,9 @@ class FunctionEditor extends React.Component<IFunctionEditorProps> { | |||
return "javascript"; | |||
} else if (runtime.match(/ruby/)) { | |||
return "ruby"; | |||
} else if (runtime.match(/php/)) { | |||
// Doesn't work: Uncaught SyntaxError: Unexpected token < |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because you're missing the import for php (see line 4)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was it :)
dashboard/src/actions/runtimes.ts
Outdated
@@ -0,0 +1,22 @@ | |||
import { Dispatch } from "redux"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these actions should really be part of functions and the function state (e.g. the catalog actions/state holds all the state for brokers, instances, plans, etc.), unless there's any particular reason you wanted this to be separate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, they are different entities but it is true that runtimes are meaningless without functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree they're different entities, but they are part of the same component so I think it makes sense to group them - especially since that's what we're doing with Service Catalog (brokers, instances, plans are all separate entities).
@@ -36,6 +36,9 @@ class FunctionEditor extends React.Component<IFunctionEditorProps> { | |||
return "javascript"; | |||
} else if (runtime.match(/ruby/)) { | |||
return "ruby"; | |||
} else if (runtime.match(/php/)) { | |||
// Doesn't work: Uncaught SyntaxError: Unexpected token < |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because you're missing the import for php (see line 4)
dashboard/src/reducers/runtimes.ts
Outdated
import { RuntimesAction } from "../actions/runtimes"; | ||
import { IRuntime } from "../shared/types"; | ||
|
||
export interface IRuntimeState { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as suggested above, I think this could be part of the function reducer and state
|
||
export default class Config { | ||
public static async get() { | ||
const config = await axios.get<IKubelessConfigMap>(Config.SelfLink); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should return config.data, or better yet could be written as const { data: config } = ...
. There's not much point in returning the Axios request response.
Thanks a lot @andresmgot, this is awesome (especially since you also did the work to fetch the Kubeless config that I was too lazy to do earlier ;) )! |
@@ -18,7 +18,11 @@ local labels = { | |||
// the manifest key | |||
local labelify(src) = if std.objectHas(src, "metadata") then src + labels else src; | |||
local labelifyEach(src) = { | |||
[k]: labelify(src[k]) for k in std.objectFields(src) | |||
[k]: if std.isArray(src[k]) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this also fix #151?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that issue refers to the kubeless-controller
it was already setting the label created-by: kubeapps
(and it keeps being that way). In case it was referring to the function pods that kubeless creates they won't include that tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought @sebgoa was referring to the kubeless-controller
, but now that you say that maybe he was referring to the function pods, and of course they won't include that tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was referring to the controller and zk/kafka pods/deployments.
@andresmgot we also need to add the shasum to the function spec, since functions created by the CLI will not update if this is not correctly set. |
BTW, with this change we are not including Kafka and Zookeeper anymore. Should we keep it or leave Kubeapps with just HTTP triggered functions? |
@andresmgot let's leave it and implement it with #189. BTW, can you also update /~https://github.com/kubeapps/kubeapps/blob/master/docs/design-proposals/authentication-and-authorization.md#functions with the relevant ConfigMap role? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm thanks @andresmgot!
Retrieve runtimes information from kubeless-config
closes #194
closes #191
closes #187