Switch from ThirdPartyResources to CustomResourceDefinitions (#381)
Switch Fission's storage over to the new CustomResourceDefinitions, from the deprecated ThirdPartyResources. This allows us to be compatible with Kubernets 1.8 and onwards. This also adds a CLI tool for dumping state from an old fission version and restoring state into new CRDs. The storage service is unaffected by this change.
This commit is contained in:
committed by
Soam Vasani
parent
746c51901d
commit
5f14b9b0ae
@@ -29,7 +29,7 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/fission/fission"
|
||||
"github.com/fission/fission/tpr"
|
||||
"github.com/fission/fission/crd"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -58,7 +58,7 @@ func makeNatsMessageQueue(routerUrl string, mqCfg MessageQueueConfig) (MessageQu
|
||||
return nats, nil
|
||||
}
|
||||
|
||||
func (nats Nats) subscribe(trigger *tpr.Messagequeuetrigger) (messageQueueSubscription, error) {
|
||||
func (nats Nats) subscribe(trigger *crd.MessageQueueTrigger) (messageQueueSubscription, error) {
|
||||
subj := trigger.Spec.Topic
|
||||
|
||||
if !isTopicValidForNats(subj) {
|
||||
@@ -91,7 +91,7 @@ func isTopicValidForNats(topic string) bool {
|
||||
return nsUtil.IsSubjectValid(topic, false)
|
||||
}
|
||||
|
||||
func msgHandler(nats *Nats, trigger *tpr.Messagequeuetrigger) func(*ns.Msg) {
|
||||
func msgHandler(nats *Nats, trigger *crd.MessageQueueTrigger) func(*ns.Msg) {
|
||||
return func(msg *ns.Msg) {
|
||||
|
||||
// Support other function ref types
|
||||
|
||||
Reference in New Issue
Block a user